summaryrefslogtreecommitdiff
path: root/modules/core/ns_set.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2010-08-03 01:49:15 -0400
committerAdam <Adam@anope.org>2010-08-03 01:49:15 -0400
commit59ee16c7cb14d1ac80b9ed9b89d868af45de5ee5 (patch)
tree68e41ef54f6a77f8e8b75e80ef5eeda9a2ecdf04 /modules/core/ns_set.cpp
parent7b27a4e49192645b67eddba829a588e9e6d978ee (diff)
Made ns set/saset work like cs set/saset, cleans up a lot of code
Diffstat (limited to 'modules/core/ns_set.cpp')
-rw-r--r--modules/core/ns_set.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/modules/core/ns_set.cpp b/modules/core/ns_set.cpp
index fff85538e..ee426931b 100644
--- a/modules/core/ns_set.cpp
+++ b/modules/core/ns_set.cpp
@@ -46,11 +46,9 @@ class CommandNSSet : public Command
if (c)
{
- Anope::string cmdparams;
+ Anope::string cmdparams = u->Account()->display;
for (std::vector<Anope::string>::const_iterator it = params.begin() + 1, it_end = params.end(); it != it_end; ++it)
cmdparams += " " + *it;
- if (!cmdparams.empty())
- cmdparams.erase(cmdparams.begin());
mod_run_cmd(NickServ, u, c, params[0], cmdparams);
}
else
@@ -124,7 +122,7 @@ class CommandNSSetDisplay : public Command
if (!na || na->nc != u->Account())
{
- notice_lang(Config.s_NickServ, u, NICK_SET_DISPLAY_INVALID);
+ notice_lang(Config.s_NickServ, u, NICK_SASET_DISPLAY_INVALID, u->Account()->display.c_str());
return MOD_CONT;
}
@@ -178,15 +176,15 @@ class CommandNSSetPassword : public Command
if (enc_encrypt(param, u->Account()->pass) < 0)
{
Alog() << Config.s_NickServ << ": Failed to encrypt password for " << u->Account()->display << " (set)";
- notice_lang(Config.s_NickServ, u, NICK_SET_PASSWORD_FAILED);
+ notice_lang(Config.s_NickServ, u, NICK_SASET_PASSWORD_FAILED);
return MOD_CONT;
}
Anope::string tmp_pass;
if (enc_decrypt(u->Account()->pass, tmp_pass) == 1)
- notice_lang(Config.s_NickServ, u, NICK_SET_PASSWORD_CHANGED_TO, tmp_pass.c_str());
+ notice_lang(Config.s_NickServ, u, NICK_SASET_PASSWORD_CHANGED_TO, u->Account()->display.c_str(), tmp_pass.c_str());
else
- notice_lang(Config.s_NickServ, u, NICK_SET_PASSWORD_CHANGED);
+ notice_lang(Config.s_NickServ, u, NICK_SASET_PASSWORD_CHANGED, u->Account()->display.c_str());
Alog() << Config.s_NickServ << ": " << u->GetMask() << " (e-mail: " << (!u->Account()->email.empty() ? u->Account()->email : "none") << ") changed its password.";
return MOD_CONT;