summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrburchell <rburchell@5417fbe8-f217-4b02-8779-1006273d7864>2009-02-10 19:34:03 +0000
committerrburchell <rburchell@5417fbe8-f217-4b02-8779-1006273d7864>2009-02-10 19:34:03 +0000
commit1ed7d17b5dbcfae87cee82e7611ddd866b3427ea (patch)
tree6a8f88e909092b9442c3810b77f19bcb7eb4320d /src
parentb48c18b0117b7d49c834202c88e70b02b633bb9e (diff)
Various compile fixes.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1982 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src')
-rw-r--r--src/core/ms_set.c24
-rw-r--r--src/core/ms_staff.c2
-rw-r--r--src/core/ns_access.c14
-rw-r--r--src/core/ns_alist.c2
-rw-r--r--src/core/ns_forbid.c2
5 files changed, 25 insertions, 19 deletions
diff --git a/src/core/ms_set.c b/src/core/ms_set.c
index 7af25c01f..73e1faf45 100644
--- a/src/core/ms_set.c
+++ b/src/core/ms_set.c
@@ -20,9 +20,9 @@ void myMemoServHelp(User *u);
class CommandMSSet : public Command
{
private:
- CommandReturn DoNotify(User *u, std::vector<std::string> &params, MemoInfo &mi)
+ CommandReturn DoNotify(User *u, std::vector<std::string> &params, MemoInfo *mi)
{
- const char *params = params[1].c_str();
+ const char *param = params[1].c_str();
if (!stricmp(param, "ON"))
{
@@ -66,7 +66,7 @@ class CommandMSSet : public Command
return MOD_CONT;
}
- CommandReturn DoLimit(User *u, std::vector<std::string> &params)
+ CommandReturn DoLimit(User *u, std::vector<std::string> &params, MemoInfo *mi)
{
const char *p1 = params[1].c_str();
const char *p2 = params.size() > 2 ? params[2].c_str() : NULL;
@@ -236,13 +236,17 @@ class CommandMSSet : public Command
bool OnHelp(User *u, const std::string &subcommand)
{
- // This needs to change XXX
- notice_lang(s_MemoServ, u, MEMO_HELP_SET);
- notice_lang(s_MemoServ, u, MEMO_HELP_SET_NOTIFY);
- notice_lang(s_MemoServ, u, MEMO_HELP_SET_LIMIT, MSMaxMemos);
-
- if (is_services_oper(u))
- notice_lang(s_MemoServ, u, MEMO_SERVADMIN_HELP_SET_LIMIT, MSMaxMemos);
+ if (subcommand.empty())
+ notice_lang(s_MemoServ, u, MEMO_HELP_SET);
+ else if (subcommand == "NOTIFY")
+ notice_lang(s_MemoServ, u, MEMO_HELP_SET_NOTIFY);
+ else if (subcommand == "LIMIT")
+ {
+ if (is_services_oper(u))
+ notice_lang(s_MemoServ, u, MEMO_SERVADMIN_HELP_SET_LIMIT, MSMaxMemos);
+ else
+ notice_lang(s_MemoServ, u, MEMO_HELP_SET_LIMIT, MSMaxMemos);
+ }
return true;
}
diff --git a/src/core/ms_staff.c b/src/core/ms_staff.c
index 83642ead8..5abf6f6b8 100644
--- a/src/core/ms_staff.c
+++ b/src/core/ms_staff.c
@@ -24,7 +24,7 @@ class CommandMSStaff : public Command
{
}
- CommandReturn Execute(User *u, std::vecyor<std::string> &params)
+ CommandReturn Execute(User *u, std::vector<std::string> &params)
{
NickCore *nc;
int i, z = 0;
diff --git a/src/core/ns_access.c b/src/core/ns_access.c
index a6532b7f4..07fce81a4 100644
--- a/src/core/ns_access.c
+++ b/src/core/ns_access.c
@@ -20,7 +20,7 @@ void myNickServHelp(User *u);
class CommandNSAccess : public Command
{
private:
- CommandReturn DoServAdminList(User *u, std::vector<std::string> &params)
+ CommandReturn DoServAdminList(User *u, std::vector<std::string> &params, NickAlias *na)
{
const char *mask = params.size() > 2 ? params[2].c_str() : NULL;
char **access;
@@ -55,7 +55,7 @@ class CommandNSAccess : public Command
return MOD_CONT;
}
- CommandReturn DoAdd(User *u, std::vector<std::string> &params, const char *mask)
+ CommandReturn DoAdd(User *u, std::vector<std::string> &params, NickAlias *na, const char *mask)
{
char **access;
int i;
@@ -89,7 +89,7 @@ class CommandNSAccess : public Command
return MOD_CONT;
}
- CommandReturn DoDel(User *u, std::vector<std::string> &params, const char *mask)
+ CommandReturn DoDel(User *u, std::vector<std::string> &params, NickAlias *na, const char *mask)
{
char **access;
int i;
@@ -127,7 +127,7 @@ class CommandNSAccess : public Command
return MOD_CONT;
}
- CommandReturn DoList(User *u, std::vector<std::string> *params, const char *mask)
+ CommandReturn DoList(User *u, std::vector<std::string> &params, NickAlias *na, const char *mask)
{
char **access;
int i;
@@ -177,11 +177,11 @@ class CommandNSAccess : public Command
else if (!nick_identified(u))
notice_lang(s_NickServ, u, NICK_IDENTIFY_REQUIRED, s_NickServ);
else if (!stricmp(cmd, "ADD"))
- return this->DoAdd(u, params, mask);
+ return this->DoAdd(u, params, na, mask);
else if (!stricmp(cmd, "DEL"))
- return this->DoDel(u, params, mask);
+ return this->DoDel(u, params, na, mask);
else if (!stricmp(cmd, "LIST"))
- return thus->DoList(u, params, mask);
+ return this->DoList(u, params, na, mask);
else
this->OnSyntaxError(u);
return MOD_CONT;
diff --git a/src/core/ns_alist.c b/src/core/ns_alist.c
index 1c1ffd2b6..f9015c6c0 100644
--- a/src/core/ns_alist.c
+++ b/src/core/ns_alist.c
@@ -138,6 +138,8 @@ class CommandNSAList : public Command
notice_lang(s_NickServ, u, NICK_SERVADMIN_HELP_ALIST);
else
notice_lang(s_NickServ, u, NICK_HELP_ALIST);
+
+ return true;
}
};
diff --git a/src/core/ns_forbid.c b/src/core/ns_forbid.c
index 88ec3d547..8d80df4cf 100644
--- a/src/core/ns_forbid.c
+++ b/src/core/ns_forbid.c
@@ -29,7 +29,7 @@ class CommandNSForbid : public Command
{
NickAlias *na;
const char *nick = params[0].c_str();
- const char *reason = params.size() > 1 ? params[1].c_str();
+ const char *reason = params.size() > 1 ? params[1].c_str() : NULL;
/* Assumes that permission checking has already been done. */
if (ForceForbidReason && !reason) {