summaryrefslogtreecommitdiff
path: root/modules/commands
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2013-05-17 22:53:55 -0400
committerAdam <Adam@anope.org>2013-05-17 22:53:55 -0400
commitcc4a14b0badfe3d617ec2dd230d7921f8650a069 (patch)
tree73ded53114ee7b100c548bdb448a6cc36b392da8 /modules/commands
parent934b5843744e586ce9a3c7725a19c7ddffe14ee8 (diff)
Removed some hard coded command names in help output
Diffstat (limited to 'modules/commands')
-rw-r--r--modules/commands/cs_access.cpp10
-rw-r--r--modules/commands/cs_register.cpp16
-rw-r--r--modules/commands/cs_set.cpp15
-rw-r--r--modules/commands/cs_xop.cpp21
-rw-r--r--modules/commands/ms_read.cpp15
-rw-r--r--modules/commands/ns_group.cpp2
-rw-r--r--modules/commands/ns_register.cpp5
-rw-r--r--modules/commands/ns_set.cpp22
8 files changed, 68 insertions, 38 deletions
diff --git a/modules/commands/cs_access.cpp b/modules/commands/cs_access.cpp
index 88dd751c3..f8356b383 100644
--- a/modules/commands/cs_access.cpp
+++ b/modules/commands/cs_access.cpp
@@ -554,9 +554,13 @@ class CommandCSAccess : public Command
"The \002ACCESS CLEAR\002 command clears all entries of the\n"
"access list."));
source.Reply(" ");
- source.Reply(_("\002User access levels\002 can be seen by using the\n"
- "\002LEVELS\002 command; type \002%s%s HELP LEVELS\002 for\n"
- "information."), source.service->nick.c_str(), Config->StrictPrivmsg.c_str(), source.service->nick.c_str());
+
+ BotInfo *bi;
+ Anope::string cmd;
+ if (Command::FindCommandFromService("chanserv/levels", bi, cmd))
+ source.Reply(_("\002User access levels\002 can be seen by using the\n"
+ "\002%s\002 command; type \002%s%s HELP LEVELS\002 for\n"
+ "information."), cmd.c_str(), Config->StrictPrivmsg.c_str(), bi->nick.c_str());
return true;
}
};
diff --git a/modules/commands/cs_register.cpp b/modules/commands/cs_register.cpp
index feeb605bc..ff2fbf69c 100644
--- a/modules/commands/cs_register.cpp
+++ b/modules/commands/cs_register.cpp
@@ -103,14 +103,16 @@ class CommandCSRegister : public Command
"\"founder\" of the channel. The channel founder is allowed\n"
"to change all of the channel settings for the channel;\n"
"%s will also automatically give the founder\n"
- "channel-operator privileges when s/he enters the channel.\n"
- "See the \002ACCESS\002 command (\002%s%s HELP ACCESS\002) for\n"
- "information on giving a subset of these privileges to\n"
- "other channel users.\n"
- " \n"
+ "channel-operator privileges when s/he enters the channel."));
+ BotInfo *bi;
+ Anope::string cmd;
+ if (Command::FindCommandFromService("chanserv/access", bi, cmd))
+ source.Reply(_("See the \002%s002 command (\002%s%s HELP ACCESS\002) for\n"
+ "information on giving a subset of these privileges to\n"
+ "other channel users.\n"), cmd.c_str(), Config->StrictPrivmsg.c_str(), bi->nick.c_str());
+ source.Reply(_(" \n"
"NOTICE: In order to register a channel, you must have\n"
- "first registered your nickname."),
- source.service->nick.c_str(), source.service->nick.c_str(), Config->StrictPrivmsg.c_str(), source.service->nick.c_str());
+ "first registered your nickname."));
return true;
}
};
diff --git a/modules/commands/cs_set.cpp b/modules/commands/cs_set.cpp
index 0de1a39ad..4c49c9a21 100644
--- a/modules/commands/cs_set.cpp
+++ b/modules/commands/cs_set.cpp
@@ -106,8 +106,8 @@ class CommandCSSetAutoOp : public Command
source.Reply(" ");
source.Reply(_("Enables or disables %s's autoop feature for a\n"
"channel. When disabled, users who join the channel will\n"
- "not automatically gain any status from %s."), ChanServ->nick.c_str(),
- ChanServ->nick.c_str(), this->name.c_str());
+ "not automatically gain any status from %s."), source.service->nick.c_str(),
+ source.service->nick.c_str(), this->name.c_str());
return true;
}
};
@@ -652,10 +652,13 @@ class CommandCSSetPrivate : public Command
{
this->SendSyntax(source);
source.Reply(" ");
- source.Reply(_("Enables or disables the \002private\002 option for a channel.\n"
- "When \002private\002 is set, a \002%s%s LIST\002 will not\n"
- "include the channel in any lists."),
- Config->StrictPrivmsg.c_str(), source.service->nick.c_str());
+ source.Reply(_("Enables or disables the \002private\002 option for a channel."));
+
+ BotInfo *bi;
+ Anope::string cmd;
+ if (Command::FindCommandFromService("chanserv/list", bi, cmd))
+ source.Reply(_("When \002private\002 is set, the channel will not appear in\n"
+ "%s's %s command."), bi->nick.c_str(), cmd.c_str());
return true;
}
};
diff --git a/modules/commands/cs_xop.cpp b/modules/commands/cs_xop.cpp
index 9efde866c..192eb4529 100644
--- a/modules/commands/cs_xop.cpp
+++ b/modules/commands/cs_xop.cpp
@@ -524,12 +524,21 @@ class CommandCSXOP : public Command
"(unless SECUREOPS is off). However, any user on the\n"
"VOP list or above may use the \002%s LIST\002 command.\n"
" \n"), cmd.c_str(), cmd.c_str());
- source.Reply(_("Alternative methods of modifying channel access lists are\n"
- "available. See \002%s%s HELP ACCESS\002 for information\n"
- "about the access list, and \002%s%s HELP FLAGS\002 for\n"
- "information about the flags based system."),
- Config->StrictPrivmsg.c_str(), source.service->nick.c_str(),
- Config->StrictPrivmsg.c_str(), source.service->nick.c_str());
+ BotInfo *access_bi, *flags_bi;
+ Anope::string access_cmd, flags_cmd;
+ Command::FindCommandFromService("chanserv/access", access_bi, access_cmd);
+ Command::FindCommandFromService("chanserv/flags", flags_bi, access_cmd);
+ if (!access_cmd.empty() || !flags_cmd.empty())
+ {
+ source.Reply(_("Alternative methods of modifying channel access lists are\n"
+ "available. "));
+ if (!access_cmd.empty())
+ source.Reply(_("See \002%s%s HELP %s\002 for more information\n"
+ "about the access list."), Config->StrictPrivmsg.c_str(), access_bi->nick.c_str(), access_cmd.c_str());
+ if (!flags_cmd.empty())
+ source.Reply(_("See \002%s%s HELP %s\002 for more information\n"
+ "about the flags system."), Config->StrictPrivmsg.c_str(), flags_bi->nick.c_str(), flags_cmd.c_str());
+ }
return true;
}
};
diff --git a/modules/commands/ms_read.cpp b/modules/commands/ms_read.cpp
index 7e1e89236..b25b4fc4b 100644
--- a/modules/commands/ms_read.cpp
+++ b/modules/commands/ms_read.cpp
@@ -72,11 +72,20 @@ class MemoListCallback : public NumberList
Memo *m = mi->GetMemo(index);
if (!m)
return;
-
+
if (ci)
- source.Reply(_("Memo %d from %s (%s). To delete, type: \002%s%s DEL %s %d\002"), index + 1, m->sender.c_str(), Anope::strftime(m->time).c_str(), Config->StrictPrivmsg.c_str(), MemoServ->nick.c_str(), ci->name.c_str(), index + 1);
+ source.Reply(_("Memo %d from %s (%s)."), index + 1, m->sender.c_str(), Anope::strftime(m->time).c_str());
else
- source.Reply(_("Memo %d from %s (%s). To delete, type: \002%s%s DEL %d\002"), index + 1, m->sender.c_str(), Anope::strftime(m->time).c_str(), Config->StrictPrivmsg.c_str(), MemoServ->nick.c_str(), index + 1);
+ source.Reply(_("Memo %d from %s (%s)."), index + 1, m->sender.c_str(), Anope::strftime(m->time).c_str());
+
+ BotInfo *bi;
+ Anope::string cmd;
+ if (Command::FindCommandFromService("memoserv/del", bi, cmd))
+ if (ci)
+ source.Reply(_("To delete, type: \002%s%s %s %s %d\002"), Config->StrictPrivmsg.c_str(), bi->nick.c_str(), cmd.c_str(), ci->name.c_str(), index + 1);
+ else
+ source.Reply(_("To delete, type: \002%s%s %s %d\002"), Config->StrictPrivmsg.c_str(), bi->nick.c_str(), cmd.c_str(), index + 1);
+
source.Reply("%s", m->text.c_str());
m->unread = false;
diff --git a/modules/commands/ns_group.cpp b/modules/commands/ns_group.cpp
index 97551cfcb..a744b9afc 100644
--- a/modules/commands/ns_group.cpp
+++ b/modules/commands/ns_group.cpp
@@ -131,7 +131,7 @@ class CommandNSGroup : public Command
else if (na && *target->nc == *na->nc)
source.Reply(_("You are already a member of the group of \002%s\002."), target->nick.c_str());
else if (na && na->nc != u->Account())
- source.Reply(NICK_IDENTIFY_REQUIRED, Config->StrictPrivmsg.c_str(), NickServ->nick.c_str());
+ source.Reply(NICK_IDENTIFY_REQUIRED);
else if (na && Config->GetModule(this->owner)->Get<bool>("nogroupchange"))
source.Reply(_("Your nick is already registered."));
else if (target->nc->aliases->size() >= Config->GetModule(this->owner)->Get<unsigned>("maxaliases") && !target->nc->IsServicesOper())
diff --git a/modules/commands/ns_register.cpp b/modules/commands/ns_register.cpp
index da2f6de59..2d2f59877 100644
--- a/modules/commands/ns_register.cpp
+++ b/modules/commands/ns_register.cpp
@@ -220,7 +220,10 @@ class CommandNSRegister : public Command
if (SendRegmail(u, na, source.service))
{
time_t unconfirmed_expire = Config->GetModule("nickserv")->Get<time_t>("unconfirmedexpire", "1d");
- source.Reply(_("A passcode has been sent to %s, please type \002%s%s CONFIRM <passcode>\002 to confirm your email address."), email.c_str(), Config->StrictPrivmsg.c_str(), NickServ->nick.c_str());
+ BotInfo *bi;
+ Anope::string cmd;
+ if (Command::FindCommandFromService("nickserv/confirm", bi, cmd))
+ source.Reply(_("A passcode has been sent to %s, please type \002%s%s %s <passcode>\002 to confirm your email address."), email.c_str(), Config->StrictPrivmsg.c_str(), bi->nick.c_str(), cmd.c_str());
source.Reply(_("If you do not confirm your email address within %s your account will expire."), Anope::Duration(unconfirmed_expire).c_str());
}
}
diff --git a/modules/commands/ns_set.cpp b/modules/commands/ns_set.cpp
index 93024b437..3dac72f71 100644
--- a/modules/commands/ns_set.cpp
+++ b/modules/commands/ns_set.cpp
@@ -98,7 +98,7 @@ class CommandNSSASet : public Command
source.Reply(_("Type \002%s%s HELP %s \037option\037\002 for more information\n"
"on a specific option. The options will be set on the given\n"
- "\037nickname\037."), Config->StrictPrivmsg.c_str(), NickServ->nick.c_str(), this_name.c_str());
+ "\037nickname\037."), Config->StrictPrivmsg.c_str(), source.service->nick.c_str(), this_name.c_str());
return true;
}
};
@@ -724,13 +724,13 @@ class CommandNSSetHide : public Command
{
Log(nc == source.GetAccount() ? LOG_COMMAND : LOG_ADMIN, source, this) << "to change hide " << param << " to " << arg << " for " << nc->display;
nc->ExtendMetadata(flag);
- source.Reply(onmsg.c_str(), nc->display.c_str(), NickServ->nick.c_str());
+ source.Reply(onmsg.c_str(), nc->display.c_str(), source.service->nick.c_str());
}
else if (arg.equals_ci("OFF"))
{
Log(nc == source.GetAccount() ? LOG_COMMAND : LOG_ADMIN, source, this) << "to change hide " << param << " to " << arg << " for " << nc->display;
nc->Shrink(flag);
- source.Reply(offmsg.c_str(), nc->display.c_str(), NickServ->nick.c_str());
+ source.Reply(offmsg.c_str(), nc->display.c_str(), source.service->nick.c_str());
}
else
this->OnSyntaxError(source, "HIDE");
@@ -753,7 +753,7 @@ class CommandNSSetHide : public Command
"user@host mask (\002USERMASK\002), your services access status\n"
"(\002STATUS\002) and last quit message (\002QUIT\002).\n"
"The second parameter specifies whether the information should\n"
- "be displayed (\002OFF\002) or hidden (\002ON\002)."), NickServ->nick.c_str());
+ "be displayed (\002OFF\002) or hidden (\002ON\002)."), source.service->nick.c_str());
return true;
}
};
@@ -782,7 +782,7 @@ class CommandNSSASetHide : public CommandNSSetHide
"user@host mask (\002USERMASK\002), the services access status\n"
"(\002STATUS\002) and last quit message (\002QUIT\002).\n"
"The second parameter specifies whether the information should\n"
- "be displayed (\002OFF\002) or hidden (\002ON\002)."), NickServ->nick.c_str());
+ "be displayed (\002OFF\002) or hidden (\002ON\002)."), source.service->nick.c_str());
return true;
}
};
@@ -880,7 +880,7 @@ class CommandNSSetKill : public Command
"\002IMMED\002, user's nick will be changed immediately \037without\037 being\n"
"warned first or given a chance to change their nick; please\n"
"do not use this option unless necessary. Also, your\n"
- "network's administrators may have disabled this option."), NickServ->nick.c_str());
+ "network's administrators may have disabled this option."), source.service->nick.c_str());
return true;
}
};
@@ -914,7 +914,7 @@ class CommandNSSASetKill : public CommandNSSetKill
"\002IMMED\002, the user's nick will be changed immediately \037without\037 being\n"
"warned first or given a chance to change their nick; please\n"
"do not use this option unless necessary. Also, your\n"
- "network's administrators may have disabled this option."), NickServ->nick.c_str());
+ "network's administrators may have disabled this option."), source.service->nick.c_str());
return true;
}
};
@@ -1172,7 +1172,7 @@ class CommandNSSetPrivate : public Command
"nickname lists generated with %s's \002LIST\002 command.\n"
"(However, anyone who knows your nickname can still get\n"
"information on it using the \002INFO\002 command.)"),
- NickServ->nick.c_str(), NickServ->nick.c_str());
+ source.service->nick.c_str(), source.service->nick.c_str());
return true;
}
};
@@ -1200,7 +1200,7 @@ class CommandNSSASetPrivate : public CommandNSSetPrivate
"nickname lists generated with %s's \002LIST\002 command.\n"
"(However, anyone who knows the nickname can still get\n"
"information on it using the \002INFO\002 command.)"),
- NickServ->nick.c_str(), NickServ->nick.c_str());
+ source.service->nick.c_str(), source.service->nick.c_str());
return true;
}
};
@@ -1260,7 +1260,7 @@ class CommandNSSetSecure : public Command
"regardless of whether your address is on the access\n"
"list. However, if you are on the access list, %s\n"
"will not auto-kill you regardless of the setting of the\n"
- "\002KILL\002 option."), NickServ->nick.c_str(), NickServ->nick.c_str());
+ "\002KILL\002 option."), source.service->nick.c_str(), source.service->nick.c_str());
return true;
}
};
@@ -1289,7 +1289,7 @@ class CommandNSSASetSecure : public CommandNSSetSecure
"regardless of whether your address is on the access\n"
"list. However, if you are on the access list, %s\n"
"will not auto-kill you regardless of the setting of the\n"
- "\002KILL\002 option."), NickServ->nick.c_str(), NickServ->nick.c_str());
+ "\002KILL\002 option."), source.service->nick.c_str(), source.service->nick.c_str());
return true;
}
};