diff options
Diffstat (limited to 'src/plugins/irc/irc-redirect.c')
-rw-r--r-- | src/plugins/irc/irc-redirect.c | 102 |
1 files changed, 59 insertions, 43 deletions
diff --git a/src/plugins/irc/irc-redirect.c b/src/plugins/irc/irc-redirect.c index c938a5b57..d77861f25 100644 --- a/src/plugins/irc/irc-redirect.c +++ b/src/plugins/irc/irc-redirect.c @@ -242,7 +242,9 @@ struct t_irc_redirect_pattern irc_redirect_patterns_default[] = /* - * irc_redirect_pattern_search: search a redirect pattern in list of patterns + * Searches for a redirect pattern in list of patterns. + * + * Returns pointer to redirect pattern found, NULL if not found. */ struct t_irc_redirect_pattern * @@ -265,7 +267,9 @@ irc_redirect_pattern_search (const char *name) } /* - * irc_redirect_pattern_new: create a new redirect pattern + * Creates a new redirect pattern. + * + * Returns pointer to new redirect pattern, NULL if error. */ struct t_irc_redirect_pattern * @@ -323,7 +327,7 @@ irc_redirect_pattern_new (const char *name, int temp_pattern, int timeout, } /* - * irc_redirect_pattern_free: free a redirect pattern and remove it from list + * Frees a redirect pattern and removes it from list. */ void @@ -364,7 +368,7 @@ irc_redirect_pattern_free (struct t_irc_redirect_pattern *redirect_pattern) } /* - * irc_redirect_pattern_free_all: free all redirect patterns + * Frees all redirect patterns. */ void @@ -377,9 +381,10 @@ irc_redirect_pattern_free_all () } /* - * irc_redirect_new_with_commands: create a new redirect for a command on a - * server (with start/stop/extra commands in - * arguments) + * Creates a new redirect for a command on a server (with start/stop/extra + * commands in arguments). + * + * Returns pointer to new redirect, NULL if error. */ struct t_irc_redirect * @@ -482,7 +487,9 @@ irc_redirect_new_with_commands (struct t_irc_server *server, } /* - * irc_redirect_new: create a new redirect for a command on a server + * Creates a new redirect for a command on a server. + * + * Returns pointer to new redirect, NULL if error. */ struct t_irc_redirect * @@ -544,7 +551,9 @@ irc_redirect_new (struct t_irc_server *server, } /* - * irc_redirect_search_available: search first redirect available for server + * Searches for first redirect available for server. + * + * Returns pointer to redirect found, NULL if not found. */ struct t_irc_redirect * @@ -567,8 +576,7 @@ irc_redirect_search_available (struct t_irc_server *server) } /* - * irc_redirect_init_command: initalize a redirect with IRC command sent to - * server + * Initializes a redirect with IRC command sent to server. */ void @@ -609,8 +617,11 @@ irc_redirect_init_command (struct t_irc_redirect *redirect, } /* - * irc_redirect_message_match_hash: return 1 if a message matches hashtable - * with commands, 0 if it doesn't match + * Checks if a message matches hashtable with commands. + * + * Returns: + * 1: message matches hashtable + * 0: message does not match hashtable */ int @@ -642,7 +653,7 @@ irc_redirect_message_match_hash (struct t_irc_redirect *redirect, } /* - * irc_redirect_message_add: add a message to redirect output + * Adds a message to redirect output. */ void @@ -686,8 +697,8 @@ irc_redirect_message_add (struct t_irc_redirect *redirect, const char *message, } /* - * irc_redirect_stop: end of a redirection: send data to callback and free - * redirect (if count has been reached) + * Ends a redirection: sends data to callback and frees redirect (if count has + * been reached). */ void @@ -747,12 +758,12 @@ irc_redirect_stop (struct t_irc_redirect *redirect, const char *error) } /* - * irc_redirect_message: try to redirect a received message (from IRC server) - * to a redirect in server - * return: 1 if message has been redirected - * 0 if no matching redirect was found - * if message has been redirected, irc plugin will - * discard it (do not display anything) + * Tries to redirect a received message (from IRC server) to a redirect in + * server. + * + * Returns: + * 1: message has been redirected (irc plugin will discard message) + * 0: no matching redirect was found */ int @@ -884,7 +895,7 @@ end: } /* - * irc_redirect_free: free a redirect and remove it from list + * Frees a redirect and removes it from list. */ void @@ -951,7 +962,7 @@ irc_redirect_free (struct t_irc_redirect *redirect) } /* - * irc_redirect_free_all: free all redirects in list + * Frees all redirects in list. */ void @@ -964,7 +975,7 @@ irc_redirect_free_all (struct t_irc_server *server) } /* - * irc_redirect_hdata_redirect_pattern_cb: return hdata for redirect pattern + * Returns hdata for redirect pattern. */ struct t_hdata * @@ -994,7 +1005,7 @@ irc_redirect_hdata_redirect_pattern_cb (void *data, const char *hdata_name) } /* - * irc_redirect_hdata_redirect_cb: return hdata for redirect + * Returns hdata for redirect. */ struct t_hdata * @@ -1034,8 +1045,11 @@ irc_redirect_hdata_redirect_cb (void *data, const char *hdata_name) } /* - * irc_redirect_pattern_add_to_infolist: add a redirect pattern in an infolist - * return 1 if ok, 0 if error + * Adds a redirect pattern in an infolist. + * + * Returns: + * 1: OK + * 0: error */ int @@ -1068,8 +1082,11 @@ irc_redirect_pattern_add_to_infolist (struct t_infolist *infolist, } /* - * irc_redirect_add_to_infolist: add a redirect in an infolist - * return 1 if ok, 0 if error + * Adds a redirect in an infolist. + * + * Returns: + * 1: OK + * 0: error */ int @@ -1128,8 +1145,7 @@ irc_redirect_add_to_infolist (struct t_infolist *infolist, } /* - * irc_redirect_pattern_print_log: print redirect infos in log (usually for - * crash dump) + * Prints redirect infos in WeeChat log file (usually for crash dump). */ void @@ -1154,7 +1170,7 @@ irc_redirect_pattern_print_log () } /* - * irc_redirect_print_log: print redirect infos in log (usually for crash dump) + * Prints redirect infos in WeeChat log file (usually for crash dump). */ void @@ -1200,10 +1216,10 @@ irc_redirect_print_log (struct t_irc_server *server) } /* - * irc_redirect_pattern_hsignal_cb: callback for hsignal "irc_redirect_pattern" - * It is called when other plugins/scripts are - * creating a redirect pattern (irc plugin - * itself does not use this function) + * Callback for hsignal "irc_redirect_pattern". + * + * It is called when other plugins/scripts are creating a redirect pattern (irc + * plugin itself does not use this function). */ int @@ -1264,10 +1280,10 @@ irc_redirect_pattern_hsignal_cb (void *data, const char *signal, } /* - * irc_redirect_command_hsignal_cb: callback for hsignal "irc_redirect_command" - * It is called when other plugins/scripts are - * redirecting an IRC command (irc plugin - * itself does not use this function) + * Callback for hsignal "irc_redirect_command". + * + * It is called when other plugins/scripts are redirecting an IRC command (irc + * plugin itself does not use this function). */ int @@ -1334,7 +1350,7 @@ irc_redirect_command_hsignal_cb (void *data, const char *signal, } /* - * irc_redirect_init: create default redirect patterns + * Creates default redirect patterns. */ void @@ -1354,7 +1370,7 @@ irc_redirect_init () } /* - * irc_redirect_end: free all redirect patterns + * Frees all redirect patterns. */ void |