diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/core/os_oper.c | 3 | ||||
-rw-r--r-- | src/core/os_raw.c | 6 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/core/os_oper.c b/src/core/os_oper.c index cd6c23184..6a6ee65cc 100644 --- a/src/core/os_oper.c +++ b/src/core/os_oper.c @@ -24,7 +24,7 @@ class CommandOSOper : public Command private: CommandReturn DoAdd(User *u, std::vector<std::string> ¶ms) { - const char *nick = param.size() > 1 ? params[1].c_str() : NULL; + const char *nick = params.size() > 1 ? params[1].c_str() : NULL; NickAlias *na; int res = 0; @@ -156,6 +156,7 @@ class CommandOSOper : public Command { int sent_header = 0; const char *nick = params.size() > 1 ? params[1].c_str() : NULL; + int res = 0; if (!is_oper(u)) { diff --git a/src/core/os_raw.c b/src/core/os_raw.c index f7b810845..dd655c109 100644 --- a/src/core/os_raw.c +++ b/src/core/os_raw.c @@ -14,6 +14,7 @@ /*************************************************************************/ #include "module.h" +#include "hashcomp.h" class CommandOSRaw : public Command { @@ -30,7 +31,7 @@ class CommandOSRaw : public Command { std::string kw; spacesepstream textsep(text); - while (textsep.GetString(kw) && kw[0] == ':'); + while (textsep.GetToken(kw) && kw[0] == ':'); ircdproto->SendGlobops(s_OperServ, "\2%s\2 used RAW command for \2%s\2", u->nick, !kw.empty() ? kw.c_str() : "\2non RFC compliant message\2"); } alog("%s used RAW command for %s", u->nick, text); @@ -63,8 +64,7 @@ class OSRaw : public Module this->SetVersion("$Id$"); this->SetType(THIRD); - c = createCommand("RAW", do_raw, is_services_root, OPER_HELP_RAW, -1, -1, -1, -1); - this->AddCommand(OPERSERV, c, MOD_UNIQUE); + this->AddCommand(OPERSERV, new CommandOSRaw(), MOD_UNIQUE); if (DisableRaw) throw ModuleException("os_raw: Not loading because you probably shouldn't be loading me"); |