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/cs_info.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/cs_info.c')
-rw-r--r-- | src/core/cs_info.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/src/core/cs_info.c b/src/core/cs_info.c index 4bb8495e4..09d92e84f 100644 --- a/src/core/cs_info.c +++ b/src/core/cs_info.c @@ -28,11 +28,11 @@ void myChanServHelp(User * u) class CommandCSInfo : public Command { // cannot be const, as it is modified. - void CheckOptStr(std::string &buf, int opt, const std::string &str, ChannelInfo *ci, NickAlias *na) + void CheckOptStr(std::string &buf, int opt, const std::string &str, ChannelInfo *ci, NickCore *nc) { if (ci->flags & opt) { - const char *commastr = getstring(na, COMMA_SPACE); + const char *commastr = getstring(nc, COMMA_SPACE); if (!buf.empty()) buf += commastr; @@ -69,7 +69,7 @@ class CommandCSInfo : public Command notice_lang(s_ChanServ, u, CHAN_X_FORBIDDEN_OPER, chan, ci->forbidby, (ci->forbidreason ? ci-> - forbidreason : getstring(u->na, NO_REASON))); + forbidreason : getstring(u, NO_REASON))); else notice_lang(s_ChanServ, u, CHAN_X_FORBIDDEN, chan); @@ -115,19 +115,19 @@ class CommandCSInfo : public Command notice_lang(s_ChanServ, u, CHAN_INFO_BANTYPE, ci->bantype); std::string optbuf; - CheckOptStr(optbuf, CI_KEEPTOPIC, getstring(u->na, CHAN_INFO_OPT_KEEPTOPIC), ci, u->na); - CheckOptStr(optbuf, CI_OPNOTICE, getstring(u->na, CHAN_INFO_OPT_OPNOTICE), ci, u->na); - CheckOptStr(optbuf, CI_PEACE, getstring(u->na, CHAN_INFO_OPT_PEACE), ci, u->na); - CheckOptStr(optbuf, CI_PRIVATE, getstring(u->na, CHAN_INFO_OPT_PRIVATE), ci, u->na); - CheckOptStr(optbuf, CI_RESTRICTED, getstring(u->na, CHAN_INFO_OPT_RESTRICTED), ci, u->na); - CheckOptStr(optbuf, CI_SECURE, getstring(u->na, CHAN_INFO_OPT_SECURE), ci, u->na); - CheckOptStr(optbuf, CI_SECUREFOUNDER, getstring(u->na, CHAN_INFO_OPT_SECUREFOUNDER), ci, u->na); - CheckOptStr(optbuf, CI_SECUREOPS, getstring(u->na, CHAN_INFO_OPT_SECUREOPS), ci, u->na); - CheckOptStr(optbuf, CI_SIGNKICK | CI_SIGNKICK_LEVEL, getstring(u->na, CHAN_INFO_OPT_SIGNKICK), ci, u->na); - CheckOptStr(optbuf, CI_TOPICLOCK, getstring(u->na, CHAN_INFO_OPT_TOPICLOCK), ci, u->na); - CheckOptStr(optbuf, CI_XOP, getstring(u->na, CHAN_INFO_OPT_XOP), ci, u->na); - - notice_lang(s_ChanServ, u, CHAN_INFO_OPTIONS, optbuf.empty() ? getstring(u->na, CHAN_INFO_OPT_NONE) : optbuf.c_str()); + CheckOptStr(optbuf, CI_KEEPTOPIC, getstring(u, CHAN_INFO_OPT_KEEPTOPIC), ci, u->nc); + CheckOptStr(optbuf, CI_OPNOTICE, getstring(u, CHAN_INFO_OPT_OPNOTICE), ci, u->nc); + CheckOptStr(optbuf, CI_PEACE, getstring(u, CHAN_INFO_OPT_PEACE), ci, u->nc); + CheckOptStr(optbuf, CI_PRIVATE, getstring(u, CHAN_INFO_OPT_PRIVATE), ci, u->nc); + CheckOptStr(optbuf, CI_RESTRICTED, getstring(u, CHAN_INFO_OPT_RESTRICTED), ci, u->nc); + CheckOptStr(optbuf, CI_SECURE, getstring(u, CHAN_INFO_OPT_SECURE), ci, u->nc); + CheckOptStr(optbuf, CI_SECUREFOUNDER, getstring(u, CHAN_INFO_OPT_SECUREFOUNDER), ci, u->nc); + CheckOptStr(optbuf, CI_SECUREOPS, getstring(u, CHAN_INFO_OPT_SECUREOPS), ci, u->nc); + CheckOptStr(optbuf, CI_SIGNKICK | CI_SIGNKICK_LEVEL, getstring(u, CHAN_INFO_OPT_SIGNKICK), ci, u->nc); + CheckOptStr(optbuf, CI_TOPICLOCK, getstring(u, CHAN_INFO_OPT_TOPICLOCK), ci, u->nc); + CheckOptStr(optbuf, CI_XOP, getstring(u, CHAN_INFO_OPT_XOP), ci, u->nc); + + notice_lang(s_ChanServ, u, CHAN_INFO_OPTIONS, optbuf.empty() ? getstring(u, CHAN_INFO_OPT_NONE) : optbuf.c_str()); notice_lang(s_ChanServ, u, CHAN_INFO_MODE_LOCK, get_mlock_modes(ci, 1)); // XXX: we could just as easily (and tidily) merge this in with the flags display above. @@ -148,7 +148,7 @@ class CommandCSInfo : public Command } if (ci->flags & CI_SUSPENDED) { - notice_lang(s_ChanServ, u, CHAN_X_SUSPENDED, ci->forbidby, (ci->forbidreason ? ci->forbidreason : getstring(u->na, NO_REASON))); + notice_lang(s_ChanServ, u, CHAN_X_SUSPENDED, ci->forbidby, (ci->forbidreason ? ci->forbidreason : getstring(u, NO_REASON))); } if (!show_all && (check_access(u, ci, CA_INFO) || is_servadmin)) |