diff options
| author | Adam <Adam@anope.org> | 2010-10-04 17:36:53 -0400 |
|---|---|---|
| committer | Adam <Adam@anope.org> | 2010-10-04 17:36:53 -0400 |
| commit | 92338c13b871378b8e828085b8b724d4217649a8 (patch) | |
| tree | 27f4681f683d99f745f3793f46d113278938151a /modules/core | |
| parent | 3fa2659309bd94e146aa0281d92eaa0599bf7778 (diff) | |
Fixed /ns set password/display and made saset not log the new password on saset password
Diffstat (limited to 'modules/core')
| -rw-r--r-- | modules/core/ns_saset.cpp | 6 | ||||
| -rw-r--r-- | modules/core/ns_set.cpp | 9 |
2 files changed, 12 insertions, 3 deletions
diff --git a/modules/core/ns_saset.cpp b/modules/core/ns_saset.cpp index 229f48e8c..bc554ff1e 100644 --- a/modules/core/ns_saset.cpp +++ b/modules/core/ns_saset.cpp @@ -55,7 +55,11 @@ class CommandNSSASet : public Command Anope::string cmdparams = na->nc->display; for (std::vector<Anope::string>::const_iterator it = params.begin() + 2; it != params.end(); ++it) cmdparams += " " + *it; - Log(LOG_ADMIN, u, this) << params[1] << " " << cmdparams; + /* Don't log the whole message for saset password */ + if (c->name != "PASSWORD") + Log(LOG_ADMIN, u, this) << params[1] << " " << cmdparams; + else + Log(LOG_ADMIN, u, this) << params[1] << " for " << params[0]; mod_run_cmd(NickServ, u, c, params[1], cmdparams); } else diff --git a/modules/core/ns_set.cpp b/modules/core/ns_set.cpp index fd4486c93..51949ad8e 100644 --- a/modules/core/ns_set.cpp +++ b/modules/core/ns_set.cpp @@ -49,6 +49,11 @@ class CommandNSSet : public Command 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; + /* Don't log the whole message for set password */ + if (c->name != "PASSWORD") + Log(LOG_COMMAND, u, this) << params[0] << " " << cmdparams; + else + Log(LOG_COMMAND, u, this) << params[0]; mod_run_cmd(NickServ, u, c, params[0], cmdparams); } else @@ -118,7 +123,7 @@ class CommandNSSetDisplay : public Command CommandReturn Execute(User *u, const std::vector<Anope::string> ¶ms) { - NickAlias *na = findnick(params[0]); + NickAlias *na = findnick(params[1]); if (!na || na->nc != u->Account()) { @@ -158,7 +163,7 @@ class CommandNSSetPassword : public Command CommandReturn Execute(User *u, const std::vector<Anope::string> ¶ms) { - Anope::string param = params[0]; + Anope::string param = params[1]; int len = param.length(); |
