summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_spanningtree.cpp7
1 files changed, 6 insertions, 1 deletions
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;
}