/UNBAN <ref#> works. /BAN list shows reference numbers.

git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1062 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2001-01-04 17:28:26 +00:00 committed by cras
commit d844880515
3 changed files with 21 additions and 5 deletions

View file

@ -188,6 +188,10 @@ static void bans_ask_channel(const char *channel, IRC_SERVER_REC *server,
static void bans_show_channel(IRC_CHANNEL_REC *channel, IRC_SERVER_REC *server)
{
GSList *tmp;
int counter;
if (!channel->synced)
cmd_return_error(CMDERR_CHAN_NOT_SYNCED);
if (channel->banlist == NULL && channel->ebanlist == NULL) {
printformat(server, channel->name, MSGLEVEL_CRAP,
@ -196,14 +200,16 @@ static void bans_show_channel(IRC_CHANNEL_REC *channel, IRC_SERVER_REC *server)
}
/* show bans.. */
counter = 1;
for (tmp = channel->banlist; tmp != NULL; tmp = tmp->next) {
BAN_REC *rec = tmp->data;
printformat(server, channel->name, MSGLEVEL_CRAP,
(rec->setby == NULL || *rec->setby == '\0') ?
IRCTXT_BANLIST : IRCTXT_BANLIST_LONG,
channel->name, rec->ban, rec->setby,
counter, channel->name, rec->ban, rec->setby,
(int) (time(NULL)-rec->time));
counter++;
}
/* ..and show ban exceptions.. */