diff options
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/m_nonicks.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_park.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_spanningtree.cpp | 10 |
3 files changed, 8 insertions, 6 deletions
diff --git a/src/modules/m_nonicks.cpp b/src/modules/m_nonicks.cpp index 6c0a0163d..c2b18b49b 100644 --- a/src/modules/m_nonicks.cpp +++ b/src/modules/m_nonicks.cpp @@ -73,7 +73,7 @@ class ModuleNoNickChange : public Module irc::string me = Srv->GetServerName().c_str(); if (server == me) { - for (int i =0; i != MAXCHANS; i++) + for (int i =0; i < user->chans.size(); i++) { if (user->chans[i].channel != NULL) { diff --git a/src/modules/m_park.cpp b/src/modules/m_park.cpp index 716c91579..6a640f318 100644 --- a/src/modules/m_park.cpp +++ b/src/modules/m_park.cpp @@ -125,7 +125,7 @@ void handle_unpark(char **parameters, int pcnt, userrec *user) if (key == atoi(parameters[1])) { // first part the user from all chans theyre on, so things dont get messy - for (int i = 0; i != MAXCHANS; i++) + for (int i = 0; i < user->chans.size(); i++) { if (user->chans[i].channel != NULL) { diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp index 8b8b28092..200ab1dfc 100644 --- a/src/modules/m_spanningtree.cpp +++ b/src/modules/m_spanningtree.cpp @@ -938,11 +938,13 @@ class TreeSocket : public InspSocket clientlist[tempnick]->signon = age; strlcpy(clientlist[tempnick]->modes, modes.c_str(),53); strlcpy(clientlist[tempnick]->ip,ip.c_str(),16); + + ucrec a; + a.channel = NULL; + a.uc_modes = 0; for (int i = 0; i < MAXCHANS; i++) - { - clientlist[tempnick]->chans[i].channel = NULL; - clientlist[tempnick]->chans[i].uc_modes = 0; - } + clientlist[tempnick]->chans.push_back(a); + if (!this->bursting) { WriteOpers("*** Client connecting at %s: %s!%s@%s [%s]",clientlist[tempnick]->server,clientlist[tempnick]->nick,clientlist[tempnick]->ident,clientlist[tempnick]->host,clientlist[tempnick]->ip); |