From b5242e3be0801abd0edebf62955b1d1b6cd3fd7d Mon Sep 17 00:00:00 2001 From: Adam- Date: Tue, 1 Dec 2009 00:06:21 +0000 Subject: Fixed bug #1106 - Anope now keeps track of users cloaked hosts as well as virtual host and will use both in matching for things git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/stable@2679 5417fbe8-f217-4b02-8779-1006273d7864 --- src/actions.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/actions.c') diff --git a/src/actions.c b/src/actions.c index 31cf2db8f..6be45c112 100644 --- a/src/actions.c +++ b/src/actions.c @@ -181,7 +181,8 @@ void common_unban(ChannelInfo * ci, char *nick) for (ban = ci->c->bans->entries; ban; ban = next) { next = ban->next; if (entry_match(ban, u->nick, u->username, u->host, ip) || - entry_match(ban, u->nick, u->username, u->vhost, ip)) { + entry_match(ban, u->nick, u->username, u->vhost, ip) || + entry_match(ban, u->nick, u->username, u->chost, ip)) { anope_cmd_mode(whosends(ci), ci->name, "-b %s", ban->mask); if (ircdcap->tsmode) av[3] = ban->mask; @@ -240,10 +241,10 @@ char *common_get_vhost(User * u) if (!u) return NULL; - if (ircd->vhostmode && (u->mode & ircd->vhostmode)) - return u->vhost; - else if (ircd->vhost && u->vhost) + if (ircd->vhostmode && (u->mode & ircd->vhostmode) && u->vhost) return u->vhost; + else if (ircd->vhostmode && (u->mode & ircd->vhostmode) && u->chost) + return u->chost; else return u->host; } -- cgit