1
0
mirror of https://github.com/irssi/irssi.git synced 2024-06-30 06:45:25 +00:00

/NOTIFY, /NOTIFY -list: Added "The notify list is empty" message

git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1669 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2001-07-29 01:46:34 +00:00 committed by cras
parent 2a44f98a51
commit bdde1d884c
3 changed files with 13 additions and 3 deletions

View File

@ -89,8 +89,11 @@ static void cmd_notify_show(void)
GSList *nicks, *offline, *tmp;
IRC_SERVER_REC *server;
if (notifies == NULL)
if (notifies == NULL) {
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE,
IRCTXT_NOTIFY_LIST_EMPTY);
return;
}
/* build a list containing only the nicks */
nicks = NULL;
@ -164,7 +167,12 @@ static void notifylist_print(NOTIFYLIST_REC *rec)
static void cmd_notifylist_show(void)
{
g_slist_foreach(notifies, (GFunc) notifylist_print, NULL);
if (notifies == NULL) {
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE,
IRCTXT_NOTIFY_LIST_EMPTY);
} else {
g_slist_foreach(notifies, (GFunc) notifylist_print, NULL);
}
}
static void cmd_notify(const char *data)

View File

@ -36,6 +36,7 @@ FORMAT_REC fecommon_irc_notifylist_formats[] =
{ "notify_online", "On $0: {hilight $1}", 2, { 0, 0 } },
{ "notify_offline", "Offline: $0", 1, { 0 } },
{ "notify_list", "$0: $1 $2 $3", 4, { 0, 0, 0, 0 } },
{ "notify_list_empty", "The notify list is empty", 0 },
{ NULL, NULL, 0 },
};

View File

@ -12,7 +12,8 @@ enum {
IRCTXT_NOTIFY_UNIDLE,
IRCTXT_NOTIFY_ONLINE,
IRCTXT_NOTIFY_OFFLINE,
IRCTXT_NOTIFY_LIST
IRCTXT_NOTIFY_LIST,
IRCTXT_NOTIFY_LIST_EMPTY
};
extern FORMAT_REC fecommon_irc_notifylist_formats[];