diff options
author | rburchell <rburchell@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-02-10 21:16:20 +0000 |
---|---|---|
committer | rburchell <rburchell@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-02-10 21:16:20 +0000 |
commit | 79f09ed15791a532eb8d2211f7b126f4bcdff7c1 (patch) | |
tree | 9753e8d0baf7484a0af6d7231e6f2f6212d9d11a /src | |
parent | b1ee732713a2e0b4dd96d1c14b1ccfe21160df83 (diff) |
Various fixes.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1988 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src')
-rw-r--r-- | src/core/os_chankill.c | 8 | ||||
-rw-r--r-- | src/core/os_chanlist.c | 6 | ||||
-rw-r--r-- | src/core/os_defcon.c | 4 | ||||
-rw-r--r-- | src/core/os_ignore.c | 9 | ||||
-rw-r--r-- | src/core/os_mode.c | 4 |
5 files changed, 17 insertions, 14 deletions
diff --git a/src/core/os_chankill.c b/src/core/os_chankill.c index ce2f3b7b0..1c0a8372c 100644 --- a/src/core/os_chankill.c +++ b/src/core/os_chankill.c @@ -29,7 +29,6 @@ class CommandOSChanKill : public Command const char *expiry, *channel; char reason[BUFSIZE]; time_t expires; - char breason[BUFSIZE]; char mask[USERMAX + HOSTMAX + 2]; struct c_userlist *cu, *next; int last_param = 1; @@ -61,7 +60,7 @@ class CommandOSChanKill : public Command this->OnSyntaxError(u); return MOD_CONT; } - snprintf(reason, sizeof(reason), "%s%s%s", params[last_param].c_str(), last_param == 1 ? " " : "", last_param == 1 ? param[2].c_str() : ""); + snprintf(reason, sizeof(reason), "%s%s%s", params[last_param].c_str(), last_param == 1 ? " " : "", last_param == 1 ? params[2].c_str() : ""); if (*reason) { @@ -88,6 +87,11 @@ class CommandOSChanKill : public Command } return MOD_CONT; } + + void OnSyntaxError(User *u) + { + syntax_error(s_OperServ, u, "CHANKILL", OPER_CHANKILL_SYNTAX); + } }; class OSChanKill : public Module diff --git a/src/core/os_chanlist.c b/src/core/os_chanlist.c index b3fb30489..922653627 100644 --- a/src/core/os_chanlist.c +++ b/src/core/os_chanlist.c @@ -26,8 +26,8 @@ class CommandOSChanList : public Command CommandReturn Execute(User *u, std::vector<std::string> ¶ms) { - char *pattern = params.size() > 0 ? params[0].c_str() : NULL; - char *opt = params.size() > 1 ? params[1].c_str() : NULL; + const char *pattern = params.size() > 0 ? params[0].c_str() : NULL; + const char *opt = params.size() > 1 ? params[1].c_str() : NULL; int modes = 0; User *u2; @@ -77,7 +77,7 @@ class CommandOSChanList : public Command if (!is_services_oper(u)) return false; - notice_lang(s_OperServ, u, OPER_HELP_CHAN_LIST); + notice_lang(s_OperServ, u, OPER_HELP_CHANLIST); return true; } }; diff --git a/src/core/os_defcon.c b/src/core/os_defcon.c index edfec8580..484535972 100644 --- a/src/core/os_defcon.c +++ b/src/core/os_defcon.c @@ -28,9 +28,9 @@ class CommandOSDEFCON : public Command CommandReturn Execute(User *u, std::vector<std::string> ¶ms) { - char *lvl = params[0].c_str(); + const char *lvl = params[0].c_str(); int newLevel = 0; - char *langglobal = getstring(NULL, DEFCON_GLOBAL); + const char *langglobal = getstring(NULL, DEFCON_GLOBAL); if (!DefConLevel) /* If we dont have a .conf setting! */ { diff --git a/src/core/os_ignore.c b/src/core/os_ignore.c index b76de379b..294023b3a 100644 --- a/src/core/os_ignore.c +++ b/src/core/os_ignore.c @@ -22,8 +22,8 @@ class CommandOSIgnore : public Command private: CommandReturn DoAdd(User *u, std::vector<std::string> ¶ms) { - char *time = params.size() > 1 ? params[1].c_str() : NULL; - char *nick = params.size() > 2 ? params[2].c_str() : NULL; + const char *time = params.size() > 1 ? params[1].c_str() : NULL; + const char *nick = params.size() > 2 ? params[2].c_str() : NULL; int t; if (!time || !nick) @@ -74,7 +74,7 @@ class CommandOSIgnore : public Command CommandReturn DoDel(User *u, std::vector<std::string> ¶ms) { - char *nick = params.size() > 1 ? params[1].c_str() : NULL; + const char *nick = params.size() > 1 ? params[1].c_str() : NULL; if (!nick) this->OnSyntaxError(u); else @@ -105,7 +105,6 @@ class CommandOSIgnore : public Command CommandReturn Execute(User *u, std::vector<std::string> ¶ms) { const char *cmd = params[0].c_str(); - int t; if (!stricmp(cmd, "ADD")) return this->DoAdd(u, params); @@ -114,7 +113,7 @@ class CommandOSIgnore : public Command else if (!stricmp(cmd, "DEL")) return this->DoDel(u, params); else if (!stricmp(cmd, "CLEAR")) - return this->DoCelar(u, params); + return this->DoClear(u, params); else this->OnSyntaxError(u); diff --git a/src/core/os_mode.c b/src/core/os_mode.c index d0c8b518a..a09d2bf01 100644 --- a/src/core/os_mode.c +++ b/src/core/os_mode.c @@ -28,7 +28,7 @@ class CommandOSMode : public Command { int ac; const char **av; - char *chan = params[0].c_str(), *modes = params[1].c_str(); + const char *chan = params[0].c_str(), *modes = params[1].c_str(); Channel *c; if (!(c = findchan(chan))) @@ -41,7 +41,7 @@ class CommandOSMode : public Command { ircdproto->SendMode(findbot(s_OperServ), chan, "%s", modes); - ac = split_buf(modes, &av, 1); + ac = split_buf((char *)modes, &av, 1); chan_set_modes(s_OperServ, c, ac, av, -1); free(av); |