From 3ddd984bfc9f9c991e168ebf938163772058f2c6 Mon Sep 17 00:00:00 2001 From: Jilles Tjoelker Date: Fri, 28 Nov 2008 20:43:59 +0000 Subject: Allow /ban, /unban, /kickban, /knockout if channel is not synced. Requesting ban lists from an unsynced channel will ask them from the server, banning a user whose u@h irssi does not know will ban nick!*@* and only bans irssi knows about can be removed. git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@4925 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/fe-common/irc/fe-irc-commands.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/fe-common/irc') diff --git a/src/fe-common/irc/fe-irc-commands.c b/src/fe-common/irc/fe-irc-commands.c index 6f208447..c9a9016e 100644 --- a/src/fe-common/irc/fe-irc-commands.c +++ b/src/fe-common/irc/fe-irc-commands.c @@ -211,9 +211,6 @@ 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) { printformat(server, channel->visible_name, MSGLEVEL_CLIENTNOTICE, @@ -265,9 +262,9 @@ static void cmd_ban(const char *data, IRC_SERVER_REC *server, if (*channel != '\0' && strcmp(channel, "*") != 0) chanrec = irc_channel_find(server, channel); - if (chanrec == NULL) { - /* not joined to such channel, - but ask ban lists from server */ + if (chanrec == NULL || !chanrec->synced) { + /* not joined to such channel or not yet synced, + ask ban lists from server */ bans_ask_channel(channel, server, item); } else { bans_show_channel(chanrec, server); -- cgit v1.2.3