diff --git a/plugins/www-view.py b/plugins/www-view.py index 81ec6cd3..616ff0a3 100644 --- a/plugins/www-view.py +++ b/plugins/www-view.py @@ -14,7 +14,7 @@ def prof_init(version, status): "the last received URL will be used.", cmd_browser) -def prof_on_message(jid, message): +def prof_on_message_received(jid, message): global lastlink links = re.findall(r'(https?://\S+)', message) if (len(links) > 0): diff --git a/src/plugins/plugins.c b/src/plugins/plugins.c index 4d8f1f05..2f77c320 100644 --- a/src/plugins/plugins.c +++ b/src/plugins/plugins.c @@ -88,12 +88,12 @@ plugins_on_connect(void) } void -plugins_on_message(const char * const jid, const char * const message) +plugins_on_message_received(const char * const jid, const char * const message) { GSList *curr = plugins; while (curr != NULL) { ProfPlugin *plugin = curr->data; - plugin->on_message_func(plugin, jid, message); + plugin->on_message_received_func(plugin, jid, message); curr = g_slist_next(curr); } } diff --git a/src/plugins/plugins.h b/src/plugins/plugins.h index 807edc5c..62fe6ed0 100644 --- a/src/plugins/plugins.h +++ b/src/plugins/plugins.h @@ -35,14 +35,14 @@ typedef struct prof_plugin_t { const char * const status); void (*on_start_func)(struct prof_plugin_t* plugin); void (*on_connect_func)(struct prof_plugin_t* plugin); - void (*on_message_func)(struct prof_plugin_t* plugin, + void (*on_message_received_func)(struct prof_plugin_t* plugin, const char * const jid, const char * const message); } ProfPlugin; void plugins_init(void); void plugins_on_start(void); void plugins_on_connect(void); -void plugins_on_message(const char * const jid, const char * const message); +void plugins_on_message_received(const char * const jid, const char * const message); void plugins_shutdown(void); gboolean plugins_run_command(const char * const cmd); void plugins_run_timed(void); diff --git a/src/plugins/python_plugins.c b/src/plugins/python_plugins.c index f6486b45..40946f83 100644 --- a/src/plugins/python_plugins.c +++ b/src/plugins/python_plugins.c @@ -59,7 +59,7 @@ python_plugin_create(const char * const filename) plugin->init_func = python_init_hook; plugin->on_start_func = python_on_start_hook; plugin->on_connect_func = python_on_connect_hook; - plugin->on_message_func = python_on_message_hook; + plugin->on_message_received_func = python_on_message_received_hook; g_free(module_name); return plugin; } else { @@ -121,14 +121,14 @@ python_on_connect_hook(ProfPlugin *plugin) } void -python_on_message_hook(ProfPlugin *plugin, const char * const jid, const char * const message) +python_on_message_received_hook(ProfPlugin *plugin, const char * const jid, const char * const message) { PyObject *p_args = Py_BuildValue("ss", jid, message); PyObject *p_function; PyObject *p_module = plugin->module; - if (PyObject_HasAttrString(p_module, "prof_on_message")) { - p_function = PyObject_GetAttrString(p_module, "prof_on_message"); + if (PyObject_HasAttrString(p_module, "prof_on_message_received")) { + p_function = PyObject_GetAttrString(p_module, "prof_on_message_received"); python_check_error(); if (p_function && PyCallable_Check(p_function)) { PyObject_CallObject(p_function, p_args); diff --git a/src/plugins/python_plugins.h b/src/plugins/python_plugins.h index 62de4461..3cd77454 100644 --- a/src/plugins/python_plugins.h +++ b/src/plugins/python_plugins.h @@ -30,7 +30,7 @@ ProfPlugin* python_plugin_create(const char * const filename); void python_init_hook(ProfPlugin *plugin, const char * const version, const char * const status); void python_on_start_hook(ProfPlugin *plugin); void python_on_connect_hook(ProfPlugin *plugin); -void python_on_message_hook(ProfPlugin *plugin, const char * const jid, const char * const message); +void python_on_message_received_hook(ProfPlugin *plugin, const char * const jid, const char * const message); void python_check_error(void); diff --git a/src/profanity.c b/src/profanity.c index 5e8515da..30bc560f 100644 --- a/src/profanity.c +++ b/src/profanity.c @@ -119,7 +119,7 @@ prof_handle_incoming_message(char *from, char *message, gboolean priv) ui_incoming_msg(from, message, NULL, priv); ui_current_page_off(); - plugins_on_message(from, message); + plugins_on_message_received(from, message); if (prefs_get_boolean(PREF_CHLOG) && !priv) { Jid *from_jid = jid_create(from); @@ -138,7 +138,7 @@ prof_handle_delayed_message(char *from, char *message, GTimeVal tv_stamp, ui_incoming_msg(from, message, &tv_stamp, priv); ui_current_page_off(); - plugins_on_message(from, message); + plugins_on_message_received(from, message); if (prefs_get_boolean(PREF_CHLOG) && !priv) { Jid *from_jid = jid_create(from);