summary refs log tree commit diff stats
path: root/plugins/python
diff options
context:
space:
mode:
authorMark Jansen <learn0more@gmail.com>2017-03-30 22:23:35 +0200
committerTingPing <tingping@tingping.se>2017-03-30 16:58:49 -0400
commiteccd0d05b5f2c7d585cc8f565ee28b4d00f62438 (patch)
tree97876813c8d15c94152f3a8aae00a10d3e8df985 /plugins/python
parentbe6473227b2123ed6280710cae529d3e09cab1e4 (diff)
python: Use HEXCHAT_EAT_XXX where appropriate.
Diffstat (limited to 'plugins/python')
-rw-r--r--plugins/python/python.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/plugins/python/python.c b/plugins/python/python.c
index 88913282..6d88e4dd 100644
--- a/plugins/python/python.c
+++ b/plugins/python/python.c
@@ -568,7 +568,7 @@ Callback_Server(char *word[], char *word_eol[], hexchat_event_attrs *attrs, void
 	PyObject *retobj;
 	PyObject *word_list, *word_eol_list;
 	PyObject *attributes;
-	int ret = 0;
+	int ret = HEXCHAT_EAT_NONE;
 	PyObject *plugin;
 
 	plugin = hook->plugin;
@@ -577,13 +577,13 @@ Callback_Server(char *word[], char *word_eol[], hexchat_event_attrs *attrs, void
 	word_list = Util_BuildList(word);
 	if (word_list == NULL) {
 		END_PLUGIN(plugin);
-		return 0;
+		return HEXCHAT_EAT_NONE;
 	}
 	word_eol_list = Util_BuildList(word_eol);
 	if (word_eol_list == NULL) {
 		Py_DECREF(word_list);
 		END_PLUGIN(plugin);
-		return 0;
+		return HEXCHAT_EAT_NONE;
 	}
 
 	attributes = Attribute_New(attrs);
@@ -619,7 +619,7 @@ Callback_Command(char *word[], char *word_eol[], void *userdata)
 	Hook *hook = (Hook *) userdata;
 	PyObject *retobj;
 	PyObject *word_list, *word_eol_list;
-	int ret = 0;
+	int ret = HEXCHAT_EAT_NONE;
 	PyObject *plugin;
 
 	plugin = hook->plugin;
@@ -628,13 +628,13 @@ Callback_Command(char *word[], char *word_eol[], void *userdata)
 	word_list = Util_BuildList(word);
 	if (word_list == NULL) {
 		END_PLUGIN(plugin);
-		return 0;
+		return HEXCHAT_EAT_NONE;
 	}
 	word_eol_list = Util_BuildList(word_eol);
 	if (word_eol_list == NULL) {
 		Py_DECREF(word_list);
 		END_PLUGIN(plugin);
-		return 0;
+		return HEXCHAT_EAT_NONE;
 	}
 
 	retobj = PyObject_CallFunction(hook->callback, "(OOO)", word_list,
@@ -665,7 +665,7 @@ Callback_Print_Attrs(char *word[], hexchat_event_attrs *attrs, void *userdata)
 	PyObject *word_list;
 	PyObject *word_eol_list;
 	PyObject *attributes;
-	int ret = 0;
+	int ret = HEXCHAT_EAT_NONE;
 	PyObject *plugin;
 
 	plugin = hook->plugin;
@@ -674,13 +674,13 @@ Callback_Print_Attrs(char *word[], hexchat_event_attrs *attrs, void *userdata)
 	word_list = Util_BuildList(word);
 	if (word_list == NULL) {
 		END_PLUGIN(plugin);
-		return 0;
+		return HEXCHAT_EAT_NONE;
 	}
 	word_eol_list = Util_BuildEOLList(word);
 	if (word_eol_list == NULL) {
 		Py_DECREF(word_list);
 		END_PLUGIN(plugin);
-		return 0;
+		return HEXCHAT_EAT_NONE;
 	}
 
 	attributes = Attribute_New(attrs);
@@ -714,7 +714,7 @@ Callback_Print(char *word[], void *userdata)
 	PyObject *retobj;
 	PyObject *word_list;
 	PyObject *word_eol_list;
-	int ret = 0;
+	int ret = HEXCHAT_EAT_NONE;
 	PyObject *plugin;
 
 	plugin = hook->plugin;
@@ -723,13 +723,13 @@ Callback_Print(char *word[], void *userdata)
 	word_list = Util_BuildList(word);
 	if (word_list == NULL) {
 		END_PLUGIN(plugin);
-		return 0;
+		return HEXCHAT_EAT_NONE;
 	}
 	word_eol_list = Util_BuildEOLList(word);
 	if (word_eol_list == NULL) {
 		Py_DECREF(word_list);
 		END_PLUGIN(plugin);
-		return 0;
+		return HEXCHAT_EAT_NONE;
 	}
 
 	retobj = PyObject_CallFunction(hook->callback, "(OOO)", word_list,
@@ -2508,9 +2508,9 @@ IInterp_Cmd(char *word[], char *word_eol[], void *userdata)
 	if (channel && channel[0] == '>' && strcmp(channel, ">>python<<") == 0) {
 		hexchat_printf(ph, ">>> %s\n", word_eol[1]);
 		IInterp_Exec(word_eol[1]);
-		return 1;
+		return HEXCHAT_EAT_HEXCHAT;
 	}
-	return 0;
+	return HEXCHAT_EAT_NONE;
 }