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
This commit is contained in:
Jilles Tjoelker 2008-11-28 20:43:59 +00:00 committed by jilles
commit 3ddd984bfc
3 changed files with 10 additions and 13 deletions

View file

@ -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);