summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2010-10-13 14:33:27 -0400
committerAdam <Adam@anope.org>2010-10-13 14:33:27 -0400
commit5e9db23883c849077eb48d2b2176163a077f09d4 (patch)
tree07a03e4d815e66b6730a31b9725ff9ac5c56dff0
parentc4075c032e0cfd0e22faaa318182c2c04cf45c6e (diff)
Fixed saset noexpire to set noexpire on the nick it is used on not just the display name
-rw-r--r--modules/core/ns_saset.cpp16
-rw-r--r--modules/core/ns_set_autoop.cpp7
-rw-r--r--modules/core/ns_set_email.cpp7
-rw-r--r--modules/core/ns_set_greet.cpp7
-rw-r--r--modules/core/ns_set_hide.cpp7
-rw-r--r--modules/core/ns_set_kill.cpp7
-rw-r--r--modules/core/ns_set_language.cpp7
-rw-r--r--modules/core/ns_set_message.cpp7
-rw-r--r--modules/core/ns_set_private.cpp7
-rw-r--r--modules/core/ns_set_secure.cpp7
-rw-r--r--modules/extra/ns_set_misc.cpp7
11 files changed, 49 insertions, 37 deletions
diff --git a/modules/core/ns_saset.cpp b/modules/core/ns_saset.cpp
index bc554ff1e..624ac2883 100644
--- a/modules/core/ns_saset.cpp
+++ b/modules/core/ns_saset.cpp
@@ -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();
diff --git a/modules/core/ns_set_autoop.cpp b/modules/core/ns_set_autoop.cpp
index 4578362f5..1a240281b 100644
--- a/modules/core/ns_set_autoop.cpp
+++ b/modules/core/ns_set_autoop.cpp
@@ -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] : "";
diff --git a/modules/core/ns_set_email.cpp b/modules/core/ns_set_email.cpp
index c257286c7..fff93b633 100644
--- a/modules/core/ns_set_email.cpp
+++ b/modules/core/ns_set_email.cpp
@@ -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] : "";
diff --git a/modules/core/ns_set_greet.cpp b/modules/core/ns_set_greet.cpp
index fca7d54e9..e3fce8241 100644
--- a/modules/core/ns_set_greet.cpp
+++ b/modules/core/ns_set_greet.cpp
@@ -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] : "";
diff --git a/modules/core/ns_set_hide.cpp b/modules/core/ns_set_hide.cpp
index f6fdfd853..ef38c4345 100644
--- a/modules/core/ns_set_hide.cpp
+++ b/modules/core/ns_set_hide.cpp
@@ -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;
diff --git a/modules/core/ns_set_kill.cpp b/modules/core/ns_set_kill.cpp
index 7b15f12e2..c0699799f 100644
--- a/modules/core/ns_set_kill.cpp
+++ b/modules/core/ns_set_kill.cpp
@@ -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] : "";
diff --git a/modules/core/ns_set_language.cpp b/modules/core/ns_set_language.cpp
index b74bac6cc..99229da62 100644
--- a/modules/core/ns_set_language.cpp
+++ b/modules/core/ns_set_language.cpp
@@ -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];
diff --git a/modules/core/ns_set_message.cpp b/modules/core/ns_set_message.cpp
index fa20c9162..781ab3901 100644
--- a/modules/core/ns_set_message.cpp
+++ b/modules/core/ns_set_message.cpp
@@ -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)
{
diff --git a/modules/core/ns_set_private.cpp b/modules/core/ns_set_private.cpp
index 366305eae..8fddbe1c9 100644
--- a/modules/core/ns_set_private.cpp
+++ b/modules/core/ns_set_private.cpp
@@ -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];
diff --git a/modules/core/ns_set_secure.cpp b/modules/core/ns_set_secure.cpp
index 9eaca40fc..e9ce159dc 100644
--- a/modules/core/ns_set_secure.cpp
+++ b/modules/core/ns_set_secure.cpp
@@ -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];
diff --git a/modules/extra/ns_set_misc.cpp b/modules/extra/ns_set_misc.cpp
index 8829f86b2..af2175e81 100644
--- a/modules/extra/ns_set_misc.cpp
+++ b/modules/extra/ns_set_misc.cpp
@@ -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)