diff options
author | jantje_85 <jantje_85@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-07-31 17:55:24 +0000 |
---|---|---|
committer | jantje_85 <jantje_85@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-07-31 17:55:24 +0000 |
commit | 97a42e4f7da424b47619496c1ad4bfaef33a7d1f (patch) | |
tree | 808ef9c13f4bd6830f7afdb97c0429070b4e5fa2 /src | |
parent | 113237964dcc3f93181d42ea0a4ae1ecc1ebe08a (diff) |
Fixed a TS6 bug in chan_set_modes() causing restrictions such as secureops to fail if the IRCd sends UUIDs instead of nicks.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/stable@2398 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src')
-rw-r--r-- | src/channels.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/channels.c b/src/channels.c index bed260da9..c9b1b8db8 100644 --- a/src/channels.c +++ b/src/channels.c @@ -302,8 +302,10 @@ void chan_set_modes(const char *source, Channel * chan, int ac, char **av, } } - /* Don't bounce modes from u:lined clients or servers, bug #1004. */ + /* Don't bounce modes from u:lined clients or servers, bug #1004. * + * We can get UUIDs as well.. don not assume nick ~ Viper */ user = finduser(source); + if (!user && UseTS6 && ircd->ts6) user = find_byuid(source); if ((user && is_ulined(user->server->name)) || is_ulined((char *)source)) return; @@ -317,7 +319,9 @@ void chan_set_modes(const char *source, Channel * chan, int ac, char **av, real_ac--; real_av++; for (i = 0; i < real_ac; i++) { - if ((user = finduser(*real_av)) && is_on_chan(chan, user)) { + user = finduser(*real_av); + if (!user && UseTS6 && ircd->ts6) user = find_byuid(*real_av); + if (user && is_on_chan(chan, user)) { if (check < 2) chan_set_correct_modes(user, chan, 0); else if ((chan->ci->flags) && (chan->ci->flags & CI_SECUREOPS)) |