about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2016-02-24 00:48:34 +0000
committerJames Booth <boothj5@gmail.com>2016-02-24 00:48:34 +0000
commitd6e85e5cd6a6935be8b1c818629afcee124788ec (patch)
treed91525fdde8e96f208efaacfe3516cb67ab8b559
parent2783c84a135678227cedc92b9cad314a39ab7fac (diff)
downloadprofani-tty-d6e85e5cd6a6935be8b1c818629afcee124788ec.tar.gz
Added python_api_cons_bad_cmd_usage
-rw-r--r--src/plugins/python_api.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/plugins/python_api.c b/src/plugins/python_api.c
index 00339e9b..a992419d 100644
--- a/src/plugins/python_api.c
+++ b/src/plugins/python_api.c
@@ -75,6 +75,17 @@ python_api_cons_show_themed(PyObject *self, PyObject *args)
 }
 
 static PyObject*
+python_api_cons_bad_cmd_usage(PyObject *self, PyObject *args)
+{
+    const char *cmd = NULL;
+    if (!PyArg_ParseTuple(args, "s", &cmd)) {
+        return Py_BuildValue("");
+    }
+    api_cons_bad_cmd_usage(cmd);
+    return Py_BuildValue("");
+}
+
+static PyObject*
 python_api_register_command(PyObject *self, PyObject *args)
 {
     const char *command_name = NULL;
@@ -424,6 +435,7 @@ static PyMethodDef apiMethods[] = {
     { "cons_alert", python_api_cons_alert, METH_NOARGS, "Highlight the console window in the status bar." },
     { "cons_show", python_api_cons_show, METH_VARARGS, "Print a line to the console." },
     { "cons_show_themed", python_api_cons_show_themed, METH_VARARGS, "Print a themed line to the console" },
+    { "cons_bad_cmd_usage", python_api_cons_bad_cmd_usage, METH_VARARGS, "Show invalid command message in console" },
     { "register_command", python_api_register_command, METH_VARARGS, "Register a command." },
     { "register_timed", python_api_register_timed, METH_VARARGS, "Register a timed function." },
     { "register_ac", python_api_register_ac, METH_VARARGS, "Register an autocompleter." },