/** * cs_kickdots.C: Kicks people saying "..." on channels with "kickdots" metadata set. * * 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 © 2006 William Pitcock * Rights to this code are as documented in doc/pod/license.pod. * * $Id: cs_kickdots.C,v 1.5 2007/09/16 18:54:43 pippijn Exp $ */ #include "atheme.h" #include #include static char const rcsid[] = "$Id: cs_kickdots.C,v 1.5 2007/09/16 18:54:43 pippijn Exp $"; REGISTER_MODULE ("chanserv/kickdots", false, "William Pitcock "); static void on_channel_message (channel_t *c, user_t *u, char const * const msg) { if (msg != NULL && !strncmp (msg, "...", 3)) { mychan_t *mc = mychan_t::find (c->name); if (mc->find_metadata ("kickdots")) phandler->kick (chansvs.nick, c->name, u->nick, msg); } } bool _modinit (module *m) { channel_t::callback.message.attach (on_channel_message); return true; } void _moddeinit (void) { channel_t::callback.message.detach (on_channel_message); }