diff options
author | Timo Sirainen <cras@irssi.org> | 2001-08-13 14:00:57 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2001-08-13 14:00:57 +0000 |
commit | f370a3cc2e5079d99a5ec3416c796052f969cf37 (patch) | |
tree | 1dba1e597baee48cd67ff0a1131141ae08ffd214 /src/fe-common/irc/fe-irc-commands.c | |
parent | ad33787379b6e7cc93192afda0ba0064d360332a (diff) | |
download | irssi-f370a3cc2e5079d99a5ec3416c796052f969cf37.zip |
/INVITELIST prints "Invite list is empty" message and complains about not
being synced. Changed level to CLIENTNOTICE when printing the "no bans"
message.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1744 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.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/fe-common/irc/fe-irc-commands.c b/src/fe-common/irc/fe-irc-commands.c index 482bc040..2ec00b1b 100644 --- a/src/fe-common/irc/fe-irc-commands.c +++ b/src/fe-common/irc/fe-irc-commands.c @@ -211,7 +211,7 @@ static void bans_show_channel(IRC_CHANNEL_REC *channel, IRC_SERVER_REC *server) cmd_return_error(CMDERR_CHAN_NOT_SYNCED); if (channel->banlist == NULL && channel->ebanlist == NULL) { - printformat(server, channel->name, MSGLEVEL_CRAP, + printformat(server, channel->name, MSGLEVEL_CLIENTNOTICE, IRCTXT_NO_BANS, channel->name); return; } @@ -302,8 +302,19 @@ static void cmd_invitelist(const char *data, IRC_SERVER_REC *server, WI_ITEM_REC channel = irc_channel_find(server, data); if (channel == NULL) cmd_return_error(CMDERR_CHAN_NOT_FOUND); - for (tmp = channel->invitelist; tmp != NULL; tmp = tmp->next) - printformat(server, channel->name, MSGLEVEL_CRAP, IRCTXT_INVITELIST, channel->name, tmp->data); + if (!channel->synced) + cmd_return_error(CMDERR_CHAN_NOT_SYNCED); + + if (channel->invitelist == NULL) { + printformat(server, channel->name, MSGLEVEL_CLIENTNOTICE, + IRCTXT_NO_INVITELIST, channel->name); + } else { + for (tmp = channel->invitelist; tmp != NULL; tmp = tmp->next) { + printformat(server, channel->name, MSGLEVEL_CRAP, + IRCTXT_INVITELIST, + channel->name, tmp->data); + } + } } static void cmd_join(const char *data, IRC_SERVER_REC *server) |