#include "module.h" #define AUTHOR "SGR" #define VERSION "1.02" /* ----------------------------------------------------------- * Name: he_helpchanentry * Author: SGR * Date: 21/11/2003 * ----------------------------------------------------------- * Functions: m_cs_helpchanentry * Limitations: none known. * Tested: Unreal(3.2) * ----------------------------------------------------------- * This modules has 26 configurable options. * * This module will notice all defined messages to clients * who join the HELP_ROOM channel * * Thanks to dengel, Rob and Certus for all there support. * ----------------------------------------------------------- */ /* ---------------------------------------------------------------------- */ /* START OF CONFIGURATION BLOCK - please read the comments :) */ /* ---------------------------------------------------------------------- */ /* * !!! ONLY CHANGE WHAT IS INSIDE THE "SPEACH MARKS" !!!! * !!! To 'disable' a line, add // to the beginning !!!! */ #define HELP_ROOM "#Help" #define HelpChanEntryMsg1 "Welcome to the HELP Room. Please read and obey the following" #define HelpChanEntryMsg2 "rules before you speak in this room:" #define HelpChanEntryMsg3 "Blah" #define HelpChanEntryMsg4 "Blah" #define HelpChanEntryMsg5 "Mooo" // #define HelpChanEntryMsg6 "Mooo" // #define HelpChanEntryMsg7 "Mooo" // #define HelpChanEntryMsg8 "Mooo" // #define HelpChanEntryMsg9 "Mooo" // #define HelpChanEntryMsg10 "Mooo" // #define HelpChanEntryMsg11 "Mooo" // #define HelpChanEntryMsg12 "Mooo" // #define HelpChanEntryMsg13 "Mooo" // #define HelpChanEntryMsg14 "Mooo" // #define HelpChanEntryMsg15 "Mooo" // #define HelpChanEntryMsg16 "Mooo" // #define HelpChanEntryMsg17 "Mooo" // #define HelpChanEntryMsg18 "Mooo" // #define HelpChanEntryMsg19 "Mooo" // #define HelpChanEntryMsg20 "Mooo" // #define HelpChanEntryMsg21 "Mooo" // #define HelpChanEntryMsg22 "Mooo" // #define HelpChanEntryMsg23 "Mooo" // #define HelpChanEntryMsg24 "Mooo" // #define HelpChanEntryMsg25 "Mooo" /* ---------------------------------------------------------------------- */ /* DO NOT EDIT BELOW THIS LINE UNLESS YOU KNOW WHAT YOU ARE DOING */ /* ---------------------------------------------------------------------- */ int m_cs_helpchanentry(char *source, int ac, char **av); int helpchan_rules_on=1; int AnopeInit(int argc, char **argv) { Message *msg = NULL; alog("Loading module he_helpchanentry.so"); msg = createMessage("JOIN", m_cs_helpchanentry); moduleAddMessage(msg, MOD_TAIL); alog("[he_helpchanentry] Yayness!(tm) - MODULE LOADED AND ACTIVE"); moduleAddAuthor(AUTHOR); moduleAddVersion(VERSION); return MOD_CONT; } void AnopeFini(void) { alog("Unloading module he_helpchanentry.so"); } int m_cs_helpchanentry(char *source, int ac, char **av) { ChannelInfo *ci; Channel *c; User *u; char *newchan=NULL; if (!av[0]) { return MOD_CONT; } if (!(u = finduser(source))) { return MOD_CONT; } if ((!helpchan_rules_on) || (!*source) || (ac < 1) || (!stristr(av[0],"#"))) { return MOD_CONT; } newchan = sstrdup(av[0]); if (!(ci = cs_findchan(newchan))) { if (newchan != NULL) { free(newchan); } return MOD_CONT; } if (ci->flags & CI_VERBOTEN) { if (newchan != NULL) { free(newchan); } return MOD_CONT; } c = findchan(newchan); if (!c) { if (newchan != NULL) { free(newchan); } return MOD_CONT; } if (stricmp(c->name,HELP_ROOM)) { if (newchan != NULL) { free(newchan); } return MOD_CONT; } else { #ifdef HelpChanEntryMsg1 notice(whosends(ci), u->nick, HelpChanEntryMsg1); #endif #ifdef HelpChanEntryMsg2 notice(whosends(ci), u->nick, HelpChanEntryMsg2); #endif #ifdef HelpChanEntryMsg3 notice(whosends(ci), u->nick, HelpChanEntryMsg3); #endif #ifdef HelpChanEntryMsg4 notice(whosends(ci), u->nick, HelpChanEntryMsg4); #endif #ifdef HelpChanEntryMsg5 notice(whosends(ci), u->nick, HelpChanEntryMsg5); #endif #ifdef HelpChanEntryMsg6 notice(whosends(ci), u->nick, HelpChanEntryMsg6); #endif #ifdef HelpChanEntryMsg7 notice(whosends(ci), u->nick, HelpChanEntryMsg7); #endif #ifdef HelpChanEntryMsg8 notice(whosends(ci), u->nick, HelpChanEntryMsg8); #endif #ifdef HelpChanEntryMsg9 notice(whosends(ci), u->nick, HelpChanEntryMsg9); #endif #ifdef HelpChanEntryMsg10 notice(whosends(ci), u->nick, HelpChanEntryMsg10); #endif #ifdef HelpChanEntryMsg11 notice(whosends(ci), u->nick, HelpChanEntryMsg11); #endif #ifdef HelpChanEntryMsg12 notice(whosends(ci), u->nick, HelpChanEntryMsg12); #endif #ifdef HelpChanEntryMsg13 notice(whosends(ci), u->nick, HelpChanEntryMsg13); #endif #ifdef HelpChanEntryMsg14 notice(whosends(ci), u->nick, HelpChanEntryMsg14); #endif #ifdef HelpChanEntryMsg15 notice(whosends(ci), u->nick, HelpChanEntryMsg15); #endif #ifdef HelpChanEntryMsg16 notice(whosends(ci), u->nick, HelpChanEntryMsg16); #endif #ifdef HelpChanEntryMsg17 notice(whosends(ci), u->nick, HelpChanEntryMsg17); #endif #ifdef HelpChanEntryMsg18 notice(whosends(ci), u->nick, HelpChanEntryMsg18); #endif #ifdef HelpChanEntryMsg19 notice(whosends(ci), u->nick, HelpChanEntryMsg19); #endif #ifdef HelpChanEntryMsg20 notice(whosends(ci), u->nick, HelpChanEntryMsg20); #endif #ifdef HelpChanEntryMsg21 notice(whosends(ci), u->nick, HelpChanEntryMsg21); #endif #ifdef HelpChanEntryMsg22 notice(whosends(ci), u->nick, HelpChanEntryMsg22); #endif #ifdef HelpChanEntryMsg23 notice(whosends(ci), u->nick, HelpChanEntryMsg23); #endif #ifdef HelpChanEntryMsg24 notice(whosends(ci), u->nick, HelpChanEntryMsg24); #endif #ifdef HelpChanEntryMsg25 notice(whosends(ci), u->nick, HelpChanEntryMsg25); #endif if (newchan != NULL) { free(newchan); } return MOD_CONT; } if (newchan != NULL) { free(newchan); } return MOD_CONT; }