summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrburchell <rburchell@5417fbe8-f217-4b02-8779-1006273d7864>2009-02-10 21:16:00 +0000
committerrburchell <rburchell@5417fbe8-f217-4b02-8779-1006273d7864>2009-02-10 21:16:00 +0000
commitb1ee732713a2e0b4dd96d1c14b1ccfe21160df83 (patch)
tree6c3fe44eccd53982a275dce76d03c3c413a64093 /src
parentef9f97fa05c195b4c49b272bcbfc608247421fb2 (diff)
Few fixes.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1987 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src')
-rw-r--r--src/core/os_admin.c7
-rw-r--r--src/core/os_akill.c9
-rw-r--r--src/operserv.c2
3 files changed, 12 insertions, 6 deletions
diff --git a/src/core/os_admin.c b/src/core/os_admin.c
index fcf3e05f7..ad7f6130b 100644
--- a/src/core/os_admin.c
+++ b/src/core/os_admin.c
@@ -24,6 +24,7 @@ class CommandOSAdmin : public Command
private:
CommandReturn DoAdd(User *u, std::vector<std::string> &params)
{
+ NickAlias *na;
const char *nick = params.size() > 1 ? params[1].c_str() : NULL;
int res = 0;
@@ -87,6 +88,7 @@ class CommandOSAdmin : public Command
CommandReturn DoDel(User *u, std::vector<std::string> &params)
{
const char *nick = params.size() > 1 ? params[1].c_str() : NULL;
+ NickAlias *na;
int res = 0;
if (!nick)
@@ -232,6 +234,11 @@ class CommandOSAdmin : public Command
this->OnSyntaxError(u);
return MOD_CONT;
}
+
+ void OnSyntaxError(User *u)
+ {
+ syntax_error(s_OperServ, u, "ADMIN", OPER_ADMIN_SYNTAX);
+ }
};
class OSAdmin : public Module
diff --git a/src/core/os_akill.c b/src/core/os_akill.c
index 93178d4bc..d2ff92b7e 100644
--- a/src/core/os_akill.c
+++ b/src/core/os_akill.c
@@ -61,7 +61,7 @@ class CommandOSAKill : public Command
this->OnSyntaxError(u);
return MOD_CONT;
}
- snprintf(reason, sizeof(reason), "%s%s%s", params[last_param].c_str(), last_param == 2 ? " " : "", last_param == 2 ? param[3].c_str() : "");
+ snprintf(reason, sizeof(reason), "%s%s%s", params[last_param].c_str(), last_param == 2 ? " " : "", last_param == 2 ? params[3].c_str() : "");
if (mask && *reason) {
/* We first do some sanity check on the proposed mask. */
if (strchr(mask, '!'))
@@ -106,7 +106,7 @@ class CommandOSAKill : public Command
else
{
int wall_expiry = expires - time(NULL);
- char *s = NULL;
+ const char *s = NULL;
if (wall_expiry >= 86400)
{
@@ -144,7 +144,7 @@ class CommandOSAKill : public Command
const char *mask;
int res = 0;
- mask = params.size() > 1 ? params[1].c_str();
+ mask = params.size() > 1 ? params[1].c_str() : NULL;
if (!mask)
{
@@ -174,7 +174,7 @@ class CommandOSAKill : public Command
}
else
{
- if ((res = slist_indexof(&akills, mask)) == -1)
+ if ((res = slist_indexof(&akills, (void *)mask)) == -1)
{
notice_lang(s_OperServ, u, OPER_AKILL_NOT_FOUND, mask);
return MOD_CONT;
@@ -291,7 +291,6 @@ class CommandOSAKill : public Command
CommandReturn Execute(User *u, std::vector<std::string> &params)
{
const char *cmd = params[0].c_str();
- char breason[BUFSIZE];
if (!stricmp(cmd, "ADD"))
return this->DoAdd(u, params);
diff --git a/src/operserv.c b/src/operserv.c
index 1d8f2a5f6..1b05aa84e 100644
--- a/src/operserv.c
+++ b/src/operserv.c
@@ -490,7 +490,7 @@ void oper_global(char *nick, const char *fmt, ...)
* The success result is the number of AKILLs that were deleted to successfully add one.
*/
-int add_akill(User * u, char *mask, const char *by, const time_t expires,
+int add_akill(User * u, const char *mask, const char *by, const time_t expires,
const char *reason)
{
int deleted = 0, i;