From 8557dcec22e3f6d92649d6521abc4703597a385e Mon Sep 17 00:00:00 2001 From: brain Date: Fri, 2 Dec 2005 01:24:00 +0000 Subject: FJOIN now acts like SJOIN git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2101 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_spanningtree.cpp | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp index 052845d6c..bc375bf23 100644 --- a/src/modules/m_spanningtree.cpp +++ b/src/modules/m_spanningtree.cpp @@ -497,6 +497,7 @@ class TreeSocket : public InspSocket if (params.size() < 2) return true; + log(DEBUG,"FORCEJOIN *** PARAMS = %d",params.size()); char first[MAXBUF]; char modestring[MAXBUF]; char* mode_users[127]; @@ -518,27 +519,27 @@ class TreeSocket : public InspSocket // process one channel at a time, applying modes. char* usr = (char*)params[usernum].c_str(); char permissions = *usr; + switch (permissions) + { + case '@': + usr++; + mode_users[modectr++] = usr; + strlcat(modestring,"o",MAXBUF); + break; + case '%': + usr++; + mode_users[modectr++] = usr; + strlcat(modestring,"h",MAXBUF); + break; + case '+': + usr++; + mode_users[modectr++] = usr; + strlcat(modestring,"v",MAXBUF); + break; + } userrec* who = Srv->FindNick(usr); if (who) { - switch (permissions) - { - case '@': - usr++; - mode_users[modectr++] = usr; - strlcat(modestring,"o",MAXBUF); - break; - case '%': - usr++; - mode_users[modectr++] = usr; - strlcat(modestring,"h",MAXBUF); - break; - case '+': - usr++; - mode_users[modectr++] = usr; - strlcat(modestring,"v",MAXBUF); - break; - } Srv->JoinUserToChannel(who,channel,key); if (modectr >= (MAXMODES-1)) { -- cgit v1.2.3