summaryrefslogtreecommitdiff
path: root/src/plugins/php/weechat-php.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/php/weechat-php.c')
-rw-r--r--src/plugins/php/weechat-php.c321
1 files changed, 159 insertions, 162 deletions
diff --git a/src/plugins/php/weechat-php.c b/src/plugins/php/weechat-php.c
index 8e009d16e..ce73c30b1 100644
--- a/src/plugins/php/weechat-php.c
+++ b/src/plugins/php/weechat-php.c
@@ -2,6 +2,7 @@
* weechat-php.c - PHP plugin for WeeChat
*
* Copyright (C) 2006-2017 Adam Saponara <as@php.net>
+ * Copyright (C) 2017 Sébastien Helleu <flashcode@flashtux.org>
*
* This file is part of WeeChat, the extensible chat client.
*
@@ -71,199 +72,196 @@ char *php_action_remove_list = NULL;
char *php_action_autoload_list = NULL;
const zend_function_entry weechat_functions[] = {
- PHP_FE(weechat_bar_item_new, NULL)
- PHP_FE(weechat_bar_item_remove, NULL)
- PHP_FE(weechat_bar_item_search, NULL)
- PHP_FE(weechat_bar_item_update, NULL)
- PHP_FE(weechat_bar_new, NULL)
- PHP_FE(weechat_bar_remove, NULL)
- PHP_FE(weechat_bar_search, NULL)
- PHP_FE(weechat_bar_set, NULL)
- PHP_FE(weechat_bar_update, NULL)
- PHP_FE(weechat_buffer_clear, NULL)
- PHP_FE(weechat_buffer_close, NULL)
- PHP_FE(weechat_buffer_get_integer, NULL)
- PHP_FE(weechat_buffer_get_pointer, NULL)
- PHP_FE(weechat_buffer_get_string, NULL)
- PHP_FE(weechat_buffer_match_list, NULL)
- PHP_FE(weechat_buffer_merge, NULL)
- PHP_FE(weechat_buffer_new, NULL)
- PHP_FE(weechat_buffer_search_main, NULL)
- PHP_FE(weechat_buffer_search, NULL)
- PHP_FE(weechat_buffer_set, NULL)
- PHP_FE(weechat_buffer_string_replace_local_var, NULL)
- PHP_FE(weechat_buffer_unmerge, NULL)
+ PHP_FE(weechat_register, NULL)
+ PHP_FE(weechat_plugin_get_name, NULL)
PHP_FE(weechat_charset_set, NULL)
- PHP_FE(weechat_color, NULL)
- PHP_FE(weechat_command, NULL)
- PHP_FE(weechat_config_boolean_default, NULL)
- PHP_FE(weechat_config_boolean, NULL)
- PHP_FE(weechat_config_color_default, NULL)
- PHP_FE(weechat_config_color, NULL)
- PHP_FE(weechat_config_free, NULL)
- PHP_FE(weechat_config_get, NULL)
- PHP_FE(weechat_config_get_plugin, NULL)
- PHP_FE(weechat_config_integer_default, NULL)
- PHP_FE(weechat_config_integer, NULL)
- PHP_FE(weechat_config_is_set_plugin, NULL)
+ PHP_FE(weechat_iconv_to_internal, NULL)
+ PHP_FE(weechat_iconv_from_internal, NULL)
+ PHP_FE(weechat_gettext, NULL)
+ PHP_FE(weechat_ngettext, NULL)
+ PHP_FE(weechat_strlen_screen, NULL)
+ PHP_FE(weechat_string_match, NULL)
+ PHP_FE(weechat_string_has_highlight, NULL)
+ PHP_FE(weechat_string_has_highlight_regex, NULL)
+ PHP_FE(weechat_string_mask_to_regex, NULL)
+ PHP_FE(weechat_string_remove_color, NULL)
+ PHP_FE(weechat_string_is_command_char, NULL)
+ PHP_FE(weechat_string_input_for_buffer, NULL)
+ PHP_FE(weechat_string_eval_expression, NULL)
+ PHP_FE(weechat_string_eval_path_home, NULL)
+ PHP_FE(weechat_mkdir_home, NULL)
+ PHP_FE(weechat_mkdir, NULL)
+ PHP_FE(weechat_mkdir_parents, NULL)
+ PHP_FE(weechat_list_new, NULL)
+ PHP_FE(weechat_list_add, NULL)
+ PHP_FE(weechat_list_search, NULL)
+ PHP_FE(weechat_list_search_pos, NULL)
+ PHP_FE(weechat_list_casesearch, NULL)
+ PHP_FE(weechat_list_casesearch_pos, NULL)
+ PHP_FE(weechat_list_get, NULL)
+ PHP_FE(weechat_list_set, NULL)
+ PHP_FE(weechat_list_next, NULL)
+ PHP_FE(weechat_list_prev, NULL)
+ PHP_FE(weechat_list_string, NULL)
+ PHP_FE(weechat_list_size, NULL)
+ PHP_FE(weechat_list_remove, NULL)
+ PHP_FE(weechat_list_remove_all, NULL)
+ PHP_FE(weechat_list_free, NULL)
PHP_FE(weechat_config_new, NULL)
- PHP_FE(weechat_config_new_option, NULL)
PHP_FE(weechat_config_new_section, NULL)
- PHP_FE(weechat_config_option_default_is_null, NULL)
- PHP_FE(weechat_config_option_free, NULL)
- PHP_FE(weechat_config_option_is_null, NULL)
- PHP_FE(weechat_config_option_rename, NULL)
+ PHP_FE(weechat_config_search_section, NULL)
+ PHP_FE(weechat_config_new_option, NULL)
+ PHP_FE(weechat_config_search_option, NULL)
+ PHP_FE(weechat_config_string_to_boolean, NULL)
PHP_FE(weechat_config_option_reset, NULL)
PHP_FE(weechat_config_option_set, NULL)
PHP_FE(weechat_config_option_set_null, NULL)
PHP_FE(weechat_config_option_unset, NULL)
+ PHP_FE(weechat_config_option_rename, NULL)
+ PHP_FE(weechat_config_option_is_null, NULL)
+ PHP_FE(weechat_config_option_default_is_null, NULL)
+ PHP_FE(weechat_config_boolean, NULL)
+ PHP_FE(weechat_config_boolean_default, NULL)
+ PHP_FE(weechat_config_integer, NULL)
+ PHP_FE(weechat_config_integer_default, NULL)
+ PHP_FE(weechat_config_string, NULL)
+ PHP_FE(weechat_config_string_default, NULL)
+ PHP_FE(weechat_config_color, NULL)
+ PHP_FE(weechat_config_color_default, NULL)
+ PHP_FE(weechat_config_write_option, NULL)
+ PHP_FE(weechat_config_write_line, NULL)
+ PHP_FE(weechat_config_write, NULL)
PHP_FE(weechat_config_read, NULL)
PHP_FE(weechat_config_reload, NULL)
- PHP_FE(weechat_config_search_option, NULL)
- PHP_FE(weechat_config_search_section, NULL)
- PHP_FE(weechat_config_section_free, NULL)
+ PHP_FE(weechat_config_option_free, NULL)
PHP_FE(weechat_config_section_free_options, NULL)
- PHP_FE(weechat_config_set_desc_plugin, NULL)
+ PHP_FE(weechat_config_section_free, NULL)
+ PHP_FE(weechat_config_free, NULL)
+ PHP_FE(weechat_config_get, NULL)
+ PHP_FE(weechat_config_get_plugin, NULL)
+ PHP_FE(weechat_config_is_set_plugin, NULL)
PHP_FE(weechat_config_set_plugin, NULL)
- PHP_FE(weechat_config_string_default, NULL)
- PHP_FE(weechat_config_string, NULL)
- PHP_FE(weechat_config_string_to_boolean, NULL)
+ PHP_FE(weechat_config_set_desc_plugin, NULL)
PHP_FE(weechat_config_unset_plugin, NULL)
- PHP_FE(weechat_config_write_line, NULL)
- PHP_FE(weechat_config_write, NULL)
- PHP_FE(weechat_config_write_option, NULL)
- PHP_FE(weechat_gettext, NULL)
- PHP_FE(weechat_hdata_char, NULL)
- PHP_FE(weechat_hdata_check_pointer, NULL)
- PHP_FE(weechat_hdata_compare, NULL)
- PHP_FE(weechat_hdata_get_list, NULL)
- PHP_FE(weechat_hdata_get, NULL)
- PHP_FE(weechat_hdata_get_string, NULL)
- PHP_FE(weechat_hdata_get_var_array_size, NULL)
- PHP_FE(weechat_hdata_get_var_array_size_string, NULL)
- PHP_FE(weechat_hdata_get_var_hdata, NULL)
- PHP_FE(weechat_hdata_get_var, NULL)
- PHP_FE(weechat_hdata_get_var_offset, NULL)
- PHP_FE(weechat_hdata_get_var_type, NULL)
- PHP_FE(weechat_hdata_get_var_type_string, NULL)
- PHP_FE(weechat_hdata_hashtable, NULL)
- PHP_FE(weechat_hdata_integer, NULL)
- PHP_FE(weechat_hdata_long, NULL)
- PHP_FE(weechat_hdata_move, NULL)
- PHP_FE(weechat_hdata_pointer, NULL)
- PHP_FE(weechat_hdata_search, NULL)
- PHP_FE(weechat_hdata_string, NULL)
- PHP_FE(weechat_hdata_time, NULL)
- PHP_FE(weechat_hdata_update, NULL)
+ PHP_FE(weechat_key_bind, NULL)
+ PHP_FE(weechat_key_unbind, NULL)
+ PHP_FE(weechat_prefix, NULL)
+ PHP_FE(weechat_color, NULL)
+ PHP_FE(weechat_printf, NULL)
+ PHP_FE(weechat_printf_date_tags, NULL)
+ PHP_FE(weechat_printf_y, NULL)
+ PHP_FE(weechat_log_printf, NULL)
PHP_FE(weechat_hook_command, NULL)
- PHP_FE(weechat_hook_command_run, NULL)
+ PHP_FE(weechat_hook_completion, NULL)
PHP_FE(weechat_hook_completion_get_string, NULL)
PHP_FE(weechat_hook_completion_list_add, NULL)
- PHP_FE(weechat_hook_completion, NULL)
- PHP_FE(weechat_hook_config, NULL)
- PHP_FE(weechat_hook_connect, NULL)
+ PHP_FE(weechat_hook_command_run, NULL)
+ PHP_FE(weechat_hook_timer, NULL)
PHP_FE(weechat_hook_fd, NULL)
- PHP_FE(weechat_hook_focus, NULL)
+ PHP_FE(weechat_hook_process, NULL)
+ PHP_FE(weechat_hook_process_hashtable, NULL)
+ PHP_FE(weechat_hook_connect, NULL)
+ PHP_FE(weechat_hook_print, NULL)
+ PHP_FE(weechat_hook_signal, NULL)
+ PHP_FE(weechat_hook_signal_send, NULL)
PHP_FE(weechat_hook_hsignal, NULL)
PHP_FE(weechat_hook_hsignal_send, NULL)
+ PHP_FE(weechat_hook_config, NULL)
+ PHP_FE(weechat_hook_modifier, NULL)
+ PHP_FE(weechat_hook_modifier_exec, NULL)
+ PHP_FE(weechat_hook_info, NULL)
PHP_FE(weechat_hook_info_hashtable, NULL)
PHP_FE(weechat_hook_infolist, NULL)
- PHP_FE(weechat_hook_info, NULL)
- PHP_FE(weechat_hook_modifier_exec, NULL)
- PHP_FE(weechat_hook_modifier, NULL)
- PHP_FE(weechat_hook_print, NULL)
- PHP_FE(weechat_hook_process_hashtable, NULL)
- PHP_FE(weechat_hook_process, NULL)
+ PHP_FE(weechat_hook_focus, NULL)
PHP_FE(weechat_hook_set, NULL)
- PHP_FE(weechat_hook_signal, NULL)
- PHP_FE(weechat_hook_signal_send, NULL)
- PHP_FE(weechat_hook_timer, NULL)
- PHP_FE(weechat_iconv_from_internal, NULL)
- PHP_FE(weechat_iconv_to_internal, NULL)
- PHP_FE(weechat_info_get_hashtable, NULL)
+ PHP_FE(weechat_unhook, NULL)
+ PHP_FE(weechat_unhook_all, NULL)
+ PHP_FE(weechat_buffer_new, NULL)
+ PHP_FE(weechat_buffer_search, NULL)
+ PHP_FE(weechat_buffer_search_main, NULL)
+ PHP_FE(weechat_buffer_clear, NULL)
+ PHP_FE(weechat_buffer_close, NULL)
+ PHP_FE(weechat_buffer_merge, NULL)
+ PHP_FE(weechat_buffer_unmerge, NULL)
+ PHP_FE(weechat_buffer_get_integer, NULL)
+ PHP_FE(weechat_buffer_get_string, NULL)
+ PHP_FE(weechat_buffer_get_pointer, NULL)
+ PHP_FE(weechat_buffer_set, NULL)
+ PHP_FE(weechat_buffer_string_replace_local_var, NULL)
+ PHP_FE(weechat_buffer_match_list, NULL)
+ PHP_FE(weechat_window_search_with_buffer, NULL)
+ PHP_FE(weechat_window_get_integer, NULL)
+ PHP_FE(weechat_window_get_string, NULL)
+ PHP_FE(weechat_window_get_pointer, NULL)
+ PHP_FE(weechat_window_set_title, NULL)
+ PHP_FE(weechat_nicklist_add_group, NULL)
+ PHP_FE(weechat_nicklist_search_group, NULL)
+ PHP_FE(weechat_nicklist_add_nick, NULL)
+ PHP_FE(weechat_nicklist_search_nick, NULL)
+ PHP_FE(weechat_nicklist_remove_group, NULL)
+ PHP_FE(weechat_nicklist_remove_nick, NULL)
+ PHP_FE(weechat_nicklist_remove_all, NULL)
+ PHP_FE(weechat_nicklist_group_get_integer, NULL)
+ PHP_FE(weechat_nicklist_group_get_string, NULL)
+ PHP_FE(weechat_nicklist_group_get_pointer, NULL)
+ PHP_FE(weechat_nicklist_group_set, NULL)
+ PHP_FE(weechat_nicklist_nick_get_integer, NULL)
+ PHP_FE(weechat_nicklist_nick_get_string, NULL)
+ PHP_FE(weechat_nicklist_nick_get_pointer, NULL)
+ PHP_FE(weechat_nicklist_nick_set, NULL)
+ PHP_FE(weechat_bar_item_search, NULL)
+ PHP_FE(weechat_bar_item_new, NULL)
+ PHP_FE(weechat_bar_item_update, NULL)
+ PHP_FE(weechat_bar_item_remove, NULL)
+ PHP_FE(weechat_bar_search, NULL)
+ PHP_FE(weechat_bar_new, NULL)
+ PHP_FE(weechat_bar_set, NULL)
+ PHP_FE(weechat_bar_update, NULL)
+ PHP_FE(weechat_bar_remove, NULL)
+ PHP_FE(weechat_command, NULL)
PHP_FE(weechat_info_get, NULL)
- PHP_FE(weechat_infolist_fields, NULL)
- PHP_FE(weechat_infolist_free, NULL)
- PHP_FE(weechat_infolist_get, NULL)
- PHP_FE(weechat_infolist_integer, NULL)
- PHP_FE(weechat_infolist_new_item, NULL)
+ PHP_FE(weechat_info_get_hashtable, NULL)
PHP_FE(weechat_infolist_new, NULL)
+ PHP_FE(weechat_infolist_new_item, NULL)
PHP_FE(weechat_infolist_new_var_integer, NULL)
- PHP_FE(weechat_infolist_new_var_pointer, NULL)
PHP_FE(weechat_infolist_new_var_string, NULL)
+ PHP_FE(weechat_infolist_new_var_pointer, NULL)
PHP_FE(weechat_infolist_new_var_time, NULL)
+ PHP_FE(weechat_infolist_search_var, NULL)
+ PHP_FE(weechat_infolist_get, NULL)
PHP_FE(weechat_infolist_next, NULL)
- PHP_FE(weechat_infolist_pointer, NULL)
PHP_FE(weechat_infolist_prev, NULL)
PHP_FE(weechat_infolist_reset_item_cursor, NULL)
- PHP_FE(weechat_infolist_search_var, NULL)
+ PHP_FE(weechat_infolist_fields, NULL)
+ PHP_FE(weechat_infolist_integer, NULL)
PHP_FE(weechat_infolist_string, NULL)
+ PHP_FE(weechat_infolist_pointer, NULL)
PHP_FE(weechat_infolist_time, NULL)
- PHP_FE(weechat_key_bind, NULL)
- PHP_FE(weechat_key_unbind, NULL)
- PHP_FE(weechat_list_add, NULL)
- PHP_FE(weechat_list_casesearch, NULL)
- PHP_FE(weechat_list_casesearch_pos, NULL)
- PHP_FE(weechat_list_free, NULL)
- PHP_FE(weechat_list_get, NULL)
- PHP_FE(weechat_list_new, NULL)
- PHP_FE(weechat_list_next, NULL)
- PHP_FE(weechat_list_prev, NULL)
- PHP_FE(weechat_list_remove_all, NULL)
- PHP_FE(weechat_list_remove, NULL)
- PHP_FE(weechat_list_search, NULL)
- PHP_FE(weechat_list_search_pos, NULL)
- PHP_FE(weechat_list_set, NULL)
- PHP_FE(weechat_list_size, NULL)
- PHP_FE(weechat_list_string, NULL)
- PHP_FE(weechat_log_printf, NULL)
- PHP_FE(weechat_mkdir_home, NULL)
- PHP_FE(weechat_mkdir, NULL)
- PHP_FE(weechat_mkdir_parents, NULL)
- PHP_FE(weechat_ngettext, NULL)
- PHP_FE(weechat_nicklist_add_group, NULL)
- PHP_FE(weechat_nicklist_add_nick, NULL)
- PHP_FE(weechat_nicklist_group_get_integer, NULL)
- PHP_FE(weechat_nicklist_group_get_pointer, NULL)
- PHP_FE(weechat_nicklist_group_get_string, NULL)
- PHP_FE(weechat_nicklist_group_set, NULL)
- PHP_FE(weechat_nicklist_nick_get_integer, NULL)
- PHP_FE(weechat_nicklist_nick_get_pointer, NULL)
- PHP_FE(weechat_nicklist_nick_get_string, NULL)
- PHP_FE(weechat_nicklist_nick_set, NULL)
- PHP_FE(weechat_nicklist_remove_all, NULL)
- PHP_FE(weechat_nicklist_remove_group, NULL)
- PHP_FE(weechat_nicklist_remove_nick, NULL)
- PHP_FE(weechat_nicklist_search_group, NULL)
- PHP_FE(weechat_nicklist_search_nick, NULL)
- PHP_FE(weechat_plugin_get_name, NULL)
- PHP_FE(weechat_prefix, NULL)
- PHP_FE(weechat_printf_date_tags, NULL)
- PHP_FE(weechat_printf, NULL)
- PHP_FE(weechat_printf_y, NULL)
- PHP_FE(weechat_register, NULL)
- PHP_FE(weechat_string_eval_expression, NULL)
- PHP_FE(weechat_string_eval_path_home, NULL)
- PHP_FE(weechat_string_has_highlight, NULL)
- PHP_FE(weechat_string_has_highlight_regex, NULL)
- PHP_FE(weechat_string_input_for_buffer, NULL)
- PHP_FE(weechat_string_is_command_char, NULL)
- PHP_FE(weechat_string_mask_to_regex, NULL)
- PHP_FE(weechat_string_match, NULL)
- PHP_FE(weechat_string_remove_color, NULL)
- PHP_FE(weechat_string_replace, NULL)
- PHP_FE(weechat_strlen_screen, NULL)
- PHP_FE(weechat_unhook_all, NULL)
- PHP_FE(weechat_unhook, NULL)
- PHP_FE(weechat_upgrade_close, NULL)
+ PHP_FE(weechat_infolist_free, NULL)
+ PHP_FE(weechat_hdata_get, NULL)
+ PHP_FE(weechat_hdata_get_var_offset, NULL)
+ PHP_FE(weechat_hdata_get_var_type_string, NULL)
+ PHP_FE(weechat_hdata_get_var_array_size, NULL)
+ PHP_FE(weechat_hdata_get_var_array_size_string, NULL)
+ PHP_FE(weechat_hdata_get_var_hdata, NULL)
+ PHP_FE(weechat_hdata_get_list, NULL)
+ PHP_FE(weechat_hdata_check_pointer, NULL)
+ PHP_FE(weechat_hdata_move, NULL)
+ PHP_FE(weechat_hdata_search, NULL)
+ PHP_FE(weechat_hdata_char, NULL)
+ PHP_FE(weechat_hdata_integer, NULL)
+ PHP_FE(weechat_hdata_long, NULL)
+ PHP_FE(weechat_hdata_string, NULL)
+ PHP_FE(weechat_hdata_pointer, NULL)
+ PHP_FE(weechat_hdata_time, NULL)
+ PHP_FE(weechat_hdata_hashtable, NULL)
+ PHP_FE(weechat_hdata_compare, NULL)
+ PHP_FE(weechat_hdata_update, NULL)
+ PHP_FE(weechat_hdata_get_string, NULL)
PHP_FE(weechat_upgrade_new, NULL)
- PHP_FE(weechat_upgrade_read, NULL)
PHP_FE(weechat_upgrade_write_object, NULL)
- PHP_FE(weechat_window_get_integer, NULL)
- PHP_FE(weechat_window_get_pointer, NULL)
- PHP_FE(weechat_window_get_string, NULL)
- PHP_FE(weechat_window_search_with_buffer, NULL)
- PHP_FE(weechat_window_set_title, NULL)
+ PHP_FE(weechat_upgrade_read, NULL)
+ PHP_FE(weechat_upgrade_close, NULL)
PHP_FE(forget_class, NULL)
PHP_FE(forget_function, NULL)
PHP_FE_END
@@ -1090,9 +1088,8 @@ php_weechat_sapi_error (int type, const char *format, ...)
}
void
-php_weechat_log_message (char *message, int syslog_type_int)
+php_weechat_log_message (char *message)
{
- (void) syslog_type_int;
php_weechat_ub_write (message, strlen (message));
}