summaryrefslogtreecommitdiff
path: root/src/fe-common/irc/fe-irc-commands.c
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2001-01-04 17:28:26 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2001-01-04 17:28:26 +0000
commitd844880515cca4f0f3984b3d9de71c0b168b647b (patch)
tree08919043ca016131fe1e844b3b614df19d61018c /src/fe-common/irc/fe-irc-commands.c
parentf3f80c14991779433c9a1eb13554d846a33205c6 (diff)
downloadirssi-d844880515cca4f0f3984b3d9de71c0b168b647b.zip
/UNBAN <ref#> works. /BAN list shows reference numbers.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1062 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/fe-common/irc/fe-irc-commands.c')
-rw-r--r--src/fe-common/irc/fe-irc-commands.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/fe-common/irc/fe-irc-commands.c b/src/fe-common/irc/fe-irc-commands.c
index c6fae677..252b568d 100644
--- a/src/fe-common/irc/fe-irc-commands.c
+++ b/src/fe-common/irc/fe-irc-commands.c
@@ -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.. */