From abbe621da60b30a1edf6f145159bd7403feb0e85 Mon Sep 17 00:00:00 2001 From: brain Date: Sun, 27 Aug 2006 02:39:35 +0000 Subject: Fixes for w00t, now its boo time :) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5032 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_spanningtree.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp index 3ad091b71..a61791c43 100644 --- a/src/modules/m_spanningtree.cpp +++ b/src/modules/m_spanningtree.cpp @@ -1417,7 +1417,7 @@ class TreeSocket : public InspSocket /* Did they get any modes? How many times? */ for (int k = 0; k < ntimes; k++) - mode_users[modectr++] = usr; + mode_users[modectr++] = strdup(usr); // XXX who = this->Instance->FindNick(usr); if (who) @@ -1460,6 +1460,8 @@ class TreeSocket : public InspSocket DoOneToMany(this->Instance->Config->ServerName,"FMODE",params); } strcpy(mode_users[1],"+"); + for (unsigned int f = 2; f < modectr; f++) + free(mode_users[f]); modectr = 2; } } @@ -1496,6 +1498,9 @@ class TreeSocket : public InspSocket } DoOneToMany(this->Instance->Config->ServerName,"FMODE",params); } + + for (unsigned int f = 2; f < modectr; f++) + free(mode_users[f]); } return true; } -- cgit v1.2.3