1
0
mirror of https://github.com/anope/anope.git synced 2026-07-04 04:43:13 +02:00

Moved the core pseudo clients out into their own modules

This commit is contained in:
Adam
2011-04-22 03:16:11 -04:00
parent 1782ce260c
commit c8c23158a4
226 changed files with 5187 additions and 4891 deletions
+8 -4
View File
@@ -12,6 +12,7 @@
/*************************************************************************/
#include "module.h"
#include "nickserv.h"
class CommandNSSet : public Command
{
@@ -57,7 +58,7 @@ class CommandNSSet : public Command
Log(LOG_COMMAND, u, this) << params[0] << " " << cmdparams;
else
Log(LOG_COMMAND, u, this) << params[0];
mod_run_cmd(NickServ, u, NULL, c, params[0], cmdparams);
mod_run_cmd(nickserv->Bot(), u, NULL, c, params[0], cmdparams);
}
else
source.Reply(_(NICK_SET_UNKNOWN_OPTION), Config->UseStrictPrivMsgString.c_str(), params[0].c_str());
@@ -79,7 +80,7 @@ class CommandNSSet : public Command
"information).\n"
" \n"
"Type \002%s%s HELP SET \037option\037\002 for more information\n"
"on a specific option."), Config->UseStrictPrivMsgString.c_str(), NickServ->nick.c_str(), (Config->UseStrictPrivMsg ? "/msg " : "/"), NickServ->nick.c_str());
"on a specific option."), Config->UseStrictPrivMsgString.c_str(), Config->s_NickServ.c_str(), (Config->UseStrictPrivMsg ? "/msg " : "/"), Config->s_NickServ.c_str());
return true;
}
else
@@ -189,7 +190,7 @@ class CommandNSSetPassword : public Command
if (enc_encrypt(param, u->Account()->pass) < 0)
{
Log(NickServ) << "Failed to encrypt password for " << u->Account()->display << " (set)";
Log() << "Failed to encrypt password for " << u->Account()->display << " (set)";
source.Reply(_(NICK_SASET_PASSWORD_FAILED));
return MOD_CONT;
}
@@ -231,7 +232,10 @@ class NSSet : public Module
this->SetAuthor("Anope");
this->SetType(CORE);
this->AddCommand(NickServ, &commandnsset);
if (!nickserv)
throw ModuleException("NickServ is not loaded!");
this->AddCommand(nickserv->Bot(), &commandnsset);
commandnsset.AddSubcommand(this, &commandnssetdisplay);
commandnsset.AddSubcommand(this, &commandnssetpassword);