summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/actions.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/actions.c b/src/actions.c
index af08fd564..42c8c0e65 100644
--- a/src/actions.c
+++ b/src/actions.c
@@ -133,7 +133,7 @@ void common_unban(ChannelInfo * ci, char *nick)
int count, i;
char *av[3], **bans;
User *u;
- char *host;
+ char *host = NULL;
int matchfound = 0;
if (!ci || !ci->c || !nick) {
@@ -144,7 +144,11 @@ void common_unban(ChannelInfo * ci, char *nick)
return;
}
- host = host_resolve(u->host);
+ if (u->hostip == NULL) {
+ host = host_resolve(u->host);
+ } else {
+ host = sstrdup(u->hostip);
+ }
if (ircd->svsmode_unban) {
anope_cmd_unban(ci->name, nick);