summary refs log tree commit diff stats
path: root/plugins/python
diff options
context:
space:
mode:
authorTingPing <tngpng@gmail.com>2012-09-13 02:19:53 -0400
committerTingPing <tngpng@gmail.com>2012-09-13 02:19:53 -0400
commiteace2397e695bc591c05e782da3c5825ad65bb7a (patch)
treec666588a2e7ffc95b5b3ecb9cec8a8f52841dea3 /plugins/python
parentdb4b665cd3ef0809df6760a4e4dcaea5659ad446 (diff)
Reorganized if statement.
Diffstat (limited to 'plugins/python')
-rw-r--r--plugins/python/python.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/python/python.c b/plugins/python/python.c
index 0fdaf9e1..13451c5b 100644
--- a/plugins/python/python.c
+++ b/plugins/python/python.c
@@ -1610,9 +1610,10 @@ Module_xchat_pluginpref_get(PyObject *self, PyObject *args)
 	// This will always return numbers as integers.
 	retint = xchat_pluginpref_get_int(ph, var);
 	if (xchat_pluginpref_get_str(ph, var, retstr)) {
-		ret = PyInt_FromLong(retint);
 		if ((retint == 0) && (strcmp(retstr, "0") != 0))
 			ret = PyString_FromString(retstr);
+		else
+			ret = PyInt_FromLong(retint);
 	}
 	else
 		ret = Py_None;