1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-10 15:25:42 +02:00

Added timer handler for plugins

This commit is contained in:
Sebastien Helleu
2006-02-19 10:43:47 +00:00
parent 484274d65f
commit 3a213f38ec
38 changed files with 4520 additions and 1980 deletions
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+28 -1
View File
@@ -184,7 +184,7 @@ weechat_script_remove_handler (t_weechat_plugin *plugin,
t_plugin_handler *ptr_handler, *next_handler;
char *ptr_arg1;
/* search and remove message handlers */
/* search and remove handlers */
ptr_handler = plugin->handlers;
while (ptr_handler)
{
@@ -208,6 +208,33 @@ weechat_script_remove_handler (t_weechat_plugin *plugin,
}
}
/*
* weechat_script_remove_timer_handler: remove a timer handler for a script
*/
void
weechat_script_remove_timer_handler (t_weechat_plugin *plugin,
t_plugin_script *script,
char *function)
{
t_plugin_handler *ptr_handler, *next_handler;
/* search and remove timer handlers */
ptr_handler = plugin->handlers;
while (ptr_handler)
{
if (((t_plugin_script *)ptr_handler->handler_pointer == script)
&& (plugin->ascii_strcasecmp (plugin, ptr_handler->handler_args, function) == 0))
{
next_handler = ptr_handler->next_handler;
plugin->handler_remove (plugin, ptr_handler);
ptr_handler = next_handler;
}
else
ptr_handler = ptr_handler->next_handler;
}
}
/*
* weechat_script_get_plugin_config: get a value of a script option
* format in file is: plugin.script.option=value
+3
View File
@@ -51,6 +51,9 @@ extern void weechat_script_remove (t_weechat_plugin *,
extern void weechat_script_remove_handler (t_weechat_plugin *,
t_plugin_script *,
char *, char *);
extern void weechat_script_remove_timer_handler (t_weechat_plugin *,
t_plugin_script *,
char *);
extern char *weechat_script_get_plugin_config (t_weechat_plugin *,
t_plugin_script *,
char *);