/** * os_tabletest.C: Some module TODO * * Copyright © 2007 Pippijn van Steenhoven / The Ermyth Team * Rights to this code are as documented in COPYING. * * * Portions of this file were derived from sources bearing the following license: * Copyright © 2007 Pippijn van Steenhoven / The Ermyth Team * Copyright © 2007 Atheme Development Group * Rights to this code are as documented in doc/pod/license.pod. * * $Id: os_tabletest.C,v 1.5 2007/09/22 14:27:27 pippijn Exp $ */ #include "atheme.h" #include static char const rcsid[] = "$Id: os_tabletest.C,v 1.5 2007/09/22 14:27:27 pippijn Exp $"; REGISTER_MODULE ("operserv/tabletest", false, "The Ermyth Team "); static void os_cmd_tabletest (sourceinfo_t *si, int parc, char *parv[]); command_t const os_tabletest = { "TABLETEST", "Table test.", AC_NONE, 0, os_cmd_tabletest }; E cmdvec os_cmdtree; bool _modinit (module *m) { os_cmdtree << os_tabletest; return true; } void _moddeinit () { os_cmdtree >> os_tabletest; } static void os_cmd_tabletest (sourceinfo_t *si, int parc, char *parv[]) { table_t *t = table_new ("Table \2test\2"); table_row_t *r = table_row_new (t); table_cell_associate (r, "foo", "bar"); table_cell_associate (r, "F", "-"); table_cell_associate (r, "baz", "splork"); r = table_row_new (t); table_cell_associate (r, "foo", "1"); table_cell_associate (r, "F", "+"); table_cell_associate (r, "baz", "2"); r = table_row_new (t); table_cell_associate (r, "foo", "beagle4"); table_cell_associate (r, "F", "+"); table_cell_associate (r, "baz", "boo"); command_success_table (si, t); object_unref (t); }