diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-08-27 02:34:25 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-08-27 02:34:25 +0000 |
commit | 0af4f792803654519392ce35ad5c8a30966f0a66 (patch) | |
tree | ccc173da94241782e02a7d009630443a98ccbbea | |
parent | 968ce52c0dfd412e2b394e09c13590cab4aafd40 (diff) |
Fix mode granting in FJOIN
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5031 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r-- | src/modules/m_spanningtree.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp index 01ff49b87..3ad091b71 100644 --- a/src/modules/m_spanningtree.cpp +++ b/src/modules/m_spanningtree.cpp @@ -1395,12 +1395,13 @@ class TreeSocket : public InspSocket if (usr && *usr) { char* permissions = usr; + int ntimes = 0; while ((*permissions) && (*permissions != ',')) { ModeHandler* mh = ServerInstance->Modes->FindPrefix(*permissions); if (mh) { - mode_users[modectr++] = usr; + ntimes++; charlcat(modestring,mh->GetModeChar(),MAXBUF); } else @@ -1412,7 +1413,13 @@ class TreeSocket : public InspSocket usr++; permissions++; } - who = this->Instance->FindNick(++usr); + usr++; + + /* Did they get any modes? How many times? */ + for (int k = 0; k < ntimes; k++) + mode_users[modectr++] = usr; + + who = this->Instance->FindNick(usr); if (who) { chanrec::JoinUser(this->Instance, who, channel.c_str(), true, key); |