#include "module.h" #define AUTHOR "Ravage" #define VERSION "0.24" int noseen_privmsg(char *source, int ac, char **av); int check_command(char *msg); int AnopeInit(int argc, char **argv) { int status; Message *msg = NULL; msg = createMessage("PRIVMSG", noseen_privmsg); status = moduleAddMessage(msg, MOD_HEAD); moduleAddAuthor(AUTHOR); moduleAddVersion(VERSION); alog("[bs_disableseen] Module loaded and active"); return MOD_CONT; } void AnopeFini(void) { } int noseen_privmsg(char *source, int ac, char **av) { char *sourcetmp; char *line; int status; if (!source || !av[1]) return MOD_CONT; sourcetmp = sstrdup(source); line = sstrdup(av[1]); status = check_command(line); free(sourcetmp); free(line); if (status == 1) return MOD_STOP; return MOD_CONT; } int check_command(char *msg) { msg = strtok(msg, " "); if (!msg) return 0; if (!strcasecmp(msg,"!seen")) { return 1; } return 0; }