summaryrefslogtreecommitdiff
path: root/src/fe-common/core/fe-channels.c
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2001-07-14 18:19:22 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2001-07-14 18:19:22 +0000
commit4425f87f98398605f6998cb1a229e96d813aaed0 (patch)
treee2605b3ae7c810ab326ec7e900d823507a0ca932 /src/fe-common/core/fe-channels.c
parentfca13a0fba06fedcc1828ad76f53fa2424e6aec9 (diff)
downloadirssi-4425f87f98398605f6998cb1a229e96d813aaed0.zip
/NAMES -count: print only the Total xxx nicks line
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1615 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/fe-common/core/fe-channels.c')
-rw-r--r--src/fe-common/core/fe-channels.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/fe-common/core/fe-channels.c b/src/fe-common/core/fe-channels.c
index 67557b91..a2c86e33 100644
--- a/src/fe-common/core/fe-channels.c
+++ b/src/fe-common/core/fe-channels.c
@@ -465,7 +465,8 @@ void fe_channels_nicklist(CHANNEL_REC *channel, int flags)
/* display the nicks */
printformat(channel->server, channel->name,
MSGLEVEL_CRAP, TXT_NAMES, channel->name, "");
- display_sorted_nicks(channel, sorted);
+ if ((flags & CHANNEL_NICKLIST_FLAG_COUNT) == 0)
+ display_sorted_nicks(channel, sorted);
g_slist_free(sorted);
printformat(channel->server, channel->name,
@@ -473,7 +474,7 @@ void fe_channels_nicklist(CHANNEL_REC *channel, int flags)
channel->name, nicks, ops, voices, normal);
}
-/* SYNTAX: NAMES [-ops -halfops -voices -normal] [<channels> | **] */
+/* SYNTAX: NAMES [-count | -ops -halfops -voices -normal] [<channels> | **] */
static void cmd_names(const char *data, SERVER_REC *server, WI_ITEM_REC *item)
{
CHANNEL_REC *chanrec;
@@ -507,6 +508,8 @@ static void cmd_names(const char *data, SERVER_REC *server, WI_ITEM_REC *item)
flags |= CHANNEL_NICKLIST_FLAG_VOICES;
if (g_hash_table_lookup(optlist, "normal") != NULL)
flags |= CHANNEL_NICKLIST_FLAG_NORMAL;
+ if (g_hash_table_lookup(optlist, "count") != NULL)
+ flags |= CHANNEL_NICKLIST_FLAG_COUNT;
if (flags == 0) flags = CHANNEL_NICKLIST_FLAG_ALL;
@@ -587,7 +590,7 @@ void fe_channels_init(void)
command_bind("cycle", NULL, (SIGNAL_FUNC) cmd_cycle);
command_set_options("channel add", "auto noauto -bots -botcmd");
- command_set_options("names", "ops halfops voices normal");
+ command_set_options("names", "count ops halfops voices normal");
command_set_options("join", "window");
}