mirror of
https://github.com/irssi/irssi.git
synced 2024-12-04 14:46:39 -05: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:
parent
2a44f98a51
commit
bdde1d884c
@ -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,8 +167,13 @@ static void notifylist_print(NOTIFYLIST_REC *rec)
|
||||
|
||||
static void cmd_notifylist_show(void)
|
||||
{
|
||||
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)
|
||||
{
|
||||
|
@ -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 },
|
||||
};
|
||||
|
@ -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[];
|
||||
|
Loading…
Reference in New Issue
Block a user