diff options
| author | rburchell <rburchell@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-11-14 20:57:20 +0000 |
|---|---|---|
| committer | rburchell <rburchell@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-11-14 20:57:20 +0000 |
| commit | 6c55e0a529c7f1216ff6f63a4fc77ea06a2a3a38 (patch) | |
| tree | 91b0841faf23087ebe0c74dd4269d181a383f1e7 /src/modules/demos/catserv | |
| parent | 069409cd99cf78ab8bf87a1fe69a833576414fd3 (diff) | |
Insane commit of doom: s/ \t/g
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1681 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/modules/demos/catserv')
| -rw-r--r-- | src/modules/demos/catserv/catserv_messages.c | 10 | ||||
| -rw-r--r-- | src/modules/demos/catserv/ircd_catserv.c | 112 | ||||
| -rw-r--r-- | src/modules/demos/catserv/purr.c | 4 |
3 files changed, 63 insertions, 63 deletions
diff --git a/src/modules/demos/catserv/catserv_messages.c b/src/modules/demos/catserv/catserv_messages.c index 23c1b4ec1..667b336b5 100644 --- a/src/modules/demos/catserv/catserv_messages.c +++ b/src/modules/demos/catserv/catserv_messages.c @@ -5,10 +5,10 @@ void addMessageList(void) { - Command *c; - c = createCommand("meow", do_meow, NULL, -1, -1, -1, -1, -1); - this->AddCommand(Catserv_cmdTable, c, MOD_UNIQUE); - c = createCommand("purr", do_purr, NULL, -1, -1, -1, -1, -1); - this->AddCommand(Catserv_cmdTable, c, MOD_UNIQUE); + Command *c; + c = createCommand("meow", do_meow, NULL, -1, -1, -1, -1, -1); + this->AddCommand(Catserv_cmdTable, c, MOD_UNIQUE); + c = createCommand("purr", do_purr, NULL, -1, -1, -1, -1, -1); + this->AddCommand(Catserv_cmdTable, c, MOD_UNIQUE); } diff --git a/src/modules/demos/catserv/ircd_catserv.c b/src/modules/demos/catserv/ircd_catserv.c index 763ae9cec..0f98df58a 100644 --- a/src/modules/demos/catserv/ircd_catserv.c +++ b/src/modules/demos/catserv/ircd_catserv.c @@ -22,89 +22,89 @@ char *s_CatServ = "CatServ"; int AnopeInit(int argc, char **argv) { - Message *msg = NULL; - int status; + Message *msg = NULL; + int status; #ifdef IRC_UNREAL32 - if (UseTokens) { - msg = createMessage("!", my_privmsg); - } else { - msg = createMessage("PRIVMSG", my_privmsg); - } + if (UseTokens) { + msg = createMessage("!", my_privmsg); + } else { + msg = createMessage("PRIVMSG", my_privmsg); + } #else - msg = createMessage("PRIVMSG", my_privmsg); + msg = createMessage("PRIVMSG", my_privmsg); #endif - status = moduleAddMessage(msg, MOD_HEAD); - if (status == MOD_ERR_OK) { - addClient(s_CatServ, "meow!"); - addMessageList(); - } - this->SetAuthor(AUTHOR); - this->SetVersion(VERSION); - alog("ircd_catserv.so: loaded, message status [%d]", status); - return MOD_CONT; + status = moduleAddMessage(msg, MOD_HEAD); + if (status == MOD_ERR_OK) { + addClient(s_CatServ, "meow!"); + addMessageList(); + } + this->SetAuthor(AUTHOR); + this->SetVersion(VERSION); + alog("ircd_catserv.so: loaded, message status [%d]", status); + return MOD_CONT; } void AnopeFini(void) { - delClient(); + delClient(); } int my_privmsg(char *source, int ac, char **av) { - User *u; - char *s; + User *u; + char *s; - /* First, some basic checks */ - if (ac != 2) - return MOD_CONT; /* bleh */ - if (!(u = finduser(source))) { - return MOD_CONT; - } /* non-user source */ - if (*av[0] == '#') { - return MOD_CONT; - } - /* Channel message */ - /* we should prolly honour the ignore list here, but i cba for this... */ - s = strchr(av[0], '@'); - if (s) { - *s++ = 0; - if (stricmp(s, ServerName) != 0) - return MOD_CONT; - } - if ((stricmp(av[0], s_CatServ)) == 0) { /* its for US! */ - catserv(u, av[1]); - return MOD_STOP; - } else { /* ok it isnt us, let the old code have it */ - return MOD_CONT; - } + /* First, some basic checks */ + if (ac != 2) + return MOD_CONT; /* bleh */ + if (!(u = finduser(source))) { + return MOD_CONT; + } /* non-user source */ + if (*av[0] == '#') { + return MOD_CONT; + } + /* Channel message */ + /* we should prolly honour the ignore list here, but i cba for this... */ + s = strchr(av[0], '@'); + if (s) { + *s++ = 0; + if (stricmp(s, ServerName) != 0) + return MOD_CONT; + } + if ((stricmp(av[0], s_CatServ)) == 0) { /* its for US! */ + catserv(u, av[1]); + return MOD_STOP; + } else { /* ok it isnt us, let the old code have it */ + return MOD_CONT; + } } void addClient(char *nick, char *realname) { - anope_SendClientIntroduction(nick, "catserv", "meow.meow.land", realname, "+"); + anope_SendClientIntroduction(nick, "catserv", "meow.meow.land", realname, "+"); } void delClient(void) { - anope_SendQuit(s_CatServ, "QUIT :Module Unloaded!"); + anope_SendQuit(s_CatServ, "QUIT :Module Unloaded!"); } /*****************************************************************************/ /* Main CatServ routine. */ void catserv(User * u, char *buf) { - char *cmd, *s; + char *cmd, *s; - cmd = strtok(buf, " "); + cmd = strtok(buf, " "); - if (!cmd) { - return; - } else if (stricmp(cmd, "\1PING") == 0) { - if (!(s = strtok(NULL, ""))) - s = "\1"; - notice(s_CatServ, u->nick, "\1PING %s", s); - } else { - mod_run_cmd(s_CatServ, u, Catserv_cmdTable, cmd); - } + if (!cmd) { + return; + } else if (stricmp(cmd, "\1PING") == 0) { + if (!(s = strtok(NULL, ""))) + s = "\1"; + notice(s_CatServ, u->nick, "\1PING %s", s); + } else { + mod_run_cmd(s_CatServ, u, Catserv_cmdTable, cmd); + } } diff --git a/src/modules/demos/catserv/purr.c b/src/modules/demos/catserv/purr.c index 5a39dc26e..e7c1e9c8d 100644 --- a/src/modules/demos/catserv/purr.c +++ b/src/modules/demos/catserv/purr.c @@ -3,6 +3,6 @@ int do_purr(User * u) { - notice(s_CatServ, u->nick, "PURR!"); - return MOD_STOP; + notice(s_CatServ, u->nick, "PURR!"); + return MOD_STOP; } |
