summaryrefslogtreecommitdiff
path: root/src/actions.c
diff options
context:
space:
mode:
authorAdam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864>2009-12-01 00:06:21 +0000
committerAdam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864>2009-12-01 00:06:21 +0000
commitb5242e3be0801abd0edebf62955b1d1b6cd3fd7d (patch)
tree2aa6d1c88fef3a0cfb12fee3e216a8cdcddc6af6 /src/actions.c
parent84ac00e953c9d8a03bd7b76bcdf5de26832edcfa (diff)
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
Diffstat (limited to 'src/actions.c')
-rw-r--r--src/actions.c9
1 files changed, 5 insertions, 4 deletions
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;
}