1
0
mirror of https://github.com/irssi/irssi.git synced 2024-09-01 04:14:16 -04:00

/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
This commit is contained in:
Timo Sirainen 2001-08-13 14:00:57 +00:00 committed by cras
parent ad33787379
commit f370a3cc2e
3 changed files with 16 additions and 3 deletions

View File

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

View File

@ -73,6 +73,7 @@ FORMAT_REC fecommon_irc_formats[] = {
{ "banlist_long", "$0 - {channel $1}: ban {ban $2} {comment by {nick $3}, $4 secs ago}", 5, { 1, 0, 0, 0, 1 } },
{ "ebanlist", "{channel $0}: ban exception {ban $1}", 2, { 0, 0 } },
{ "ebanlist_long", "{channel $0}: ban exception {ban $1} {comment by {nick $2}, $3 secs ago}", 4, { 0, 0, 0, 1 } },
{ "no_invitelist", "Invite list is empty in channel {channel $0}", 1, { 0 } },
{ "invitelist", "{channel $0}: invite {ban $1}", 2, { 0, 0 } },
{ "no_such_channel", "{channel $0}: No such channel", 1, { 0 } },
{ "channel_synced", "Join to {channel $0} was synced in {hilight $1} secs", 2, { 0, 2 } },

View File

@ -50,6 +50,7 @@ enum {
IRCTXT_BANLIST_LONG,
IRCTXT_EBANLIST,
IRCTXT_EBANLIST_LONG,
IRCTXT_NO_INVITELIST,
IRCTXT_INVITELIST,
IRCTXT_NO_SUCH_CHANNEL,
IRCTXT_CHANNEL_SYNCED,