From 9fd1e2f5dadcf491755e0de26871c4a1a5c35394 Mon Sep 17 00:00:00 2001 From: Geert Hauwaerts Date: Sat, 12 Jul 2014 18:46:44 +0200 Subject: [PATCH 1/2] Syntax documentation rewrite for Q-commands Rewrote the syntax documentation for all commands starting with the letter Q. --- docs/help/in/query.in | 24 +++++++++++++++++------- docs/help/in/quit.in | 21 ++++++++++++++++----- docs/help/in/quote.in | 18 +++++++++++++++--- 3 files changed, 48 insertions(+), 15 deletions(-) diff --git a/docs/help/in/query.in b/docs/help/in/query.in index d06b7701..1c0ba5b9 100644 --- a/docs/help/in/query.in +++ b/docs/help/in/query.in @@ -1,14 +1,24 @@ +%9Syntax:%9 + @SYNTAX:query@ -Starts a private conversation with the nick. All text you -type that would normally be sent to your channel now goes to -the specified nick in the form of MSGs. +%9Parameters:%9 -Usually this command opens up a new window, too. + -window: Uses the active window instead of opening a new one. + -: The server tag the target nickname is on. -Note: It removes the active query from the active window when -used without parameters, like UNQUERY. + The nickname to query and the message. -See also: WINDOW, MSG, SET QUERY, UNQUERY +%9Description:%9 + + Starts a private conversation with a nickname. + +%9Examples:%9 + + /QUERY mike + /QUERY -freenode bob + /QUERY -freenode -window sarah + +%9See also:%9 MSG, UNQUERY, WINDOW diff --git a/docs/help/in/quit.in b/docs/help/in/quit.in index fe6ad01b..1b9ca267 100644 --- a/docs/help/in/quit.in +++ b/docs/help/in/quit.in @@ -1,10 +1,21 @@ +%9Syntax:%9 + @SYNTAX:quit@ -This ends your IRC session. If a quit message is supplied, it -will be displayed to anyone else on any channel you were on -before quitting. If one isn't specified, the text "Leaving" is -used. +%9Parameters:%9 -/EXIT does the same. + The message to advertise. + +%9Description:%9 + + Terminates the application and advertises the given message on all the + networks you are connected to. + +%9Examples:%9 + + /QUIT + /QUIT <@cartman> Screw you guys, I'm going home! + +%9See also:%9 DISCONNECT diff --git a/docs/help/in/quote.in b/docs/help/in/quote.in index eceb409c..6d9723e5 100644 --- a/docs/help/in/quote.in +++ b/docs/help/in/quote.in @@ -1,8 +1,20 @@ +%9Syntax:%9 + @SYNTAX:quote@ -Sends server raw data without parsing. +%9Parameters:%9 -Example: - /QUOTE PRIVMSG cras :Hey, this works! + The text to send to the IRC server. + +%9Description:%9 + + Sends raw data to the server without any parsing. + +%9Examples:%9 + + /QUOTE PRIVMSG mike: Hey, this works! + /QUOTE OPERWALL :Meow! + +%9See also:%9 CONNECT, DISCONNECT, JOIN, MSG, PART From 6e45d683991a3269c3cfe63d981bddcd92da0406 Mon Sep 17 00:00:00 2001 From: David Hill Date: Sat, 12 Jul 2014 16:35:42 -0400 Subject: [PATCH 2/2] Avoid using uninitalized values. --- src/core/modules-load.c | 2 +- src/core/settings.c | 4 ++-- src/fe-common/core/fe-messages.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core/modules-load.c b/src/core/modules-load.c index 8e65ecd4..49f811de 100644 --- a/src/core/modules-load.c +++ b/src/core/modules-load.c @@ -163,7 +163,7 @@ static int module_load_name(const char *path, const char *rootmodule, GModule *gmodule; MODULE_REC *module; MODULE_FILE_REC *rec; - gpointer value1, value2; + gpointer value1, value2 = NULL; char *initfunc, *deinitfunc; int found; diff --git a/src/core/settings.c b/src/core/settings.c index 9f527ebe..2296909e 100644 --- a/src/core/settings.c +++ b/src/core/settings.c @@ -121,7 +121,7 @@ int settings_get_bool(const char *key) int settings_get_time(const char *key) { const char *str; - int msecs; + int msecs = 0; str = settings_get_str_type(key, SETTING_TYPE_TIME); if (str != NULL && !parse_time_interval(str, &msecs)) @@ -140,7 +140,7 @@ int settings_get_level(const char *key) int settings_get_size(const char *key) { const char *str; - int bytes; + int bytes = 0; str = settings_get_str_type(key, SETTING_TYPE_SIZE); if (str != NULL && !parse_size(str, &bytes)) diff --git a/src/fe-common/core/fe-messages.c b/src/fe-common/core/fe-messages.c index fcc55a67..56fe89f8 100644 --- a/src/fe-common/core/fe-messages.c +++ b/src/fe-common/core/fe-messages.c @@ -82,7 +82,7 @@ char *expand_emphasis(WI_ITEM_REC *item, const char *text) continue; if (!ishighalnum(end[-1]) || ishighalnum(end[1]) || end[1] == type || end[1] == '*' || end[1] == '_' || - (type == 29 && end[1] != NULL && ishighalnum(end[2]))) + (type == 29 && end[1] != '\0' && ishighalnum(end[2]))) continue; if (IS_CHANNEL(item)) {