summary refs log tree commit diff stats
path: root/plugins
diff options
context:
space:
mode:
authorTingPing <tngpng@gmail.com>2013-04-08 17:09:36 -0300
committerTingPing <tngpng@gmail.com>2013-04-08 17:09:36 -0300
commit68de2bcb00161656a90ee0a396482daac4c639d0 (patch)
tree3c6c443b23f75e691f78541fe46dd568fdc71f64 /plugins
parent68b6be11d6223df39c094d67e9fcaf1a52978890 (diff)
Add constants to both modules
Diffstat (limited to 'plugins')
-rw-r--r--plugins/python/python.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/plugins/python/python.c b/plugins/python/python.c
index 4077bfe4..b0748e97 100644
--- a/plugins/python/python.c
+++ b/plugins/python/python.c
@@ -1171,6 +1171,17 @@ Plugin_New(char *filename, PyMethodDef *xchat_methods, PyObject *xcoobj)
 		hexchat_print(ph, "Can't create xchat module");
 		goto error;
 	}
+	
+	PyModule_AddIntConstant(m, "EAT_NONE", HEXCHAT_EAT_NONE);
+	PyModule_AddIntConstant(m, "EAT_XCHAT", HEXCHAT_EAT_HEXCHAT);
+	PyModule_AddIntConstant(m, "EAT_PLUGIN", HEXCHAT_EAT_PLUGIN);
+	PyModule_AddIntConstant(m, "EAT_ALL", HEXCHAT_EAT_ALL);
+	PyModule_AddIntConstant(m, "PRI_HIGHEST", HEXCHAT_PRI_HIGHEST);
+	PyModule_AddIntConstant(m, "PRI_HIGH", HEXCHAT_PRI_HIGH);
+	PyModule_AddIntConstant(m, "PRI_NORM", HEXCHAT_PRI_NORM);
+	PyModule_AddIntConstant(m, "PRI_LOW", HEXCHAT_PRI_LOW);
+	PyModule_AddIntConstant(m, "PRI_LOWEST", HEXCHAT_PRI_LOWEST);
+	
 	m = Py_InitModule("hexchat", xchat_methods);
 	if (m == NULL) {
 		hexchat_print(ph, "Can't create hexchat module");