mirror of
https://github.com/irssi/irssi.git
synced 2026-08-11 04:43:34 +02:00
/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:
parent
f3f80c1499
commit
d844880515
3 changed files with 21 additions and 5 deletions
|
|
@ -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.. */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue