X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_jumpserver.cpp;h=e9c07f45fda18816a003a1017d8f3d150a7ff184;hb=aa05a6fd4d5c11dc8e8adc469134a2802446fe9f;hp=523500e504abc367d8abc9d4b5a129d87a037846;hpb=f71e6bf9cb41811f18864f5d4eecb26e29d03f25;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_jumpserver.cpp b/src/modules/m_jumpserver.cpp index 523500e50..e9c07f45f 100644 --- a/src/modules/m_jumpserver.cpp +++ b/src/modules/m_jumpserver.cpp @@ -108,9 +108,12 @@ class CommandJumpserver : public Command if (redirect_all_immediately) { /* Redirect everyone but the oper sending the command */ - for (LocalUserList::const_iterator i = ServerInstance->Users->local_users.begin(); i != ServerInstance->Users->local_users.end(); ++i) + const UserManager::LocalList& list = ServerInstance->Users.GetLocalUsers(); + for (UserManager::LocalList::const_iterator i = list.begin(); i != list.end(); ) { + // Quitting the user removes it from the list LocalUser* t = *i; + ++i; if (!t->IsOper()) { t->WriteNumeric(RPL_REDIR, "%s %d :Please use this Server/Port instead", parameters[0].c_str(), GetPort(t));