diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-06-14 17:39:38 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-06-14 17:39:38 +0000 |
commit | c5c4ed7ed13b4322fd647590e615ef0aeb5033e5 (patch) | |
tree | 8a1156cb68a12eef108a47c6d1a9fd4c88ff51c7 | |
parent | f1b08a52046923cf328d6c6d0640c21c0c360e63 (diff) |
This should fix bug #317, we shouldnt be using send_mode for user modes, we should use send_mode_explicit spanningtree event
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7306 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r-- | src/modules/m_opermodes.cpp | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/src/modules/m_opermodes.cpp b/src/modules/m_opermodes.cpp index 25c1b4fe6..a8aa615cf 100644 --- a/src/modules/m_opermodes.cpp +++ b/src/modules/m_opermodes.cpp @@ -80,28 +80,24 @@ class ModuleModesOnOper : public Module tokens.push_back(buf); int size = tokens.size() + 1; - char** modes = new char*[size]; + const char** modes = new const char*[size]; modes[0] = user->nick; - modes[1] = (char*)tokens[0].c_str(); - if (tokens.size() > 1) + // process mode params + int i = 1; + for (unsigned int k = 1; k < tokens.size(); k++) { - // process mode params - int i = 2; - for (unsigned int k = 1; k < tokens.size(); k++) - { - modes[i] = (char*)tokens[k].c_str(); - i++; - } + modes[i] = tokens[k].c_str(); + i++; } + std::deque<std::string> n; - Event rmode((char *)&n, NULL, "send_mode"); + Event rmode((char *)&n, NULL, "send_mode_explicit"); for (unsigned int j = 0; j < tokens.size(); j++) - { n.push_back(modes[j]); - } + rmode.Send(ServerInstance); - ServerInstance->SendMode((const char**)modes, size, user); + ServerInstance->SendMode(modes, size, user); delete [] modes; } break; |