diff options
author | Timo Sirainen <cras@irssi.org> | 2000-07-23 23:19:22 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2000-07-23 23:19:22 +0000 |
commit | c529fe0096eddd0e6e12157cf8486ad9117de900 (patch) | |
tree | 2f39a225641823277f9acea56a95a6081e2eec99 /src | |
parent | 3e9164df1b9ad8433d3c46745b84c5df5f5207df (diff) | |
download | irssi-c529fe0096eddd0e6e12157cf8486ad9117de900.zip |
Added syntaxes of all commands in comments, they're going to be used to
autogenerate help files.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@529 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src')
27 files changed, 186 insertions, 21 deletions
diff --git a/src/core/commands.c b/src/core/commands.c index 57e17592..5fbec304 100644 --- a/src/core/commands.c +++ b/src/core/commands.c @@ -669,6 +669,7 @@ static void event_command(const char *line, SERVER_REC *server, void *item) parse_command(line, expand_aliases, server, item); } +/* SYNTAX: EVAL <command(s)> */ static void cmd_eval(const char *data, SERVER_REC *server, void *item) { g_return_if_fail(data != NULL); @@ -676,6 +677,7 @@ static void cmd_eval(const char *data, SERVER_REC *server, void *item) eval_special_string(data, "", server, item); } +/* SYNTAX: CD <directory> */ static void cmd_cd(const char *data) { char *str; diff --git a/src/fe-common/core/fe-core-commands.c b/src/fe-common/core/fe-core-commands.c index 351027a0..b44c212e 100644 --- a/src/fe-common/core/fe-core-commands.c +++ b/src/fe-common/core/fe-core-commands.c @@ -234,6 +234,7 @@ static void show_help(const char *data) } } +/* SYNTAX: HELP [<command>] */ static void cmd_help(const char *data) { char *cmd, *ptr; @@ -246,6 +247,7 @@ static void cmd_help(const char *data) g_free(cmd); } +/* SYNTAX: ECHO [<text>] */ static void cmd_echo(const char *data, void *server, WI_ITEM_REC *item) { g_return_if_fail(data != NULL); @@ -253,6 +255,7 @@ static void cmd_echo(const char *data, void *server, WI_ITEM_REC *item) printtext(server, item == NULL ? NULL : item->name, MSGLEVEL_CRAP, "%s", data); } +/* SYNTAX: VERSION */ static void cmd_version(char *data) { g_return_if_fail(data != NULL); @@ -261,6 +264,7 @@ static void cmd_version(char *data) printtext(NULL, NULL, MSGLEVEL_CLIENTNOTICE, "Client: "PACKAGE" " IRSSI_VERSION); } +/* SYNTAX: CAT <file> */ static void cmd_cat(const char *data) { LINEBUF_REC *buffer = NULL; @@ -297,6 +301,7 @@ static void cmd_cat(const char *data) close(f); } +/* SYNTAX: BEEP */ static void cmd_beep(void) { printbeep(); diff --git a/src/fe-common/core/fe-log.c b/src/fe-common/core/fe-log.c index 33613b27..24e7065e 100644 --- a/src/fe-common/core/fe-log.c +++ b/src/fe-common/core/fe-log.c @@ -41,10 +41,10 @@ static int autolog_level; static int autoremove_tag; static const char *autolog_path; +/* SYNTAX: LOG OPEN [-noopen] [-autoopen] [-targets <targets>] [-window] + [-rotate hourly|daily|weekly|monthly] <fname> [<levels>] */ static void cmd_log_open(const char *data) { - /* /LOG OPEN [-noopen] [-autoopen] [-targets <targets>] [-window] - [-rotate hour|day|week|month] <fname> [<levels>] */ GHashTable *optlist; char *targetarg, *rotatearg, *fname, *levels; void *free_arg; @@ -109,6 +109,7 @@ static LOG_REC *log_find_from_data(const char *data) return tmp == NULL ? NULL : tmp->data; } +/* SYNTAX: LOG CLOSE <id>|<file> */ static void cmd_log_close(const char *data) { LOG_REC *log; @@ -122,6 +123,7 @@ static void cmd_log_close(const char *data) } } +/* SYNTAX: LOG START <id>|<file> */ static void cmd_log_start(const char *data) { LOG_REC *log; @@ -133,6 +135,7 @@ static void cmd_log_start(const char *data) } } +/* SYNTAX: LOG STOP <id>|<file> */ static void cmd_log_stop(const char *data) { LOG_REC *log; @@ -146,6 +149,7 @@ static void cmd_log_stop(const char *data) } } +/* SYNTAX: LOG LIST */ static void cmd_log_list(void) { GSList *tmp; @@ -196,9 +200,9 @@ static LOG_REC *log_find_item(const char *item) return NULL; } +/* SYNTAX: WINDOW LOG on|off|toggle [<filename>] */ static void cmd_window_log(const char *data) { - /* /WINDOW LOG ON|OFF|TOGGLE [<filename>] */ LOG_REC *log; char *set, *fname, window[MAX_INT_STRLEN]; void *free_arg; @@ -247,6 +251,7 @@ static void cmd_window_log(const char *data) } /* Create log file entry to window, but don't start logging */ +/* SYNTAX: WINDOW LOGFILE <file> */ static void cmd_window_logfile(const char *data) { LOG_REC *log; diff --git a/src/fe-common/core/fe-modules.c b/src/fe-common/core/fe-modules.c index b290bde3..1db51731 100644 --- a/src/fe-common/core/fe-modules.c +++ b/src/fe-common/core/fe-modules.c @@ -50,6 +50,7 @@ static void sig_module_unloaded(MODULE_REC *rec) printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, IRCTXT_MODULE_UNLOADED, rec->name); } +/* SYNTAX: LOAD <module> */ static void cmd_load(const char *data) { g_return_if_fail(data != NULL); @@ -58,6 +59,7 @@ static void cmd_load(const char *data) module_load(data); } +/* SYNTAX: UNLOAD <module> */ static void cmd_unload(const char *data) { MODULE_REC *rec; diff --git a/src/fe-common/core/fe-settings.c b/src/fe-common/core/fe-settings.c index cb88c545..f164d130 100644 --- a/src/fe-common/core/fe-settings.c +++ b/src/fe-common/core/fe-settings.c @@ -63,6 +63,7 @@ static void set_boolean(const char *key, const char *value) printformat(NULL, NULL, MSGLEVEL_CLIENTCRAP, IRCTXT_NOT_TOGGLE); } +/* SYNTAX: SET [-clear] [<key> [<value>] */ static void cmd_set(char *data) { GHashTable *optlist; @@ -123,6 +124,7 @@ static void cmd_set(char *data) cmd_params_free(free_arg); } +/* SYNTAX: TOGGLE <key> [on|off|toggle] */ static void cmd_toggle(const char *data) { char *key, *value; @@ -198,6 +200,7 @@ static void alias_remove(const char *alias) } } +/* SYNTAX: ALIAS [[-]<alias> [<command>]] */ static void cmd_alias(const char *data) { char *alias, *value; @@ -219,6 +222,7 @@ static void cmd_alias(const char *data) cmd_params_free(free_arg); } +/* SYNTAX: UNALIAS <alias> */ static void cmd_unalias(const char *data) { g_return_if_fail(data != NULL); @@ -227,6 +231,7 @@ static void cmd_unalias(const char *data) alias_remove(data); } +/* SYNTAX: RELOAD [<file>] */ static void cmd_reload(const char *data) { char *fname; @@ -240,6 +245,7 @@ static void cmd_reload(const char *data) g_free(fname); } +/* SYNTAX: SAVE [<file>] */ static void cmd_save(const char *data) { if (settings_save(*data != '\0' ? data : NULL)) { diff --git a/src/fe-common/core/hilight-text.c b/src/fe-common/core/hilight-text.c index 012aa20d..06f30123 100644 --- a/src/fe-common/core/hilight-text.c +++ b/src/fe-common/core/hilight-text.c @@ -356,9 +356,11 @@ static void cmd_hilight_show(void) printformat(NULL, NULL, MSGLEVEL_CLIENTCRAP, IRCTXT_HILIGHT_FOOTER); } +/* SYNTAX: HILIGHT [-nick | -nonick] [-mask | -regexp | -word] + [-color <color>] [-level <level>] + [-channels <channels>] <text> */ static void cmd_hilight(const char *data) { - /* /HILIGHT [-nick | -nonick] [-mask | -regexp | -word] [-color <color>] [-level <level>] [-channels <channels>] <text> */ GHashTable *optlist; HILIGHT_REC *rec; char *colorarg, *levelarg, *chanarg, *text; @@ -419,6 +421,7 @@ static void cmd_hilight(const char *data) cmd_params_free(free_arg); } +/* SYNTAX: DEHILIGHT <id>|<mask> */ static void cmd_dehilight(const char *data) { HILIGHT_REC *rec; diff --git a/src/fe-common/core/keyboard.c b/src/fe-common/core/keyboard.c index 2d340ef5..de169d00 100644 --- a/src/fe-common/core/keyboard.c +++ b/src/fe-common/core/keyboard.c @@ -300,6 +300,7 @@ static void cmd_show_keys(const char *searchkey, int full) } } +/* SYNTAX: BIND [<key> [<command> [<data>]]] */ static void cmd_bind(const char *data) { GHashTable *optlist; diff --git a/src/fe-common/core/themes.c b/src/fe-common/core/themes.c index 3179a990..bf818317 100644 --- a/src/fe-common/core/themes.c +++ b/src/fe-common/core/themes.c @@ -346,6 +346,7 @@ static void theme_show(THEME_SEARCH_REC *rec, const char *key, const char *value } } +/* SYNTAX: FORMAT [-delete | -reset] [<module>] [<key> [<value>]] */ static void cmd_format(const char *data) { GHashTable *optlist; @@ -354,7 +355,6 @@ static void cmd_format(const char *data) void *free_arg; int reset; - /* /FORMAT [<module>] [<key> [<value>]] */ if (!cmd_get_params(data, &free_arg, 3 | PARAM_FLAG_GETREST | PARAM_FLAG_OPTIONS, "format", &optlist, &module, &key, &value)) return; diff --git a/src/fe-common/core/window-commands.c b/src/fe-common/core/window-commands.c index c41b6e48..a418cec0 100644 --- a/src/fe-common/core/window-commands.c +++ b/src/fe-common/core/window-commands.c @@ -35,6 +35,7 @@ static void cmd_window(const char *data, void *server, WI_ITEM_REC *item) command_runsub("window", data, server, item); } +/* SYNTAX: WINDOW NEW [hide] */ static void cmd_window_new(const char *data, void *server, WI_ITEM_REC *item) { WINDOW_REC *window; @@ -50,6 +51,7 @@ static void cmd_window_new(const char *data, void *server, WI_ITEM_REC *item) window_change_server(window, server); } +/* SYNTAX: WINDOW CLOSE */ static void cmd_window_close(const char *data) { /* destroy window unless it's the last one */ @@ -57,6 +59,7 @@ static void cmd_window_close(const char *data) window_destroy(active_win); } +/* SYNTAX: WINDOW REFNUM <number> */ static void cmd_window_refnum(const char *data) { WINDOW_REC *window; @@ -101,6 +104,7 @@ static WINDOW_REC *window_highest_activity(WINDOW_REC *window) return max_win; } +/* SYNTAX: WINDOW GOTO active|<number>|<name> */ static void cmd_window_goto(const char *data) { WINDOW_REC *window; @@ -121,6 +125,7 @@ static void cmd_window_goto(const char *data) window_set_active(window); } +/* SYNTAX: WINDOW NEXT */ static void cmd_window_next(void) { int num; @@ -131,12 +136,14 @@ static void cmd_window_next(void) window_set_active(window_find_refnum(num)); } +/* SYNTAX: WINDOW LAST */ static void cmd_window_last(void) { if (windows->next != NULL) window_set_active(windows->next->data); } +/* SYNTAX: WINDOW PREV */ static void cmd_window_prev(void) { int num; @@ -147,6 +154,7 @@ static void cmd_window_prev(void) window_set_active(window_find_refnum(num)); } +/* SYNTAX: WINDOW LEVEL [<level>] */ static void cmd_window_level(const char *data) { char *level; @@ -160,6 +168,7 @@ static void cmd_window_level(const char *data) g_free(level); } +/* SYNTAX: WINDOW SERVER <tag> */ static void cmd_window_server(const char *data) { SERVER_REC *server; @@ -176,16 +185,24 @@ static void cmd_window_server(const char *data) } } +static void cmd_window_item(const char *data, void *server, WI_ITEM_REC *item) +{ + command_runsub("window item", data, server, item); +} + +/* SYNTAX: WINDOW ITEM PREV */ static void cmd_window_item_prev(void) { window_item_prev(active_win); } +/* SYNTAX: WINDOW ITEM NEXT */ static void cmd_window_item_next(void) { window_item_next(active_win); } +/* SYNTAX: WINDOW NUMBER <number> */ static void cmd_window_number(const char *data) { int num; @@ -197,6 +214,7 @@ static void cmd_window_number(const char *data) window_set_refnum(active_win, num); } +/* SYNTAX: WINDOW NAME <name> */ static void cmd_window_name(const char *data) { window_set_name(active_win, data); @@ -267,6 +285,7 @@ static void cmd_window_move_right(void) windows_move_right(active_win); } +/* SYNTAX: WINDOW MOVE <number>|left|right */ static void cmd_window_move(const char *data, SERVER_REC *server, WI_ITEM_REC *item) { int new_refnum, refnum; @@ -313,6 +332,7 @@ static GSList *windows_get_sorted(void) return list; } +/* SYNTAX: WINDOW LIST */ static void cmd_window_list(void) { GSList *tmp, *sorted; @@ -348,6 +368,7 @@ void window_commands_init(void) command_bind("window next", NULL, (SIGNAL_FUNC) cmd_window_next); command_bind("window last", NULL, (SIGNAL_FUNC) cmd_window_last); command_bind("window level", NULL, (SIGNAL_FUNC) cmd_window_level); + command_bind("window item", NULL, (SIGNAL_FUNC) cmd_window_item); command_bind("window item prev", NULL, (SIGNAL_FUNC) cmd_window_item_prev); command_bind("window item next", NULL, (SIGNAL_FUNC) cmd_window_item_next); command_bind("window number", NULL, (SIGNAL_FUNC) cmd_window_number); @@ -371,6 +392,7 @@ void window_commands_deinit(void) command_unbind("window next", (SIGNAL_FUNC) cmd_window_next); command_unbind("window last", (SIGNAL_FUNC) cmd_window_last); command_unbind("window level", (SIGNAL_FUNC) cmd_window_level); + command_unbind("window item", (SIGNAL_FUNC) cmd_window_item); command_unbind("window item prev", (SIGNAL_FUNC) cmd_window_item_prev); command_unbind("window item next", (SIGNAL_FUNC) cmd_window_item_next); command_unbind("window number", (SIGNAL_FUNC) cmd_window_number); diff --git a/src/fe-common/irc/fe-channels.c b/src/fe-common/irc/fe-channels.c index 7a895b4f..42cd9a1d 100644 --- a/src/fe-common/irc/fe-channels.c +++ b/src/fe-common/irc/fe-channels.c @@ -153,6 +153,7 @@ static void cmd_channel_list_joined(void) } } +/* SYNTAX: CHANNEL LIST */ static void cmd_channel_list(void) { GString *str; @@ -190,6 +191,8 @@ static void cmd_channel(const char *data, IRC_SERVER_REC *server, WI_ITEM_REC *i command_runsub("channel", data, server, item); } +/* SYNTAX: CHANNEL ADD [-auto | -noauto] [-bots <masks>] [-botcmd <command>] + <channel> <ircnet> [<password>] */ static void cmd_channel_add(const char *data) { GHashTable *optlist; @@ -227,6 +230,7 @@ static void cmd_channel_add(const char *data) cmd_params_free(free_arg); } +/* SYNTAX: CHANNEL REMOVE <channel> <ircnet> */ static void cmd_channel_remove(const char *data) { SETUP_CHANNEL_REC *rec; diff --git a/src/fe-common/irc/fe-ignore.c b/src/fe-common/irc/fe-ignore.c index 9056df15..2de35d94 100644 --- a/src/fe-common/irc/fe-ignore.c +++ b/src/fe-common/irc/fe-ignore.c @@ -148,14 +148,12 @@ static void cmd_ignore_show(void) printformat(NULL, NULL, MSGLEVEL_CLIENTCRAP, IRCTXT_IGNORE_FOOTER); } +/* SYNTAX: IGNORE [-regexp | -word] [-pattern <pattern>] [-except] [-replies] + [-channels <channel>] [-time <secs>] <mask> <levels> + IGNORE [-regexp | -word] [-pattern <pattern>] [-except] [-replies] + [-time <secs>] <channels> <levels> */ static void cmd_ignore(const char *data) { - /* /IGNORE [-regexp | -word] [-pattern <pattern>] [-except] - [-replies] [-channels <channel>] [-time <secs>] <mask> <levels> - OR - - /IGNORE [-regexp | -word] [-pattern <pattern>] [-except] [-replies] - [-time <secs>] <channels> <levels> */ GHashTable *optlist; IGNORE_REC *rec; char *patternarg, *chanarg, *mask, *levels, *key, *timestr; @@ -247,6 +245,7 @@ static void fe_unignore(IGNORE_REC *rec) ignore_update_rec(rec); } +/* SYNTAX: UNIGNORE <id>|<mask> */ static void cmd_unignore(const char *data) { IGNORE_REC *rec; diff --git a/src/fe-common/irc/fe-irc-commands.c b/src/fe-common/irc/fe-irc-commands.c index 31af63df..e8e8c689 100644 --- a/src/fe-common/irc/fe-irc-commands.c +++ b/src/fe-common/irc/fe-irc-commands.c @@ -38,6 +38,7 @@ #include "windows.h" #include "window-items.h" +/* SYNTAX: UNQUERY [<nick>] */ static void cmd_unquery(const char *data, IRC_SERVER_REC *server, WI_IRC_REC *item) { QUERY_REC *query; @@ -59,7 +60,8 @@ static void cmd_unquery(const char *data, IRC_SERVER_REC *server, WI_IRC_REC *it query_destroy(query); } -static void cmd_query(gchar *data, IRC_SERVER_REC *server, WI_IRC_REC *item) +/* SYNTAX: QUERY <nick> */ +static void cmd_query(const char *data, IRC_SERVER_REC *server, WI_IRC_REC *item) { WINDOW_REC *window; QUERY_REC *query; @@ -178,6 +180,7 @@ static void cmd_msg(gchar *data, IRC_SERVER_REC *server, WI_ITEM_REC *item) cmd_params_free(free_arg); } +/* SYNTAX: ME <message> */ static void cmd_me(gchar *data, IRC_SERVER_REC *server, WI_IRC_REC *item) { g_return_if_fail(data != NULL); @@ -195,6 +198,7 @@ static void cmd_me(gchar *data, IRC_SERVER_REC *server, WI_IRC_REC *item) irc_send_cmdv(server, "PRIVMSG %s :\001ACTION %s\001", item->name, data); } +/* SYNTAX: ACTION [<target>] <message> */ static void cmd_action(const char *data, IRC_SERVER_REC *server) { char *target, *text; @@ -216,7 +220,8 @@ static void cmd_action(const char *data, IRC_SERVER_REC *server) cmd_params_free(free_arg); } -static void cmd_notice(gchar *data, IRC_SERVER_REC *server) +/* SYNTAX: NOTICE [<target>] <message> */ +static void cmd_notice(const char *data, IRC_SERVER_REC *server) { char *target, *msg; void *free_arg; @@ -307,6 +312,7 @@ static void cmd_wall(const char *data, IRC_SERVER_REC *server, WI_IRC_REC *item) cmd_params_free(free_arg); } +/* SYNTAX: BAN [<channel>] [<nicks>] */ static void cmd_ban(const char *data, IRC_SERVER_REC *server, WI_IRC_REC *item) { CHANNEL_REC *cur_channel, *channel; @@ -336,6 +342,7 @@ static void cmd_ban(const char *data, IRC_SERVER_REC *server, WI_IRC_REC *item) g_string_sprintf(str, "%s e", data); signal_emit("command mode", 3, str->str, server, cur_channel); g_string_free(str, TRUE); + signal_stop(); return; } } @@ -369,6 +376,7 @@ static void cmd_ban(const char *data, IRC_SERVER_REC *server, WI_IRC_REC *item) signal_stop(); } +/* SYNTAX: INVITELIST [<channel>] */ static void cmd_invitelist(const char *data, IRC_SERVER_REC *server, WI_IRC_REC *item) { CHANNEL_REC *channel, *cur_channel; @@ -412,6 +420,7 @@ static void cmd_nick(const char *data, IRC_SERVER_REC *server) signal_stop(); } +/* SYNTAX: VER [<target>] */ static void cmd_ver(gchar *data, IRC_SERVER_REC *server, WI_IRC_REC *item) { char *str; @@ -428,6 +437,7 @@ static void cmd_ver(gchar *data, IRC_SERVER_REC *server, WI_IRC_REC *item) g_free(str); } +/* SYNTAX: TS */ static void cmd_ts(const char *data) { GSList *tmp; diff --git a/src/fe-common/irc/fe-irc-server.c b/src/fe-common/irc/fe-irc-server.c index 140284fd..cf85c103 100644 --- a/src/fe-common/irc/fe-irc-server.c +++ b/src/fe-common/irc/fe-irc-server.c @@ -78,6 +78,9 @@ static void print_reconnects(void) } } +/* SYNTAX: SERVER ADD [-auto | -noauto] [-ircnet <ircnet>] [-host <hostname>] + [-cmdspeed <ms>] [-cmdmax <count>] [-port <port>] + <address> [<port> [<password>]] */ static void cmd_server_add(const char *data) { GHashTable *optlist; @@ -132,6 +135,7 @@ static void cmd_server_add(const char *data) cmd_params_free(free_arg); } +/* SYNTAX: SERVER REMOVE <address> [<port>] */ static void cmd_server_remove(const char *data) { SETUP_SERVER_REC *rec; @@ -142,7 +146,7 @@ static void cmd_server_remove(const char *data) if (!cmd_get_params(data, &free_arg, 2, &addr, &portstr)) return; if (*addr == '\0') cmd_param_error(CMDERR_NOT_ENOUGH_PARAMS); - port = *portstr == '\0' ? 6667 : atoi(portstr); + port = *portstr == '\0' ? -1 : atoi(portstr); rec = server_setup_find(addr, port); if (rec == NULL) @@ -155,6 +159,7 @@ static void cmd_server_remove(const char *data) cmd_params_free(free_arg); } +/* SYNTAX: SERVER LIST */ static void cmd_server_list(const char *data) { GString *str; diff --git a/src/fe-common/irc/fe-ircnet.c b/src/fe-common/irc/fe-ircnet.c index 9a361bce..34f1642a 100644 --- a/src/fe-common/irc/fe-ircnet.c +++ b/src/fe-common/irc/fe-ircnet.c @@ -72,6 +72,10 @@ static void cmd_ircnet_list(void) printformat(NULL, NULL, MSGLEVEL_CLIENTCRAP, IRCTXT_IRCNET_FOOTER); } +/* SYNTAX: IRCNET ADD [-kicks <count>] [-msgs <count>] [-modes <count>] + [-whois <count>] [-cmdspeed <ms>] [-cmdmax <count>] + [-nick <nick>] [-user <user>] [-realname <name>] + [-host <host>] [-autosendcmd <cmd>] <name> */ static void cmd_ircnet_add(const char *data) { GHashTable *optlist; @@ -135,6 +139,7 @@ static void cmd_ircnet_add(const char *data) cmd_params_free(free_arg); } +/* SYNTAX: IRCNET REMOVE <ircnet> */ static void cmd_ircnet_remove(const char *data) { IRCNET_REC *rec; diff --git a/src/fe-common/irc/fe-netsplit.c b/src/fe-common/irc/fe-netsplit.c index 8ce978ac..2d834871 100644 --- a/src/fe-common/irc/fe-netsplit.c +++ b/src/fe-common/irc/fe-netsplit.c @@ -239,6 +239,7 @@ static void split_print(const char *nick, NETSPLIT_REC *rec) rec->server->server, rec->server->destserver); } +/* SYNTAX: NETSPLIT */ static void cmd_netsplit(const char *data, IRC_SERVER_REC *server) { if (server == NULL || !server->connected) diff --git a/src/fe-text/gui-printtext.c b/src/fe-text/gui-printtext.c index 49250513..a38aa4c8 100644 --- a/src/fe-text/gui-printtext.c +++ b/src/fe-text/gui-printtext.c @@ -328,6 +328,7 @@ static void window_clear(GUI_WINDOW_REC *gui) screen_refresh(); } +/* SYNTAX: CLEAR */ static void cmd_clear(void) { GUI_WINDOW_REC *gui; diff --git a/src/fe-text/gui-textwidget.c b/src/fe-text/gui-textwidget.c index f436a9d6..2c8607b8 100644 --- a/src/fe-text/gui-textwidget.c +++ b/src/fe-text/gui-textwidget.c @@ -161,6 +161,8 @@ static GList *lastlog_find_startline(GList *list, int count, int start, int leve return list; } +/* SYNTAX: LASTLOG [-] [-new | -away] [-regexp | -word] [-<levels>] + [<pattern>] [<count> [<start>]] */ static void cmd_lastlog(const char *data) { GHashTable *optlist; @@ -241,6 +243,7 @@ static void cmd_scrollback(gchar *data, SERVER_REC *server, WI_ITEM_REC *item) command_runsub("scrollback", data, server, item); } +/* SYNTAX: SCROLLBACK CLEAR */ static void cmd_scrollback_clear(gchar *data) { gui_window_clear(active_win); @@ -275,6 +278,7 @@ static void scrollback_goto_pos(WINDOW_REC *window, GList *pos) signal_emit("gui page scrolled", 1, window); } +/* SYNTAX: SCROLLBACK GOTO <+|-linecount>|<linenum>|<timestamp> */ static void cmd_scrollback_goto(gchar *data) { GList *pos; @@ -367,6 +371,7 @@ static void cmd_scrollback_goto(gchar *data) cmd_params_free(free_arg); } +/* SYNTAX: SCROLLBACK HOME */ static void cmd_scrollback_home(const char *data) { GUI_WINDOW_REC *gui; @@ -386,6 +391,7 @@ static void cmd_scrollback_home(const char *data) signal_emit("gui page scrolled", 1, active_win); } +/* SYNTAX: SCROLLBACK END */ static void cmd_scrollback_end(const char *data) { GUI_WINDOW_REC *gui; diff --git a/src/fe-text/mainwindows.c b/src/fe-text/mainwindows.c index e30c0eb4..1ca9cba5 100644 --- a/src/fe-text/mainwindows.c +++ b/src/fe-text/mainwindows.c @@ -411,6 +411,7 @@ static void mainwindows_resize_two(MAIN_WINDOW_REC *grow_win, MAIN_WINDOW_REC *s statusbar_redraw(shrink_win->statusbar); } +/* SYNTAX: WINDOW GROW [<lines>] */ static void cmd_window_grow(const char *data) { MAIN_WINDOW_REC *window, *shrink_win; @@ -439,6 +440,7 @@ static void cmd_window_grow(const char *data) mainwindows_resize_two(window, shrink_win, count); } +/* SYNTAX: WINDOW SHRINK [<lines>] */ static void cmd_window_shrink(const char *data) { MAIN_WINDOW_REC *window, *grow_win; @@ -467,6 +469,7 @@ static void cmd_window_shrink(const char *data) mainwindows_resize_two(grow_win, window, count); } +/* SYNTAX: WINDOW SIZE <lines> */ static void cmd_window_size(const char *data) { char sizestr[MAX_INT_STRLEN]; @@ -485,6 +488,7 @@ static void cmd_window_size(const char *data) cmd_window_grow(sizestr); } +/* SYNTAX: WINDOW BALANCE */ static void cmd_window_balance(void) { GSList *sorted, *tmp; @@ -522,6 +526,7 @@ static void cmd_window_balance(void) statusbar_redraw(NULL); } +/* SYNTAX: WINDOW HIDE [<number>|<name>] */ static void cmd_window_hide(const char *data) { WINDOW_REC *window; @@ -549,6 +554,7 @@ static void cmd_window_hide(const char *data) } } +/* SYNTAX: WINDOW SHOW <number>|<name> */ static void cmd_window_show(const char *data) { WINDOW_REC *window; @@ -569,6 +575,7 @@ static void cmd_window_show(const char *data) window_set_active(window); } +/* SYNTAX: WINDOW UP */ static void cmd_window_up(void) { MAIN_WINDOW_REC *rec; @@ -578,6 +585,7 @@ static void cmd_window_up(void) window_set_active(rec->active); } +/* SYNTAX: WINDOW DOWN */ static void cmd_window_down(void) { MAIN_WINDOW_REC *rec; diff --git a/src/irc/core/bans.c b/src/irc/core/bans.c index 914fad65..b5b4e886 100644 --- a/src/irc/core/bans.c +++ b/src/irc/core/bans.c @@ -196,16 +196,20 @@ static void command_set_ban(const char *data, IRC_SERVER_REC *server, WI_IRC_REC cmd_params_free(free_arg); } +/* SYNTAX: BANTYPE normal|host|domain|custom + BANTYPE custom [nick] [user] [host] [domain] */ static void cmd_bantype(const char *data) { ban_set_type(data); } +/* SYNTAX: BAN <nicks/masks> */ static void cmd_ban(const char *data, IRC_SERVER_REC *server, WI_IRC_REC *item) { command_set_ban(data, server, item, TRUE); } +/* SYNTAX: UNBAN <masks> */ static void cmd_unban(const char *data, IRC_SERVER_REC *server, WI_IRC_REC *item) { command_set_ban(data, server, item, FALSE); diff --git a/src/irc/core/irc-commands.c b/src/irc/core/irc-commands.c index 63c397a6..e1c1d317 100644 --- a/src/irc/core/irc-commands.c +++ b/src/irc/core/irc-commands.c @@ -114,12 +114,16 @@ static IRC_SERVER_REC *connect_server(const char *data) return server; } +/* SYNTAX: CONNECT [-ircnet <ircnet>] [-host <hostname>] + <address>|<ircnet> [<port> [<password> [<nick>]]] */ static void cmd_connect(const char *data) { if (*data == '\0') cmd_return_error(CMDERR_NOT_ENOUGH_PARAMS); connect_server(data); } + +/* SYNTAX: DISCONNECT *|<tag> [<message>] */ static void cmd_disconnect(const char *data, IRC_SERVER_REC *server) { char *tag, *msg, *str; @@ -151,6 +155,8 @@ static void cmd_disconnect(const char *data, IRC_SERVER_REC *server) server_disconnect((SERVER_REC *) server); } +/* SYNTAX: SERVER [-ircnet <ircnet>] [-host <hostname>] + [+]<address>|<ircnet> [<port> [<password> [<nick>]]] */ static void cmd_server(const char *data, IRC_SERVER_REC *server) { GHashTable *optlist; @@ -198,6 +204,7 @@ static void cmd_server(const char *data, IRC_SERVER_REC *server) cmd_params_free(free_arg); } +/* SYNTAX: QUIT [<message>] */ static void cmd_quit(const char *data) { GSList *tmp, *next; @@ -221,6 +228,7 @@ static void cmd_quit(const char *data) signal_emit("gui exit", 0); } +/* SYNTAX: MSG [-<server tag>] <targets> <message> */ static void cmd_msg(const char *data, IRC_SERVER_REC *server, WI_IRC_REC *item) { GHashTable *optlist; @@ -256,6 +264,7 @@ static void cmd_msg(const char *data, IRC_SERVER_REC *server, WI_IRC_REC *item) cmd_params_free(free_arg); } +/* SYNTAX: NOTICE <targets> <message> */ static void cmd_notice(const char *data, IRC_SERVER_REC *server) { char *target, *msg; @@ -275,6 +284,7 @@ static void cmd_notice(const char *data, IRC_SERVER_REC *server) cmd_params_free(free_arg); } +/* SYNTAX: CTCP <targets> <ctcp command> [<ctcp data>] */ static void cmd_ctcp(const char *data, IRC_SERVER_REC *server) { char *target, *ctcpcmd, *ctcpdata; @@ -298,6 +308,7 @@ static void cmd_ctcp(const char *data, IRC_SERVER_REC *server) cmd_params_free(free_arg); } +/* SYNTAX: NCTCP <targets> <ctcp command> [<ctcp data>] */ static void cmd_nctcp(const char *data, IRC_SERVER_REC *server) { char *target, *ctcpcmd, *ctcpdata; @@ -318,6 +329,7 @@ static void cmd_nctcp(const char *data, IRC_SERVER_REC *server) cmd_params_free(free_arg); } +/* SYNTAX: JOIN [-invite] [-<server tag>] <channels> [<keys>] */ static void cmd_join(const char *data, IRC_SERVER_REC *server) { GHashTable *optlist; @@ -344,6 +356,7 @@ static void cmd_join(const char *data, IRC_SERVER_REC *server) cmd_params_free(free_arg); } +/* SYNTAX: PART [<channels>] [<message>] */ static void cmd_part(const char *data, IRC_SERVER_REC *server, WI_IRC_REC *item) { CHANNEL_REC *chanrec; @@ -367,6 +380,7 @@ static void cmd_part(const char *data, IRC_SERVER_REC *server, WI_IRC_REC *item) cmd_params_free(free_arg); } +/* SYNTAX: KICK [<channel>] <nicks> [<reason>] */ static void cmd_kick(const char *data, IRC_SERVER_REC *server, WI_IRC_REC *item) { char *channame, *nicks, *reason; @@ -389,6 +403,7 @@ static void cmd_kick(const char *data, IRC_SERVER_REC *server, WI_IRC_REC *item) cmd_params_free(free_arg); } +/* SYNTAX: TOPIC [-delete] [<channel>] [<topic>] */ static void cmd_topic(const char *data, IRC_SERVER_REC *server, WI_IRC_REC *item) { GHashTable *optlist; @@ -404,12 +419,14 @@ static void cmd_topic(const char *data, IRC_SERVER_REC *server, WI_IRC_REC *item item, "topic", &optlist, &channame, &topic)) return; - irc_send_cmdv(server, *topic == '\0' && g_hash_table_lookup(optlist, "d") == NULL ? + irc_send_cmdv(server, *topic == '\0' && + g_hash_table_lookup(optlist, "delete") == NULL ? "TOPIC %s" : "TOPIC %s :%s", channame, topic); cmd_params_free(free_arg); } +/* SYNTAX: INVITE <nick> [<channel>] */ static void cmd_invite(const char *data, IRC_SERVER_REC *server, WI_IRC_REC *item) { char *nick, *channame; @@ -434,6 +451,7 @@ static void cmd_invite(const char *data, IRC_SERVER_REC *server, WI_IRC_REC *ite cmd_params_free(free_arg); } +/* SYNTAX: LIST [-yes] [<channel>] */ static void cmd_list(const char *data, IRC_SERVER_REC *server, WI_IRC_REC *item) { GHashTable *optlist; @@ -458,6 +476,7 @@ static void cmd_list(const char *data, IRC_SERVER_REC *server, WI_IRC_REC *item) server_redirect_default((SERVER_REC *) server, "bogus command list"); } +/* SYNTAX: WHO <nicks>|<channels>|** */ static void cmd_who(const char *data, IRC_SERVER_REC *server, WI_IRC_REC *item) { char *channel, *rest; @@ -489,6 +508,7 @@ static void cmd_who(const char *data, IRC_SERVER_REC *server, WI_IRC_REC *item) server_redirect_default((SERVER_REC *) server, "bogus command who"); } +/* SYNTAX: NAMES [-yes] [<channels>] */ static void cmd_names(const char *data, IRC_SERVER_REC *server, WI_IRC_REC *item) { g_return_if_fail(data != NULL); @@ -529,6 +549,7 @@ static char *get_redirect_nicklist(const char *nicks, int *free) return ret; } +/* SYNTAX: WHOIS [<server>] [<nicks>] */ static void cmd_whois(const char *data, IRC_SERVER_REC *server) { char *qserver, *query; @@ -598,6 +619,7 @@ static void event_whowas(const char *data, IRC_SERVER_REC *server, const char *n signal_emit("event 314", 4, data, server, nick, addr); } +/* SYNTAX: WHOWAS [<nicks> [<count>]] */ static void cmd_whowas(const char *data, IRC_SERVER_REC *server) { char *nicks, *count; @@ -624,6 +646,7 @@ static void cmd_whowas(const char *data, IRC_SERVER_REC *server) cmd_params_free(free_arg); } +/* SYNTAX: PING <nicks> */ static void cmd_ping(const char *data, IRC_SERVER_REC *server, WI_IRC_REC *item) { GTimeVal tv; @@ -655,6 +678,7 @@ static void server_send_away(IRC_SERVER_REC *server, const char *reason) irc_send_cmdv(server, "AWAY :%s", reason); } +/* SYNTAX: AWAY [-one | -all] [<reason>] */ static void cmd_away(const char *data, IRC_SERVER_REC *server) { GHashTable *optlist; @@ -676,6 +700,7 @@ static void cmd_away(const char *data, IRC_SERVER_REC *server) cmd_params_free(free_arg); } +/* SYNTAX: DEOP <nicks> */ static void cmd_deop(const char *data, IRC_SERVER_REC *server) { g_return_if_fail(data != NULL); @@ -686,6 +711,7 @@ static void cmd_deop(const char *data, IRC_SERVER_REC *server) irc_send_cmdv(server, "MODE %s -o", server->nick); } +/* SYNTAX: SCONNECT <new server> [[<port>] <existing server>] */ static void cmd_sconnect(const char *data, IRC_SERVER_REC *server) { g_return_if_fail(data != NULL); @@ -696,6 +722,7 @@ static void cmd_sconnect(const char *data, IRC_SERVER_REC *server) irc_send_cmdv(server, "CONNECT %s", data); } +/* SYNTAX: QUOTE <data> */ static void cmd_quote(const char *data, IRC_SERVER_REC *server) { g_return_if_fail(data != NULL); @@ -710,6 +737,7 @@ static void cmd_wall_hash(gpointer key, NICK_REC *nick, GSList **nicks) if (nick->op) *nicks = g_slist_append(*nicks, nick); } +/* SYNTAX: WALL [<channel>] <message> */ static void cmd_wall(const char *data, IRC_SERVER_REC *server, WI_IRC_REC *item) { char *channame, *msg, *args; @@ -749,7 +777,8 @@ static void cmd_wall(const char *data, IRC_SERVER_REC *server, WI_IRC_REC *item) cmd_params_free(free_arg); } -static void cmd_cycle(gchar *data, IRC_SERVER_REC *server, WI_IRC_REC *item) +/* SYNTAX: CYCLE [<channel>] [<message>] */ +static void cmd_cycle(const char *data, IRC_SERVER_REC *server, WI_IRC_REC *item) { CHANNEL_REC *chanrec; char *channame, *msg; @@ -774,6 +803,7 @@ static void cmd_cycle(gchar *data, IRC_SERVER_REC *server, WI_IRC_REC *item) cmd_params_free(free_arg); } +/* SYNTAX: KICKBAN [<channel>] <nick> <reason> */ static void cmd_kickban(const char *data, IRC_SERVER_REC *server, WI_IRC_REC *item) { char *nick; @@ -832,6 +862,7 @@ static int knockout_timeout(void) return 1; } +/* SYNTAX: KNOCKOUT [<seconds>] <nick> <reason> */ static void cmd_knockout(const char *data, IRC_SERVER_REC *server, WI_IRC_REC *item) { KNOCKOUT_REC *rec; @@ -979,41 +1010,70 @@ void irc_commands_init(void) command_bind("list", NULL, (SIGNAL_FUNC) cmd_list); command_bind("who", NULL, (SIGNAL_FUNC) cmd_who); command_bind("names", NULL, (SIGNAL_FUNC) cmd_names); + /* SYNTAX: NICK <new nick> */ command_bind("nick", NULL, (SIGNAL_FUNC) command_self); + /* SYNTAX: NOTE <command> [&<password>] [+|-<flags>] [<arguments>] */ command_bind("note", NULL, (SIGNAL_FUNC) command_self); command_bind("whois", NULL, (SIGNAL_FUNC) cmd_whois); command_bind("whowas", NULL, (SIGNAL_FUNC) cmd_whowas); command_bind("ping", NULL, (SIGNAL_FUNC) cmd_ping); + /* SYNTAX: KILL <nick> <reason> */ command_bind("kill", NULL, (SIGNAL_FUNC) command_2self); command_bind("away", NULL, (SIGNAL_FUNC) cmd_away); + /* SYNTAX: ISON <nicks> */ command_bind("ison", NULL, (SIGNAL_FUNC) command_1self); + /* SYNTAX: ADMIN [<server>|<nickname>] */ command_bind("admin", NULL, (SIGNAL_FUNC) command_self); + /* SYNTAX: INFO [<server>] */ command_bind("info", NULL, (SIGNAL_FUNC) command_self); + /* SYNTAX: LINKS [[<server>] <mask>] */ command_bind("links", NULL, (SIGNAL_FUNC) command_self); + /* SYNTAX: LUSERS [<server mask> [<remote server>]] */ command_bind("lusers", NULL, (SIGNAL_FUNC) command_self); + /* SYNTAX: MAP */ command_bind("map", NULL, (SIGNAL_FUNC) command_self); + /* SYNTAX: MOTD [<server>|<nick>] */ command_bind("motd", NULL, (SIGNAL_FUNC) command_self); + /* SYNTAX: REHASH */ command_bind("rehash", NULL, (SIGNAL_FUNC) command_self); + /* SYNTAX: STATS <type> [<server>] */ command_bind("stats", NULL, (SIGNAL_FUNC) command_self); + /* SYNTAX: TIME [<server>|<nick>] */ command_bind("time", NULL, (SIGNAL_FUNC) command_self); + /* SYNTAX: TRACE [<server>|<nick>] */ command_bind("trace", NULL, (SIGNAL_FUNC) command_self); + /* SYNTAX: VERSION [<server>|<nick>] */ command_bind("version", NULL, (SIGNAL_FUNC) command_self); + /* SYNTAX: SERVLIST [<server mask>] */ command_bind("servlist", NULL, (SIGNAL_FUNC) command_self); + /* SYNTAX: SILENCE [[+|-]<nick!user@host>] + SILENCE [<nick>] */ command_bind("silence", NULL, (SIGNAL_FUNC) command_self); command_bind("sconnect", NULL, (SIGNAL_FUNC) cmd_sconnect); + /* SYNTAX: SQUERY <service> [<commands>] */ command_bind("squery", NULL, (SIGNAL_FUNC) command_2self); command_bind("deop", NULL, (SIGNAL_FUNC) cmd_deop); + /* SYNTAX: DIE */ command_bind("die", NULL, (SIGNAL_FUNC) command_self); + /* SYNTAX: HASH */ command_bind("hash", NULL, (SIGNAL_FUNC) command_self); + /* SYNTAX: OPER [<nick> [<password>]] */ command_bind("oper", NULL, (SIGNAL_FUNC) command_self); + /* SYNTAX: RESTART */ command_bind("restart", NULL, (SIGNAL_FUNC) command_self); + /* SYNTAX: RPING <server> */ command_bind("rping", NULL, (SIGNAL_FUNC) command_self); + /* SYNTAX: SQUIT <server>|<mask> <reason> */ command_bind("squit", NULL, (SIGNAL_FUNC) command_2self); + /* SYNTAX: UPING <server> */ command_bind("uping", NULL, (SIGNAL_FUNC) command_self); + /* SYNTAX: USERHOST <nicks> */ command_bind("userhost", NULL, (SIGNAL_FUNC) command_self); command_bind("quote", NULL, (SIGNAL_FUNC) cmd_quote); command_bind("wall", NULL, (SIGNAL_FUNC) cmd_wall); + /* SYNTAX: WALLOPS <message> */ command_bind("wallops", NULL, (SIGNAL_FUNC) command_1self); + /* SYNTAX: WALLCHOPS <channel> <message> */ command_bind("wallchops", NULL, (SIGNAL_FUNC) command_2self); command_bind("cycle", NULL, (SIGNAL_FUNC) cmd_cycle); command_bind("kickban", NULL, (SIGNAL_FUNC) cmd_kickban); diff --git a/src/irc/core/irc-rawlog.c b/src/irc/core/irc-rawlog.c index b2fd26bc..962564ec 100644 --- a/src/irc/core/irc-rawlog.c +++ b/src/irc/core/irc-rawlog.c @@ -34,6 +34,7 @@ static void cmd_rawlog(const char *data, SERVER_REC *server, void *item) command_runsub("rawlog", data, server, item); } +/* SYNTAX: RAWLOG SAVE <file> */ static void cmd_rawlog_save(const char *data, SERVER_REC *server) { g_return_if_fail(data != NULL); @@ -43,6 +44,7 @@ static void cmd_rawlog_save(const char *data, SERVER_REC *server) rawlog_save(server->rawlog, data); } +/* SYNTAX: RAWLOG OPEN <file> */ static void cmd_rawlog_open(const char *data, SERVER_REC *server) { g_return_if_fail(data != NULL); @@ -52,6 +54,7 @@ static void cmd_rawlog_open(const char *data, SERVER_REC *server) rawlog_open(server->rawlog, data); } +/* SYNTAX: RAWLOG CLOSE */ static void cmd_rawlog_close(const char *data, SERVER_REC *server) { g_return_if_fail(data != NULL); diff --git a/src/irc/core/modes.c b/src/irc/core/modes.c index 45bd5421..3e8df891 100644 --- a/src/irc/core/modes.c +++ b/src/irc/core/modes.c @@ -406,6 +406,7 @@ static char *get_nicks(WI_IRC_REC *item, const char *data, int op, int voice) return ret; } +/* SYNTAX: OP <nicks> */ static void cmd_op(const char *data, IRC_SERVER_REC *server, WI_IRC_REC *item) { char *nicks; @@ -419,6 +420,7 @@ static void cmd_op(const char *data, IRC_SERVER_REC *server, WI_IRC_REC *item) g_free(nicks); } +/* SYNTAX: DEOP <nicks> */ static void cmd_deop(const char *data, IRC_SERVER_REC *server, WI_IRC_REC *item) { char *nicks; @@ -432,6 +434,7 @@ static void cmd_deop(const char *data, IRC_SERVER_REC *server, WI_IRC_REC *item) g_free(nicks); } +/* SYNTAX: VOICE <nicks> */ static void cmd_voice(const char *data, IRC_SERVER_REC *server, WI_IRC_REC *item) { char *nicks; @@ -445,6 +448,7 @@ static void cmd_voice(const char *data, IRC_SERVER_REC *server, WI_IRC_REC *item g_free(nicks); } +/* SYNTAX: DEVOICE <nicks> */ static void cmd_devoice(const char *data, IRC_SERVER_REC *server, WI_IRC_REC *item) { char *nicks; @@ -458,6 +462,7 @@ static void cmd_devoice(const char *data, IRC_SERVER_REC *server, WI_IRC_REC *it g_free(nicks); } +/* SYNTAX: MODE <your nick>|<channel> [<mode> [<mode parameters>]] */ static void cmd_mode(const char *data, IRC_SERVER_REC *server, WI_IRC_REC *item) { char *target, *mode; diff --git a/src/irc/core/server-reconnect.c b/src/irc/core/server-reconnect.c index d736ef29..137e4224 100644 --- a/src/irc/core/server-reconnect.c +++ b/src/irc/core/server-reconnect.c @@ -261,6 +261,7 @@ static void sig_server_looking(IRC_SERVER_REC *server) } /* Remove all servers from reconnect list */ +/* SYNTAX: RMRECONNS */ static void cmd_rmreconns(void) { while (reconnects != NULL) @@ -282,6 +283,7 @@ static RECONNECT_REC *reconnect_find_tag(int tag) } /* Try to reconnect immediately */ +/* SYNTAX: RECONNECT <tag> */ static void cmd_reconnect(const char *data, IRC_SERVER_REC *server) { IRC_SERVER_CONNECT_REC *conn; diff --git a/src/irc/dcc/dcc-chat.c b/src/irc/dcc/dcc-chat.c index ddac4c98..69299304 100644 --- a/src/irc/dcc/dcc-chat.c +++ b/src/irc/dcc/dcc-chat.c @@ -257,7 +257,7 @@ static void dcc_chat_connect(DCC_REC *dcc) } } -/* command: DCC CHAT */ +/* SYNTAX: DCC CHAT <nick> */ static void cmd_dcc_chat(const char *data, IRC_SERVER_REC *server) { void *free_arg; @@ -306,7 +306,8 @@ static void cmd_dcc_chat(const char *data, IRC_SERVER_REC *server) cmd_params_free(free_arg); } -static void cmd_mircdcc(gchar *data, IRC_SERVER_REC *server, WI_IRC_REC *item) +/* SYNTAX: MIRCDCC ON|OFF */ +static void cmd_mircdcc(const char *data, IRC_SERVER_REC *server, WI_IRC_REC *item) { DCC_REC *dcc; @@ -315,7 +316,8 @@ static void cmd_mircdcc(gchar *data, IRC_SERVER_REC *server, WI_IRC_REC *item) dcc = item_get_dcc(item); if (dcc == NULL) return; - dcc->mirc_ctcp = toupper(*data) == 'N' ? FALSE : TRUE; + dcc->mirc_ctcp = toupper(*data) != 'N' && + g_strncasecmp(data, "OF", 3) != 0; } /* DCC CHAT: text received */ diff --git a/src/irc/dcc/dcc-files.c b/src/irc/dcc/dcc-files.c index a214a4f8..c6695d40 100644 --- a/src/irc/dcc/dcc-files.c +++ b/src/irc/dcc/dcc-files.c @@ -210,6 +210,7 @@ static void dcc_get_connect(DCC_REC *dcc) #define dcc_is_unget(dcc) \ ((dcc)->type == DCC_TYPE_GET && (dcc)->handle == -1) +/* SYNTAX: DCC GET <nick> [<file>] */ static void cmd_dcc_get(const char *data) { DCC_REC *dcc; @@ -337,6 +338,7 @@ static void dcc_resume_rec(DCC_REC *dcc) g_free(str); } +/* SYNTAX: DCC RESUME <nick> [<file>] */ static void cmd_dcc_resume(const char *data) { DCC_REC *dcc; @@ -492,7 +494,7 @@ static void dcc_send_init(DCC_REC *dcc) } } -/* command: DCC SEND */ +/* SYNTAX: DCC SEND <nick> <file> */ static void cmd_dcc_send(const char *data, IRC_SERVER_REC *server, WI_IRC_REC *item) { char *target, *fname, *str, *ptr; diff --git a/src/irc/dcc/dcc.c b/src/irc/dcc/dcc.c index 62665ff7..b2aeddcf 100644 --- a/src/irc/dcc/dcc.c +++ b/src/irc/dcc/dcc.c @@ -411,7 +411,7 @@ static void dcc_reject(DCC_REC *dcc, IRC_SERVER_REC *server) dcc_destroy(dcc); } -/* command: DCC CLOSE */ +/* SYNTAX: DCC CLOSE <type> <nick> [<file>] */ static void cmd_dcc_close(char *data, IRC_SERVER_REC *server) { DCC_REC *dcc; diff --git a/src/irc/notifylist/notify-commands.c b/src/irc/notifylist/notify-commands.c index 0bef6d23..b0883f13 100644 --- a/src/irc/notifylist/notify-commands.c +++ b/src/irc/notifylist/notify-commands.c @@ -28,6 +28,7 @@ #define DEFAULT_NOTIFY_IDLE_TIME 60 +/* SYNTAX: [-away] [-idle [<minutes>]] <mask> [<ircnets>] */ static void cmd_notify(gchar *data) { GHashTable *optlist; @@ -57,6 +58,7 @@ static void cmd_notify(gchar *data) cmd_params_free(free_arg); } +/* SYNTAX: UNNOTIFY <mask> */ static void cmd_unnotify(const char *data) { char *mask; |