diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-12-02 01:18:54 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-12-02 01:18:54 +0000 |
commit | 44dc94b2309b684e4031d995924c81eeea7c60cc (patch) | |
tree | 1d8d4db288eae58f481926fe0716c20a08ebb3f1 | |
parent | b775784854836a0d4416ede2e36a417da652a31d (diff) |
Different FJOIN now
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2100 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r-- | src/modules/m_spanningtree.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp index c1ed6181d..052845d6c 100644 --- a/src/modules/m_spanningtree.cpp +++ b/src/modules/m_spanningtree.cpp @@ -498,10 +498,10 @@ class TreeSocket : public InspSocket return true; char first[MAXBUF]; - char second[MAXBUF]; + char modestring[MAXBUF]; char* mode_users[127]; mode_users[0] = first; - mode_users[1] = second; + mode_users[1] = modestring; strcpy(mode_users[1],"+"); unsigned int modectr = 2; @@ -518,7 +518,6 @@ class TreeSocket : public InspSocket // process one channel at a time, applying modes. char* usr = (char*)params[usernum].c_str(); char permissions = *usr; - char* mode = NULL; userrec* who = Srv->FindNick(usr); if (who) { @@ -555,9 +554,12 @@ class TreeSocket : public InspSocket // or, there are a number left over. flush them out. if (modectr > 2) { + userrec* who = new userrec; + who->fd = FD_MAGIC_NUMBER; Srv->SendMode(mode_users,modectr,who); + delete who; } - DoOneToAllButSender(source,"FJOIN",params,who->server); + DoOneToAllButSender(source,"FJOIN",params,source); return true; } @@ -618,7 +620,7 @@ class TreeSocket : public InspSocket void SendFJoins(TreeServer* Current, chanrec* c) { char list[MAXBUF]; - snprintf(list,MAXBUF,":%s FJOIN %s ",Srv->GetServerName(),c->name); + snprintf(list,MAXBUF,":%s FJOIN %s ",Srv->GetServerName().c_str(),c->name); std::vector<char*> *ulist = c->GetUsers(); for (unsigned int i = 0; i < ulist->size(); i++) { @@ -630,7 +632,7 @@ class TreeSocket : public InspSocket if (strlen(list)>(480-NICKMAX)) { this->WriteLine(list); - snprintf(list,MAXBUF,":%s FJOIN %s ",Srv->GetServerName(),c->name); + snprintf(list,MAXBUF,":%s FJOIN %s ",Srv->GetServerName().c_str(),c->name); } } if (list[strlen(list)-1] != ':') |