summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2010-10-31 21:46:23 -0400
committerAdam <Adam@anope.org>2010-10-31 21:46:23 -0400
commit9db85375ee831885aceeba9e61b118ac7c4247a7 (patch)
tree48893813dc20700c8d4e7a31aa3c7df598485bed
parente3f368f67b95438f39c0f459505af0e19ad364ad (diff)
Made ns_set_misc work
-rw-r--r--data/example.conf2
-rw-r--r--modules/extra/ns_set_misc.cpp27
2 files changed, 7 insertions, 22 deletions
diff --git a/data/example.conf b/data/example.conf
index 0a3a7e398..0b0c1abcd 100644
--- a/data/example.conf
+++ b/data/example.conf
@@ -1692,7 +1692,7 @@ cs_set_misc
}
cs_set_misc
{
- name = "EMail"
+ name = "EMAIL"
desc = "Associate an EMail with the channel"
}
diff --git a/modules/extra/ns_set_misc.cpp b/modules/extra/ns_set_misc.cpp
index af2175e81..71ba9834f 100644
--- a/modules/extra/ns_set_misc.cpp
+++ b/modules/extra/ns_set_misc.cpp
@@ -18,8 +18,12 @@ class CommandNSSetMisc : public Command
private:
Anope::string Desc;
- protected:
- CommandReturn RealExecute(User *u, const std::vector<Anope::string> &params)
+ public:
+ CommandNSSetMisc(const Anope::string &cname, const Anope::string &desc, const Anope::string &cpermission = "") : Command(cname, 1, 2, cpermission), Desc(desc)
+ {
+ }
+
+ CommandReturn Execute(User *u, const std::vector<Anope::string> &params)
{
NickAlias *na = findnick(params[0]);
if (!na)
@@ -38,18 +42,6 @@ class CommandNSSetMisc : public Command
return MOD_CONT;
}
- public:
- CommandNSSetMisc(const Anope::string &cname, const Anope::string &desc, const Anope::string &cpermission = "") : Command(cname, 0, 1, cpermission), Desc(desc)
- {
- }
-
- CommandReturn Execute(User *u, const std::vector<Anope::string> &params)
- {
- std::vector<Anope::string> realparams = params;
- realparams.insert(realparams.begin(), u->Account()->display);
- return RealExecute(u, realparams);
- }
-
void OnSyntaxError(User *u, const Anope::string &)
{
SyntaxError(NickServ, u, "SET", NICK_SET_SYNTAX);
@@ -66,13 +58,6 @@ class CommandNSSASetMisc : public CommandNSSetMisc
public:
CommandNSSASetMisc(const Anope::string &cname, const Anope::string &desc) : CommandNSSetMisc(cname, desc, "nickserv/saset/" + cname)
{
- this->MinParams = 1;
- this->MaxParams = 2;
- }
-
- CommandReturn Execute(User *u, const std::vector<Anope::string> &params)
- {
- return RealExecute(u, params);
}
void OnSyntaxError(User *u, const Anope::string &)