diff options
author | Timo Sirainen <cras@irssi.org> | 2001-07-29 01:46:34 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2001-07-29 01:46:34 +0000 |
commit | bdde1d884c9c380770ea7487e1ce520d8c132308 (patch) | |
tree | eee94028874f120f664d0d7c1fb5c43f46e9db35 /src/fe-common/irc/notifylist | |
parent | 2a44f98a51927cc6660b064e754bacedcc919f2b (diff) | |
download | irssi-bdde1d884c9c380770ea7487e1ce520d8c132308.zip |
/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
Diffstat (limited to 'src/fe-common/irc/notifylist')
-rw-r--r-- | src/fe-common/irc/notifylist/fe-notifylist.c | 12 | ||||
-rw-r--r-- | src/fe-common/irc/notifylist/module-formats.c | 1 | ||||
-rw-r--r-- | src/fe-common/irc/notifylist/module-formats.h | 3 |
3 files changed, 13 insertions, 3 deletions
diff --git a/src/fe-common/irc/notifylist/fe-notifylist.c b/src/fe-common/irc/notifylist/fe-notifylist.c index dd4cbd2f..0afff392 100644 --- a/src/fe-common/irc/notifylist/fe-notifylist.c +++ b/src/fe-common/irc/notifylist/fe-notifylist.c @@ -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) diff --git a/src/fe-common/irc/notifylist/module-formats.c b/src/fe-common/irc/notifylist/module-formats.c index 0b29406e..0c1f3b2a 100644 --- a/src/fe-common/irc/notifylist/module-formats.c +++ b/src/fe-common/irc/notifylist/module-formats.c @@ -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 }, }; diff --git a/src/fe-common/irc/notifylist/module-formats.h b/src/fe-common/irc/notifylist/module-formats.h index e934def3..712310c8 100644 --- a/src/fe-common/irc/notifylist/module-formats.h +++ b/src/fe-common/irc/notifylist/module-formats.h @@ -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[]; |