diff options
author | rburchell <rburchell@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-02-15 22:29:18 +0000 |
---|---|---|
committer | rburchell <rburchell@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-02-15 22:29:18 +0000 |
commit | d1611b640bcd27e1a91a99ef32127bc722e50a36 (patch) | |
tree | b18c77b07b74b70f5613b106aa2a81baa6227f35 /src/core/ns_set.c | |
parent | 0e5b71923b25d908167e7ef9d07c6c217827e901 (diff) |
Remove User::na, use User::nc everywhere. Will probably break everything, but opens the door to decoupling NC from NA, and means commands can now be run without bothering about changinc nick :)
More tweaking for na/nc usage.
It compiles, but it's still a work in progress.
Again, this compiles, but I *bet* there's no chance in hell it'll work. :)
Slightly better.
Set User::nc correctly.
Fix crash with unregistered nicks in core and ns_access.
Fix glist to work when you're not on that particular nick.
Fix ns_set to not crash and burn horribly.
Fix ns_set and ns_logout to not do bad things.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2076 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/core/ns_set.c')
-rw-r--r-- | src/core/ns_set.c | 42 |
1 files changed, 18 insertions, 24 deletions
diff --git a/src/core/ns_set.c b/src/core/ns_set.c index 30c171698..7e44f9f03 100644 --- a/src/core/ns_set.c +++ b/src/core/ns_set.c @@ -53,11 +53,6 @@ class CommandNSSet : public Command change_core_display(nc, param); notice_lang(s_NickServ, u, NICK_SET_DISPLAY_CHANGED, nc->display); - - /* Enable nick tracking if enabled */ - if (NSNickTracking) - nsStartNickTracking(u); - return MOD_CONT; } @@ -455,7 +450,6 @@ class CommandNSSet : public Command CommandReturn Execute(User *u, std::vector<std::string> ¶ms) { const char *cmd = params[0].c_str(); - NickAlias *na = u->na; if (readonly) { @@ -463,40 +457,40 @@ class CommandNSSet : public Command return MOD_CONT; } - if (!na) - notice_lang(s_NickServ, u, NICK_NOT_REGISTERED); - else if (na->status & NS_FORBIDDEN) +/* + if (na->status & NS_FORBIDDEN) notice_lang(s_NickServ, u, NICK_X_FORBIDDEN, na->nick); - else if (na->nc->flags & NI_SUSPENDED) - notice_lang(s_NickServ, u, NICK_X_SUSPENDED, na->nick); +*/ + if (u->nc->flags & NI_SUSPENDED) + notice_lang(s_NickServ, u, NICK_X_SUSPENDED, u->nc->display); else if (!nick_identified(u)) notice_lang(s_NickServ, u, NICK_IDENTIFY_REQUIRED, s_NickServ); else if (!stricmp(cmd, "DISPLAY")) - return this->DoSetDisplay(u, params, na->nc); + return this->DoSetDisplay(u, params, u->nc); else if (!stricmp(cmd, "PASSWORD")) - return this->DoSetPassword(u, params, na->nc); + return this->DoSetPassword(u, params, u->nc); else if (!stricmp(cmd, "LANGUAGE")) - return this->DoSetLanguage(u, params, na->nc); + return this->DoSetLanguage(u, params, u->nc); else if (!stricmp(cmd, "URL")) - return this->DoSetUrl(u, params, na->nc); + return this->DoSetUrl(u, params, u->nc); else if (!stricmp(cmd, "EMAIL")) - return this->DoSetEmail(u, params, na->nc); + return this->DoSetEmail(u, params, u->nc); else if (!stricmp(cmd, "ICQ")) - return this->DoSetICQ(u, params, na->nc); + return this->DoSetICQ(u, params, u->nc); else if (!stricmp(cmd, "GREET")) - return this->DoSetGreet(u, params, na->nc); + return this->DoSetGreet(u, params, u->nc); else if (!stricmp(cmd, "KILL")) - return this->DoSetKill(u, params, na->nc); + return this->DoSetKill(u, params, u->nc); else if (!stricmp(cmd, "SECURE")) - return this->DoSetSecure(u, params, na->nc); + return this->DoSetSecure(u, params, u->nc); else if (!stricmp(cmd, "PRIVATE")) - return this->DoSetPrivate(u, params, na->nc); + return this->DoSetPrivate(u, params, u->nc); else if (!stricmp(cmd, "MSG")) - return this->DoSetMsg(u, params, na->nc); + return this->DoSetMsg(u, params, u->nc); else if (!stricmp(cmd, "HIDE")) - return this->DoSetHide(u, params, na->nc); + return this->DoSetHide(u, params, u->nc); else if (!stricmp(cmd, "AUTOOP")) - return this->DoSetAutoOP(u, params, na->nc); + return this->DoSetAutoOP(u, params, u->nc); else notice_lang(s_NickServ, u, NICK_SET_UNKNOWN_OPTION, cmd); return MOD_CONT; |