diff options
author | Přemysl Janouch <p.janouch@gmail.com> | 2015-04-26 23:06:19 +0200 |
---|---|---|
committer | Přemysl Janouch <p.janouch@gmail.com> | 2015-04-26 23:06:19 +0200 |
commit | 21b8e8e539d3bfd368a77da99331f581b257d347 (patch) | |
tree | 9ec4219827c255654d7b6beb6f9edccb7bc01f44 /degesch.c | |
parent | 54262e2d206b21be2dffb11c2bdd2914b03675f2 (diff) | |
download | xK-21b8e8e539d3bfd368a77da99331f581b257d347.tar.gz xK-21b8e8e539d3bfd368a77da99331f581b257d347.tar.xz xK-21b8e8e539d3bfd368a77da99331f581b257d347.zip |
degesch: implement /list
Diffstat (limited to 'degesch.c')
-rw-r--r-- | degesch.c | 22 |
1 files changed, 19 insertions, 3 deletions
@@ -3423,6 +3423,19 @@ handle_command_part (struct app_context *ctx, char *arguments) } static bool +handle_command_list (struct app_context *ctx, char *arguments) +{ + if (!server_command_check (ctx, "list channels")) + return true; + + if (*arguments) + irc_send (ctx, "LIST %s", arguments); + else + irc_send (ctx, "LIST"); + return true; +} + +static bool handle_command_quote (struct app_context *ctx, char *arguments) { if (!server_command_check (ctx, "quote")) @@ -3460,9 +3473,9 @@ g_command_handlers[] = "<message>" }, { "join", handle_command_join, "Join channels", - "[channel...]" }, + "[<channel>[,<channel>...]]" }, { "part", handle_command_part, "Leave channels", - "[channel...]" }, + "[<channel>[,<channel>...]]" }, #if 0 { "cycle", NULL, "", "" }, @@ -3472,8 +3485,11 @@ g_command_handlers[] = { "kickban", NULL, "", "" }, { "ban", NULL, "", "" }, { "invite", NULL, "", "" }, +#endif - { "list", NULL, "", "" }, + { "list", handle_command_list, "List channels and their topic", + "[<channel>[,<channel>...]] [server]" }, +#if 0 { "names", NULL, "", "" }, { "who", NULL, "", "" }, { "whois", NULL, "", "" }, |