summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrburchell <rburchell@5417fbe8-f217-4b02-8779-1006273d7864>2009-02-10 21:46:57 +0000
committerrburchell <rburchell@5417fbe8-f217-4b02-8779-1006273d7864>2009-02-10 21:46:57 +0000
commit2e08b60cf77d1ef4ab9e34b42ecb0b35454fae31 (patch)
treebc6fb6cab803421362ec0a53989f275da3e01796 /src
parent7d58ed17c70e8a052326860222fc2bea40f89a8e (diff)
Fixes.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1990 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src')
-rw-r--r--src/core/os_oper.c3
-rw-r--r--src/core/os_raw.c6
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> &params)
{
- 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");