]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_jumpserver.cpp
Remove UserManager::GarbageCollect()
[user/henk/code/inspircd.git] / src / modules / m_jumpserver.cpp
index 599144448833c1aea22837fbfd4543b915151672..e9c07f45fda18816a003a1017d8f3d150a7ff184 100644 (file)
@@ -109,9 +109,11 @@ class CommandJumpserver : public Command
                        {
                                /* Redirect everyone but the oper sending the command */
                                const UserManager::LocalList& list = ServerInstance->Users.GetLocalUsers();
-                               for (UserManager::LocalList::const_iterator i = list.begin(); i != list.end(); ++i)
+                               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));