/* * op.c * (C) Peter Salanki 2002 * This program is copyright, and covered by the Gnu Public License. * The Natasha bot. * sorcer@linux.se */ #include #include #include #include #include #include #include #include "../../settings.h" #include "../../globals.h" #include "../../bottypes.h" #include "settings.h" #define NAME "Op" #define VERSION 1.00 int opjoin(struct channel *c, struct activeuser *u); struct channel *joinchannelptr; MODULE_INIT _module_init(MODULE m); MODULE_DESTROY _module_destroy(MODULE m); MODULE_INIT _module_init(MODULE m) { strncpy(m->name, NAME, 20); strncpy(m->compiledate, __DATE__ " " __TIME__, 30); m->version = VERSION; joinchannelptr = findchannel(OPCHANNEL); } MODULE_DESTROY _module_destroy(MODULE m) { } int opjoin(struct channel *c, struct activeuser *u) { if(c == joinchannelptr) { op(c->name, u->nick); /* Give op */ return 1; } return 0; }