summaryrefslogtreecommitdiff
path: root/src/modules/m_spanningtree.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-12-02 10:05:06 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-12-02 10:05:06 +0000
commiteb74aa93eb2085416958c76b2b03ab71ca8931d0 (patch)
treea7a18478fe9240a328c9af6c2f00cf48f0c1663c /src/modules/m_spanningtree.cpp
parent7ad7f353210a313bda88f95e3174e45ef7f11797 (diff)
Attempted fix for om bug
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2110 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_spanningtree.cpp')
-rw-r--r--src/modules/m_spanningtree.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp
index bc375bf23..31621d980 100644
--- a/src/modules/m_spanningtree.cpp
+++ b/src/modules/m_spanningtree.cpp
@@ -506,6 +506,7 @@ class TreeSocket : public InspSocket
strcpy(mode_users[1],"+");
unsigned int modectr = 2;
+ userrec* who = NULL;
std::string channel = params[0];
char* key = "";
chanrec* chan = Srv->FindChannel(channel);
@@ -537,7 +538,7 @@ class TreeSocket : public InspSocket
strlcat(modestring,"v",MAXBUF);
break;
}
- userrec* who = Srv->FindNick(usr);
+ who = Srv->FindNick(usr);
if (who)
{
Srv->JoinUserToChannel(who,channel,key);
@@ -553,12 +554,9 @@ class TreeSocket : public InspSocket
}
// there werent enough modes built up to flush it during FJOIN,
// or, there are a number left over. flush them out.
- if (modectr > 2)
+ if ((modectr > 2) && (who))
{
- userrec* who = new userrec;
- who->fd = FD_MAGIC_NUMBER;
Srv->SendMode(mode_users,modectr,who);
- delete who;
}
DoOneToAllButSender(source,"FJOIN",params,source);
return true;