diff options
author | Adam <Adam@anope.org> | 2013-04-11 00:20:24 -0500 |
---|---|---|
committer | Adam <Adam@anope.org> | 2013-04-11 00:20:24 -0500 |
commit | cb64d806c164be33bf26ba300c0a15c130b91a15 (patch) | |
tree | 6eaca4f695ea84ce30bcf4f918476c79c6f3d313 | |
parent | 4f9b7874d6b3a41939ecc2e872ec08d03af7b5f1 (diff) |
Remove the need for having to set syntax to "" for commands with no syntax
-rw-r--r-- | include/commands.h | 1 | ||||
-rw-r--r-- | modules/commands/bs_botlist.cpp | 1 | ||||
-rw-r--r-- | modules/commands/cs_fantasy_top.cpp | 2 | ||||
-rw-r--r-- | modules/commands/hs_group.cpp | 1 | ||||
-rw-r--r-- | modules/commands/hs_off.cpp | 1 | ||||
-rw-r--r-- | modules/commands/hs_on.cpp | 1 | ||||
-rw-r--r-- | modules/commands/hs_request.cpp | 1 | ||||
-rw-r--r-- | modules/commands/ns_register.cpp | 1 | ||||
-rw-r--r-- | modules/commands/ns_update.cpp | 1 | ||||
-rw-r--r-- | modules/commands/os_login.cpp | 1 | ||||
-rw-r--r-- | modules/commands/os_reload.cpp | 1 | ||||
-rw-r--r-- | modules/commands/os_shutdown.cpp | 3 | ||||
-rw-r--r-- | modules/commands/os_update.cpp | 1 | ||||
-rw-r--r-- | src/command.cpp | 8 |
14 files changed, 2 insertions, 22 deletions
diff --git a/include/commands.h b/include/commands.h index b74639a32..d4de074fe 100644 --- a/include/commands.h +++ b/include/commands.h @@ -126,7 +126,6 @@ class CoreExport Command : public Service void ClearSyntax(); void SetSyntax(const Anope::string &s); void SendSyntax(CommandSource &); - void SendSyntax(CommandSource &, const Anope::string &syntax); void AllowUnregistered(bool b); void RequireUser(bool b); diff --git a/modules/commands/bs_botlist.cpp b/modules/commands/bs_botlist.cpp index 9eac75e88..e682bd47d 100644 --- a/modules/commands/bs_botlist.cpp +++ b/modules/commands/bs_botlist.cpp @@ -19,7 +19,6 @@ class CommandBSBotList : public Command CommandBSBotList(Module *creator) : Command(creator, "botserv/botlist", 0, 0) { this->SetDesc(_("Lists available bots")); - this->SetSyntax(""); } void Execute(CommandSource &source, const std::vector<Anope::string> ¶ms) anope_override diff --git a/modules/commands/cs_fantasy_top.cpp b/modules/commands/cs_fantasy_top.cpp index 4bad46e51..2f445028b 100644 --- a/modules/commands/cs_fantasy_top.cpp +++ b/modules/commands/cs_fantasy_top.cpp @@ -62,7 +62,6 @@ class CommandCSGTop : public Command CommandCSGTop(Module *creator) : Command (creator, "chanserv/gtop", 0, 1) { this->SetDesc(_("Displays the top 3 users of the network")); - this->SetSyntax(""); } void Execute(CommandSource &source, const std::vector<Anope::string> ¶ms); @@ -74,7 +73,6 @@ class CommandCSGTop10 : public Command CommandCSGTop10(Module *creator) : Command (creator, "chanserv/gtop10", 0, 1) { this->SetDesc(_("Displays the top 10 users of the network")); - this->SetSyntax(""); } void Execute(CommandSource &source, const std::vector<Anope::string> ¶ms); diff --git a/modules/commands/hs_group.cpp b/modules/commands/hs_group.cpp index 9f7b41d57..13062fc9e 100644 --- a/modules/commands/hs_group.cpp +++ b/modules/commands/hs_group.cpp @@ -32,7 +32,6 @@ class CommandHSGroup : public Command CommandHSGroup(Module *creator) : Command(creator, "hostserv/group", 0, 0) { this->SetDesc(_("Syncs the vhost for all nicks in a group")); - this->SetSyntax(""); } void Execute(CommandSource &source, const std::vector<Anope::string> ¶ms) anope_override diff --git a/modules/commands/hs_off.cpp b/modules/commands/hs_off.cpp index ad79dfadc..13a64c9d9 100644 --- a/modules/commands/hs_off.cpp +++ b/modules/commands/hs_off.cpp @@ -19,7 +19,6 @@ class CommandHSOff : public Command CommandHSOff(Module *creator) : Command(creator, "hostserv/off", 0, 0) { this->SetDesc(_("Deactivates your assigned vhost")); - this->SetSyntax(""); this->RequireUser(true); } diff --git a/modules/commands/hs_on.cpp b/modules/commands/hs_on.cpp index 9f33ac6ac..fb3ca1396 100644 --- a/modules/commands/hs_on.cpp +++ b/modules/commands/hs_on.cpp @@ -19,7 +19,6 @@ class CommandHSOn : public Command CommandHSOn(Module *creator) : Command(creator, "hostserv/on", 0, 0) { this->SetDesc(_("Activates your assigned vhost")); - this->SetSyntax(""); this->RequireUser(true); } diff --git a/modules/commands/hs_request.cpp b/modules/commands/hs_request.cpp index 8b551f0ed..1e8f2aa82 100644 --- a/modules/commands/hs_request.cpp +++ b/modules/commands/hs_request.cpp @@ -321,7 +321,6 @@ class CommandHSWaiting : public Command CommandHSWaiting(Module *creator) : Command(creator, "hostserv/waiting", 0, 0) { this->SetDesc(_("Retrieves the vhost requests")); - this->SetSyntax(""); } void Execute(CommandSource &source, const std::vector<Anope::string> ¶ms) anope_override diff --git a/modules/commands/ns_register.cpp b/modules/commands/ns_register.cpp index af7853c5a..49e6a84d9 100644 --- a/modules/commands/ns_register.cpp +++ b/modules/commands/ns_register.cpp @@ -285,7 +285,6 @@ class CommandNSResend : public Command public: CommandNSResend(Module *creator) : Command(creator, "nickserv/resend", 0, 0) { - this->SetSyntax(""); } void Execute(CommandSource &source, const std::vector<Anope::string> ¶ms) anope_override diff --git a/modules/commands/ns_update.cpp b/modules/commands/ns_update.cpp index 7acbd8aef..115d4f2b9 100644 --- a/modules/commands/ns_update.cpp +++ b/modules/commands/ns_update.cpp @@ -19,7 +19,6 @@ class CommandNSUpdate : public Command CommandNSUpdate(Module *creator) : Command(creator, "nickserv/update", 0, 0) { this->SetDesc(_("Updates your current status, i.e. it checks for new memos")); - this->SetSyntax(""); this->RequireUser(true); } diff --git a/modules/commands/os_login.cpp b/modules/commands/os_login.cpp index f1fc823c1..36d772aa2 100644 --- a/modules/commands/os_login.cpp +++ b/modules/commands/os_login.cpp @@ -68,7 +68,6 @@ class CommandOSLogout : public Command CommandOSLogout(Module *creator) : Command(creator, "operserv/logout", 0, 0) { this->SetDesc(Anope::printf(_("Logout from %s"), Config->OperServ.c_str())); - this->SetSyntax(""); this->RequireUser(true); } diff --git a/modules/commands/os_reload.cpp b/modules/commands/os_reload.cpp index fcf3868fa..00e649ed7 100644 --- a/modules/commands/os_reload.cpp +++ b/modules/commands/os_reload.cpp @@ -19,7 +19,6 @@ class CommandOSReload : public Command CommandOSReload(Module *creator) : Command(creator, "operserv/reload", 0, 0) { this->SetDesc(_("Reload services' configuration file")); - this->SetSyntax(""); } void Execute(CommandSource &source, const std::vector<Anope::string> ¶ms) anope_override diff --git a/modules/commands/os_shutdown.cpp b/modules/commands/os_shutdown.cpp index a658441b3..833c78491 100644 --- a/modules/commands/os_shutdown.cpp +++ b/modules/commands/os_shutdown.cpp @@ -19,7 +19,6 @@ class CommandOSQuit : public Command CommandOSQuit(Module *creator) : Command(creator, "operserv/quit", 0, 0) { this->SetDesc(_("Terminate Services WITHOUT saving")); - this->SetSyntax(""); } void Execute(CommandSource &source, const std::vector<Anope::string> ¶ms) anope_override @@ -47,7 +46,6 @@ class CommandOSRestart : public Command CommandOSRestart(Module *creator) : Command(creator, "operserv/restart", 0, 0) { this->SetDesc(_("Save databases and restart Services")); - this->SetSyntax(""); } void Execute(CommandSource &source, const std::vector<Anope::string> ¶ms) anope_override @@ -73,7 +71,6 @@ class CommandOSShutdown : public Command CommandOSShutdown(Module *creator) : Command(creator, "operserv/shutdown", 0, 0) { this->SetDesc(_("Terminate services with save")); - this->SetSyntax(""); } void Execute(CommandSource &source, const std::vector<Anope::string> ¶ms) anope_override diff --git a/modules/commands/os_update.cpp b/modules/commands/os_update.cpp index bedb835b7..bce2feeed 100644 --- a/modules/commands/os_update.cpp +++ b/modules/commands/os_update.cpp @@ -19,7 +19,6 @@ class CommandOSUpdate : public Command CommandOSUpdate(Module *creator) : Command(creator, "operserv/update", 0, 0) { this->SetDesc(_("Force the Services databases to be updated immediately")); - this->SetSyntax(""); } void Execute(CommandSource &source, const std::vector<Anope::string> ¶ms) anope_override diff --git a/src/command.cpp b/src/command.cpp index 9d058fefb..a724145e1 100644 --- a/src/command.cpp +++ b/src/command.cpp @@ -150,12 +150,8 @@ void Command::SendSyntax(CommandSource &source) for (unsigned i = 1, j = this->syntax.size(); i < j; ++i) source.Reply(" \002%s %s\002", source.command.c_str(), this->syntax[i].c_str()); } -} - -void Command::SendSyntax(CommandSource &source, const Anope::string &syn) -{ - source.Reply(_("Syntax: \002%s %s\002"), source.command.c_str(), syn.c_str()); - source.Reply(MORE_INFO, Config->UseStrictPrivMsgString.c_str(), source.service->nick.c_str(), source.command.c_str()); + else + source.Reply(_("Syntax: \002%s\002"), source.command.c_str()); } bool Command::AllowUnregistered() const |