summaryrefslogtreecommitdiff
path: root/src/protocol/charybdis.c
diff options
context:
space:
mode:
authorRobin Burchell w00t@inspircd.org <Robin Burchell w00t@inspircd.org@5417fbe8-f217-4b02-8779-1006273d7864>2008-10-01 21:20:54 +0000
committerRobin Burchell w00t@inspircd.org <Robin Burchell w00t@inspircd.org@5417fbe8-f217-4b02-8779-1006273d7864>2008-10-01 21:20:54 +0000
commite46bc26a06cecb72ffe8587ec84997d89b75d852 (patch)
tree9d005b4f035494962cfbbdfd06a0fd23c9890f1e /src/protocol/charybdis.c
parent8aa6436d7380d160d1fc2eb2235d71b57dacea17 (diff)
Merge commit 'cbx/anopeng-protocol' into anopeng
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1295 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/protocol/charybdis.c')
-rw-r--r--src/protocol/charybdis.c182
1 files changed, 3 insertions, 179 deletions
diff --git a/src/protocol/charybdis.c b/src/protocol/charybdis.c
index e2983561f..3a714a2f7 100644
--- a/src/protocol/charybdis.c
+++ b/src/protocol/charybdis.c
@@ -1063,153 +1063,10 @@ int anope_event_quit(const char *source, int ac, const char **av)
return MOD_CONT;
}
-void charybdis_cmd_372(const char *source, const char *msg)
+void CharybdisProto::cmd_numeric(const char *source, int numeric, const char *dest, const char *buf)
{
- send_cmd((UseTS6 ? TS6SID : ServerName), "372 %s :- %s", source, msg);
-}
-
-void charybdis_cmd_372_error(const char *source)
-{
- send_cmd((UseTS6 ? TS6SID : ServerName),
- "422 %s :- MOTD file not found! Please "
- "contact your IRC administrator.", source);
-}
-
-void charybdis_cmd_375(const char *source)
-{
- send_cmd((UseTS6 ? TS6SID : ServerName),
- "375 %s :- %s Message of the Day", source, ServerName);
-}
-
-void charybdis_cmd_376(const char *source)
-{
- send_cmd((UseTS6 ? TS6SID : ServerName),
- "376 %s :End of /MOTD command.", source);
-}
-
-/* 391 */
-void charybdis_cmd_391(const char *source, const char *timestr)
-{
- if (!timestr) {
- return;
- }
- send_cmd(NULL, "391 :%s %s :%s", source, ServerName, timestr);
-}
-
-/* 250 */
-void charybdis_cmd_250(const char *buf)
-{
- if (!buf) {
- return;
- }
-
- send_cmd(NULL, "250 %s", buf);
-}
-
-/* 307 */
-void charybdis_cmd_307(const char *buf)
-{
- if (!buf) {
- return;
- }
-
- send_cmd((UseTS6 ? TS6SID : ServerName), "307 %s", buf);
-}
-
-/* 311 */
-void charybdis_cmd_311(const char *buf)
-{
- if (!buf) {
- return;
- }
-
- send_cmd((UseTS6 ? TS6SID : ServerName), "311 %s", buf);
-}
-
-/* 312 */
-void charybdis_cmd_312(const char *buf)
-{
- if (!buf) {
- return;
- }
-
- send_cmd((UseTS6 ? TS6SID : ServerName), "312 %s", buf);
-}
-
-/* 317 */
-void charybdis_cmd_317(const char *buf)
-{
- if (!buf) {
- return;
- }
-
- send_cmd((UseTS6 ? TS6SID : ServerName), "317 %s", buf);
-}
-
-/* 219 */
-void charybdis_cmd_219(const char *source, const char *letter)
-{
- if (!source) {
- return;
- }
-
- if (letter) {
- send_cmd(NULL, "219 %s %c :End of /STATS report.", source,
- *letter);
- } else {
- send_cmd(NULL, "219 %s l :End of /STATS report.", source);
- }
-}
-
-/* 401 */
-void charybdis_cmd_401(const char *source, const char *who)
-{
- if (!source || !who) {
- return;
- }
- send_cmd((UseTS6 ? TS6SID : ServerName), "401 %s %s :No such service.",
- source, who);
-}
-
-/* 318 */
-void charybdis_cmd_318(const char *source, const char *who)
-{
- if (!source || !who) {
- return;
- }
-
- send_cmd((UseTS6 ? TS6SID : ServerName),
- "318 %s %s :End of /WHOIS list.", source, who);
-}
-
-/* 242 */
-void charybdis_cmd_242(const char *buf)
-{
- if (!buf) {
- return;
- }
-
- send_cmd(NULL, "242 %s", buf);
-}
-
-/* 243 */
-void charybdis_cmd_243(const char *buf)
-{
- if (!buf) {
- return;
- }
-
- send_cmd(NULL, "243 %s", buf);
-}
-
-/* 211 */
-void charybdis_cmd_211(const char *buf)
-{
- if (!buf) {
- return;
- }
-
- send_cmd(NULL, "211 %s", buf);
+ // This might need to be set in the call to cmd_numeric instead of here, will review later -- CyberBotX
+ send_cmd(UseTS6 ? TS6SID : source, "%03d %s %s", numeric, dest, buf);
}
void CharybdisProto::cmd_mode(const char *source, const char *dest, const char *buf)
@@ -1320,13 +1177,6 @@ int anope_event_tmode(const char *source, int ac, const char **av)
return MOD_CONT;
}
-void charybdis_cmd_351(const char *source)
-{
- send_cmd((UseTS6 ? TS6SID : ServerName),
- "351 %s Anope-%s %s :%s - %s (%s) -- %s", source, version_number,
- ServerName, ircd->name, version_flags, EncModule, version_build);
-}
-
/* Event: PROTOCTL */
int anope_event_capab(const char *source, int ac, const char **av)
{
@@ -1499,31 +1349,6 @@ int charybdis_send_deaccount(int argc, char **argv)
}
/**
- * Tell anope which function we want to perform each task inside of anope.
- * These prototypes must match what anope expects.
- **/
-void moduleAddAnopeCmds()
-{
- pmodule_cmd_372(charybdis_cmd_372);
- pmodule_cmd_372_error(charybdis_cmd_372_error);
- pmodule_cmd_375(charybdis_cmd_375);
- pmodule_cmd_376(charybdis_cmd_376);
- pmodule_cmd_351(charybdis_cmd_351);
- pmodule_cmd_391(charybdis_cmd_391);
- pmodule_cmd_250(charybdis_cmd_250);
- pmodule_cmd_307(charybdis_cmd_307);
- pmodule_cmd_311(charybdis_cmd_311);
- pmodule_cmd_312(charybdis_cmd_312);
- pmodule_cmd_317(charybdis_cmd_317);
- pmodule_cmd_219(charybdis_cmd_219);
- pmodule_cmd_401(charybdis_cmd_401);
- pmodule_cmd_318(charybdis_cmd_318);
- pmodule_cmd_242(charybdis_cmd_242);
- pmodule_cmd_243(charybdis_cmd_243);
- pmodule_cmd_211(charybdis_cmd_211);
-}
-
-/**
* Now tell anope how to use us.
**/
int AnopeInit(int argc, char **argv)
@@ -1555,7 +1380,6 @@ int AnopeInit(int argc, char **argv)
pmodule_key_mode(CMODE_k);
pmodule_limit_mode(CMODE_l);
- moduleAddAnopeCmds();
pmodule_ircd_proto(&ircd_proto);
moduleAddIRCDMsgs();