static int glines_cmdblock(void *source, int cargc, char **cargv) {
nick *sender = source;
- nick *target;
+ nick *target, *wnp;
whowas *ww;
int hits, duration, id;
int coff, overridesanity, overridelimit, simulate, chase;
controlreply(sender, "Found matching whowas record:");
controlreply(sender, "%s", whowas_format(ww));
} else {
- ww = whowas_fromnick(target);
+ ww = whowas_fromnick(target, 1);
ownww = 1;
}
glinebufcounthits(&gbuf, &hits, NULL);
id = glinebufcommit(&gbuf, 1);
- controlwall(NO_OPER, NL_GLINES, "%s BLOCK'ed user '%s!%s@%s' for %s with reason '%s' (%d hits)", controlid(sender), ww->nick->nick, ww->nick->ident, ww->nick->host->name->content, longtoduration(duration, 0), reason, hits);
+ wnp = &ww->nick;
+ controlwall(NO_OPER, NL_GLINES, "%s BLOCK'ed user '%s!%s@%s' for %s with reason '%s' (%d hits)", controlid(sender),
+ wnp->nick, wnp->ident, wnp->host->name->content,
+ longtoduration(duration, 0), reason, hits);
if (ownww)
whowas_free(ww);