From d6e85e5cd6a6935be8b1c818629afcee124788ec Mon Sep 17 00:00:00 2001 From: James Booth Date: Wed, 24 Feb 2016 00:48:34 +0000 Subject: Added python_api_cons_bad_cmd_usage --- src/plugins/python_api.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/plugins') 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 @@ -74,6 +74,17 @@ python_api_cons_show_themed(PyObject *self, PyObject *args) return Py_BuildValue(""); } +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) { @@ -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." }, -- cgit 1.4.1-2-gfad0