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

Fixed saset noexpire to set noexpire on the nick it is used on not just the display name

This commit is contained in:
Adam
2010-10-13 14:33:27 -04:00
parent c4075c032e
commit 5e9db23883
11 changed files with 49 additions and 37 deletions
+9 -7
View File
@@ -52,7 +52,7 @@ class CommandNSSASet : public Command
if (c)
{
Anope::string cmdparams = na->nc->display;
Anope::string cmdparams = na->nick;
for (std::vector<Anope::string>::const_iterator it = params.begin() + 2; it != params.end(); ++it)
cmdparams += " " + *it;
/* Don't log the whole message for saset password */
@@ -130,9 +130,10 @@ class CommandNSSASetDisplay : public Command
CommandReturn Execute(User *u, const std::vector<Anope::string> &params)
{
NickCore *nc = findcore(params[0]);
if (!nc)
throw CoreException("NULL nc in CommandNSSASetDisplay");
NickAlias *setter_na = findnick(params[0]);
if (!setter_na)
throw CoreException("NULL na in CommandNSSASetDisplay");
NickCore *nc = setter_na->nc;
NickAlias *na = findnick(params[1]);
if (!na || na->nc != nc)
@@ -173,9 +174,10 @@ class CommandNSSASetPassword : public Command
CommandReturn Execute(User *u, const std::vector<Anope::string> &params)
{
NickCore *nc = findcore(params[0]);
if (!nc)
throw CoreException("NULL nc in CommandNSSASetPassword");
NickAlias *setter_na = findnick(params[0]);
if (!setter_na)
throw CoreException("NULL na in CommandNSSASetPassword");
NickCore *nc = setter_na->nc;
size_t len = params[1].length();
+4 -3
View File
@@ -22,9 +22,10 @@ class CommandNSSetAutoOp : public Command
CommandReturn Execute(User *u, const std::vector<Anope::string> &params)
{
NickCore *nc = findcore(params[0]);
if (!nc)
throw CoreException("NULL nc in CommandNSSetAutoOp");
NickAlias *na = findnick(params[0]);
if (!na)
throw CoreException("NULL na in CommandNSSetAutoOp");
NickCore *nc = na->nc;
Anope::string param = params.size() > 1 ? params[1] : "";
+4 -3
View File
@@ -22,9 +22,10 @@ class CommandNSSetEmail : public Command
CommandReturn Execute(User *u, const std::vector<Anope::string> &params)
{
NickCore *nc = findcore(params[0]);
if (!nc)
throw CoreException("NULL nc in CommandNSSetEmail");
NickAlias *na = findnick(params[0]);
if (!na)
throw CoreException("NULL na in CommandNSSetEmail");
NickCore *nc = na->nc;
Anope::string param = params.size() > 1 ? params[1] : "";
+4 -3
View File
@@ -22,9 +22,10 @@ class CommandNSSetGreet : public Command
CommandReturn Execute(User *u, const std::vector<Anope::string> &params)
{
NickCore *nc = findcore(params[0]);
if (!nc)
throw CoreException("NULL nc in CommandNSSetGreet");
NickAlias *na = findnick(params[0]);
if (!na)
throw CoreException("NULL na in CommandNSSetGreet");
NickCore *nc = na->nc;
Anope::string param = params.size() > 1 ? params[1] : "";
+4 -3
View File
@@ -22,9 +22,10 @@ class CommandNSSetHide : public Command
CommandReturn Execute(User *u, const std::vector<Anope::string> &params)
{
NickCore *nc = findcore(params[0]);
if (!nc)
throw CoreException("NULL nc in CommandNSSetHide");
NickAlias *na = findnick(params[0]);
if (!na)
throw CoreException("NULL na in CommandNSSetHide");
NickCore *nc = na->nc;
LanguageString onmsg, offmsg;
NickCoreFlag flag;
+4 -3
View File
@@ -22,9 +22,10 @@ class CommandNSSetKill : public Command
CommandReturn Execute(User *u, const std::vector<Anope::string> &params)
{
NickCore *nc = findcore(params[0]);
if (!nc)
throw CoreException("NULL nc in CommandNSSetKill");
NickAlias *na = findnick(params[0]);
if (!na)
throw CoreException("NULL na in CommandNSSetKill");
NickCore *nc = na->nc;
Anope::string param = params[1];
Anope::string arg = params.size() > 2 ? params[2] : "";
+4 -3
View File
@@ -22,9 +22,10 @@ class CommandNSSetLanguage : public Command
CommandReturn Execute(User *u, const std::vector<Anope::string> &params)
{
NickCore *nc = findcore(params[0]);
if (!nc)
throw CoreException("NULL nc in CommandNSSetLanguage");
NickAlias *na = findnick(params[0]);
if (!na)
throw CoreException("NULL na in CommandNSSetLanguage");
NickCore *nc = na->nc;
Anope::string param = params[1];
+4 -3
View File
@@ -22,9 +22,10 @@ class CommandNSSetMessage : public Command
CommandReturn Execute(User *u, const std::vector<Anope::string> &params)
{
NickCore *nc = findcore(params[0]);
if (!nc)
throw CoreException("NULL nc in CommandNSSetMessage");
NickAlias *na = findnick(params[0]);
if (!na)
throw CoreException("NULL na in CommandNSSetMessage");
NickCore *nc = na->nc;
if (!Config->UsePrivmsg)
{
+4 -3
View File
@@ -22,9 +22,10 @@ class CommandNSSetPrivate : public Command
CommandReturn Execute(User *u, const std::vector<Anope::string> &params)
{
NickCore *nc = findcore(params[0]);
if (!nc)
throw CoreException("NULL nc in CommandNSSetPrivate");
NickAlias *na = findnick(params[0]);
if (!na)
throw CoreException("NULL na in CommandNSSetPrivate");
NickCore *nc = na->nc;
Anope::string param = params[1];
+4 -3
View File
@@ -22,9 +22,10 @@ class CommandNSSetSecure : public Command
CommandReturn Execute(User *u, const std::vector<Anope::string> &params)
{
NickCore *nc = findcore(params[0]);
if (!nc)
throw CoreException("NULL nc in CommandNSSetSecure");
NickAlias *na = findnick(params[0]);
if (!na)
throw CoreException("NULL na in CommandNSSetSecure");
NickCore *nc = na->nc;
Anope::string param = params[1];
+4 -3
View File
@@ -21,9 +21,10 @@ class CommandNSSetMisc : public Command
protected:
CommandReturn RealExecute(User *u, const std::vector<Anope::string> &params)
{
NickCore *nc = findcore(params[0]);
if (!nc)
throw CoreException("NULL nc in CommandNSSetMisc");
NickAlias *na = findnick(params[0]);
if (!na)
throw CoreException("NULL na in CommandNSSetMisc");
NickCore *nc = na->nc;
nc->Shrink("nickserv:" + this->name);
if (params.size() > 1)