From 7ddcc3b268c8c55b2d6fe80e87e090181fbc1bf7 Mon Sep 17 00:00:00 2001 From: Christopher Davis Date: Wed, 21 Jun 2006 00:22:03 +0000 Subject: Added a lot of object wrappers. Most are untested. Will finish up the rest of the object wrappers perhaps tonight or tomorrow. Signal handling will need to be addressed ASAP. There are quite a lot of other global module functions remaining to be wraped, as well. git-svn-id: http://svn.irssi.org/repos/irssi-python@4286 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- objects/window-item-object.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'objects/window-item-object.c') diff --git a/objects/window-item-object.c b/objects/window-item-object.c index 96181fc..6494d48 100644 --- a/objects/window-item-object.c +++ b/objects/window-item-object.c @@ -200,6 +200,15 @@ static PyObject *PyWindowItem_destroy(PyWindowItem *self, PyObject *args) Py_RETURN_NONE; } +PyDoc_STRVAR(PyWindowItem_get_dcc_doc, + "If item is a query of a =nick, return DCC chat record of nick" +); +static PyObject *PyWindowItem_get_dcc(PyWindowItem *self, PyObject *args) +{ + RET_NULL_IF_INVALID(self->data); + return py_irssi_new(self->data, 1); +} + /* Methods for object */ static PyMethodDef PyWindowItem_methods[] = { {"prnt", (PyCFunction)PyWindowItem_prnt, METH_VARARGS | METH_KEYWORDS, @@ -218,6 +227,8 @@ static PyMethodDef PyWindowItem_methods[] = { PyWindowItem_activity_doc}, {"destroy", (PyCFunction)PyWindowItem_destroy, METH_NOARGS, PyWindowItem_destroy_doc}, + {"get_dcc", (PyCFunction)PyWindowItem_get_dcc, METH_NOARGS, + PyWindowItem_get_dcc_doc}, {NULL} /* Sentinel */ }; -- cgit