1
0
mirror of https://github.com/anope/anope.git synced 2026-07-05 11:03:12 +02:00

Send replies from fantasy commands back to the channel, this will be expanded on later

This commit is contained in:
Adam
2010-11-24 21:40:56 -06:00
parent 37e02a3594
commit cb6ef574e3
154 changed files with 2428 additions and 2111 deletions
+10 -8
View File
@@ -20,18 +20,20 @@ class CommandNSLogout : public Command
{
}
CommandReturn Execute(User *u, const std::vector<Anope::string> &params)
CommandReturn Execute(CommandSource &source, const std::vector<Anope::string> &params)
{
Anope::string nick = !params.empty() ? params[0] : "";
Anope::string param = params.size() > 1 ? params[1] : "";
User *u2;
User *u = source.u;
const Anope::string &nick = !params.empty() ? params[0] : "";
const Anope::string &param = params.size() > 1 ? params[1] : "";
User *u2;
if (!u->Account()->IsServicesOper() && !nick.empty())
this->OnSyntaxError(u, "");
else if (!(u2 = (!nick.empty() ? finduser(nick) : u)))
u->SendMessage(NickServ, NICK_X_NOT_IN_USE, nick.c_str());
source.Reply(NICK_X_NOT_IN_USE, nick.c_str());
else if (!nick.empty() && u2->Account() && !u2->Account()->IsServicesOper())
u->SendMessage(NickServ, NICK_LOGOUT_SERVICESADMIN, nick.c_str());
source.Reply(NICK_LOGOUT_SERVICESADMIN, nick.c_str());
else
{
if (!nick.empty() && !param.empty() && param.equals_ci("REVALIDATE"))
@@ -42,9 +44,9 @@ class CommandNSLogout : public Command
/* Remove founder status from this user in all channels */
if (!nick.empty())
u->SendMessage(NickServ, NICK_LOGOUT_X_SUCCEEDED, nick.c_str());
source.Reply(NICK_LOGOUT_X_SUCCEEDED, nick.c_str());
else
u->SendMessage(NickServ, NICK_LOGOUT_SUCCEEDED);
source.Reply(NICK_LOGOUT_SUCCEEDED);
ircdproto->SendAccountLogout(u2, u2->Account());
u2->RemoveMode(NickServ, UMODE_REGISTERED);