summaryrefslogtreecommitdiff
path: root/src/chanserv.c
diff options
context:
space:
mode:
authorrburchell <rburchell@5417fbe8-f217-4b02-8779-1006273d7864>2009-02-15 22:29:18 +0000
committerrburchell <rburchell@5417fbe8-f217-4b02-8779-1006273d7864>2009-02-15 22:29:18 +0000
commitd1611b640bcd27e1a91a99ef32127bc722e50a36 (patch)
treeb18c77b07b74b70f5613b106aa2a81baa6227f35 /src/chanserv.c
parent0e5b71923b25d908167e7ef9d07c6c217827e901 (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/chanserv.c')
-rw-r--r--src/chanserv.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/chanserv.c b/src/chanserv.c
index 79824a008..393a5831b 100644
--- a/src/chanserv.c
+++ b/src/chanserv.c
@@ -1142,13 +1142,13 @@ int check_kick(User * user, const char *chan, time_t chants)
if (ci->flags & CI_SUSPENDED || ci->flags & CI_FORBIDDEN)
{
get_idealban(ci, user, mask, sizeof(mask));
- reason = ci->forbidreason ? ci->forbidreason : getstring(user->na, CHAN_MAY_NOT_BE_USED);
+ reason = ci->forbidreason ? ci->forbidreason : getstring(user, CHAN_MAY_NOT_BE_USED);
set_modes = true;
goto kick;
}
if (nick_recognized(user))
- nc = user->na->nc;
+ nc = user->nc;
else
nc = NULL;
@@ -1188,7 +1188,7 @@ int check_kick(User * user, const char *chan, time_t chants)
if (check_access(user, ci, CA_NOJOIN)) {
get_idealban(ci, user, mask, sizeof(mask));
- reason = getstring(user->na, CHAN_NOT_ALLOWED_TO_JOIN);
+ reason = getstring(user, CHAN_NOT_ALLOWED_TO_JOIN);
goto kick;
}
@@ -1846,7 +1846,7 @@ int is_founder(User * user, ChannelInfo * ci)
return 1;
}
- if (user->na && user->na->nc == ci->founder) {
+ if (user->nc && user->nc == ci->founder) {
if ((nick_identified(user)
|| (nick_recognized(user) && !(ci->flags & CI_SECURE))))
return 1;
@@ -1864,7 +1864,7 @@ int is_real_founder(User * user, ChannelInfo * ci)
return 1;
}
- if (user->na && user->na->nc == ci->founder) {
+ if (user->nc && user->nc == ci->founder) {
if ((nick_identified(user)
|| (nick_recognized(user) && !(ci->flags & CI_SECURE))))
return 1;
@@ -1927,12 +1927,12 @@ int get_access(User * user, ChannelInfo * ci)
if (is_founder(user, ci))
return ACCESS_FOUNDER;
- if (!user->na)
+ if (!user->nc)
return 0;
if (nick_identified(user)
|| (nick_recognized(user) && !(ci->flags & CI_SECURE)))
- if ((access = get_access_entry(user->na->nc, ci)))
+ if ((access = get_access_entry(user->nc, ci)))
return access->level;
if (nick_identified(user))
@@ -1947,12 +1947,12 @@ void update_cs_lastseen(User * user, ChannelInfo * ci)
{
ChanAccess *access;
- if (!ci || !user || !user->na)
+ if (!ci || !user || !user->nc)
return;
if (is_founder(user, ci) || nick_identified(user)
|| (nick_recognized(user) && !(ci->flags & CI_SECURE)))
- if ((access = get_access_entry(user->na->nc, ci)))
+ if ((access = get_access_entry(user->nc, ci)))
access->last_seen = time(NULL);
}