summaryrefslogtreecommitdiff
path: root/src/messages.c
diff options
context:
space:
mode:
authorRobin Burchell w00t@inspircd.org <Robin Burchell w00t@inspircd.org@5417fbe8-f217-4b02-8779-1006273d7864>2008-10-02 14:24:13 +0000
committerRobin Burchell w00t@inspircd.org <Robin Burchell w00t@inspircd.org@5417fbe8-f217-4b02-8779-1006273d7864>2008-10-02 14:24:13 +0000
commitcfa88f43315973679bc63833050c991f38436240 (patch)
treec670a57b8bc624e1ee1194e80ce649665929c47c /src/messages.c
parent194957cb29e595e4f324448bf3bd35e2bd3b36f4 (diff)
Last bits of renaming protocol.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1316 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/messages.c')
-rw-r--r--src/messages.c70
1 files changed, 35 insertions, 35 deletions
diff --git a/src/messages.c b/src/messages.c
index a46b3834c..a8ceb408b 100644
--- a/src/messages.c
+++ b/src/messages.c
@@ -71,7 +71,7 @@ int m_time(const char *source, int ac, const char **av)
time(&t);
tm = localtime(&t);
strftime(buf, sizeof(buf), "%a %b %d %H:%M:%S %Y %Z", tm);
- anope_cmd_numeric(ServerName, 391, source, "%s :%s", ServerName, buf);
+ anope_SendNumeric(ServerName, 391, source, "%s :%s", ServerName, buf);
return MOD_CONT;
}
@@ -88,15 +88,15 @@ int m_motd(const char *source)
f = fopen(MOTDFilename, "r");
if (f) {
- anope_cmd_numeric(ServerName, 375, source, ":- %s Message of the Day", ServerName);
+ anope_SendNumeric(ServerName, 375, source, ":- %s Message of the Day", ServerName);
while (fgets(buf, sizeof(buf), f)) {
buf[strlen(buf) - 1] = 0;
- anope_cmd_numeric(ServerName, 372, source, ":- %s", buf);
+ anope_SendNumeric(ServerName, 372, source, ":- %s", buf);
}
fclose(f);
- anope_cmd_numeric(ServerName, 376, source, ":End of /MOTD command.");
+ anope_SendNumeric(ServerName, 376, source, ":End of /MOTD command.");
} else {
- anope_cmd_numeric(ServerName, 422, source, ":- MOTD file not found! Please contact your IRC administrator.");
+ anope_SendNumeric(ServerName, 422, source, ":- MOTD file not found! Please contact your IRC administrator.");
}
return MOD_CONT;
}
@@ -237,54 +237,54 @@ int m_stats(const char *source, int ac, const char **av)
if (u && is_oper(u)) {
if (servernum == 1) {
- anope_cmd_numeric(ServerName, 211, source, "Server SendBuf SentBytes SentMsgs RecvBuf RecvBytes RecvMsgs ConnTime");
- anope_cmd_numeric(ServerName, 211, source, "%s %d %d %d %d %d %d %ld", RemoteServer, write_buffer_len(), total_written, -1, read_buffer_len(),
+ anope_SendNumeric(ServerName, 211, source, "Server SendBuf SentBytes SentMsgs RecvBuf RecvBytes RecvMsgs ConnTime");
+ anope_SendNumeric(ServerName, 211, source, "%s %d %d %d %d %d %d %ld", RemoteServer, write_buffer_len(), total_written, -1, read_buffer_len(),
total_read, -1, time(NULL) - start_time);
} else if (servernum == 2) {
- anope_cmd_numeric(ServerName, 211, source, "Server SendBuf SentBytes SentMsgs RecvBuf RecvBytes RecvMsgs ConnTime");
- anope_cmd_numeric(ServerName, 211, source, "%s %d %d %d %d %d %d %ld", RemoteServer2, write_buffer_len(), total_written, -1, read_buffer_len(),
+ anope_SendNumeric(ServerName, 211, source, "Server SendBuf SentBytes SentMsgs RecvBuf RecvBytes RecvMsgs ConnTime");
+ anope_SendNumeric(ServerName, 211, source, "%s %d %d %d %d %d %d %ld", RemoteServer2, write_buffer_len(), total_written, -1, read_buffer_len(),
total_read, -1, time(NULL) - start_time);
} else if (servernum == 3) {
- anope_cmd_numeric(ServerName, 211, source, "Server SendBuf SentBytes SentMsgs RecvBuf RecvBytes RecvMsgs ConnTime");
- anope_cmd_numeric(ServerName, 211, source, "%s %d %d %d %d %d %d %ld", RemoteServer3, write_buffer_len(), total_written, -1, read_buffer_len(),
+ anope_SendNumeric(ServerName, 211, source, "Server SendBuf SentBytes SentMsgs RecvBuf RecvBytes RecvMsgs ConnTime");
+ anope_SendNumeric(ServerName, 211, source, "%s %d %d %d %d %d %d %ld", RemoteServer3, write_buffer_len(), total_written, -1, read_buffer_len(),
total_read, -1, time(NULL) - start_time);
}
}
- anope_cmd_numeric(ServerName, 219, source, "%c :End of /STATS report.", *av[0] ? *av[0] : '*');
+ anope_SendNumeric(ServerName, 219, source, "%c :End of /STATS report.", *av[0] ? *av[0] : '*');
break;
case 'o':
case 'O':
/* Check whether the user is an operator */
u = finduser(source);
if (u && !is_oper(u) && HideStatsO) {
- anope_cmd_numeric(ServerName, 219, source, "%c :End of /STATS report.", *av[0] ? *av[0] : '*');
+ anope_SendNumeric(ServerName, 219, source, "%c :End of /STATS report.", *av[0] ? *av[0] : '*');
} else {
for (i = 0; i < RootNumber; i++)
- anope_cmd_numeric(ServerName, 243, source, "O * * %s Root 0", ServicesRoots[i]);
+ anope_SendNumeric(ServerName, 243, source, "O * * %s Root 0", ServicesRoots[i]);
for (i = 0; i < servadmins.count && (nc = (NickCore *)servadmins.list[i]);
i++)
- anope_cmd_numeric(ServerName, 243, source, "O * * %s Admin 0", nc->display);
+ anope_SendNumeric(ServerName, 243, source, "O * * %s Admin 0", nc->display);
for (i = 0; i < servopers.count && (nc = (NickCore *)servopers.list[i]);
i++)
- anope_cmd_numeric(ServerName, 243, source, "O * * %s Oper 0", nc->display);
+ anope_SendNumeric(ServerName, 243, source, "O * * %s Oper 0", nc->display);
- anope_cmd_numeric(ServerName, 219, source, "%c :End of /STATS report.", *av[0] ? *av[0] : '*');
+ anope_SendNumeric(ServerName, 219, source, "%c :End of /STATS report.", *av[0] ? *av[0] : '*');
}
break;
case 'u':{
int uptime = time(NULL) - start_time;
- anope_cmd_numeric(ServerName, 242, source, ":Services up %d day%s, %02d:%02d:%02d", uptime / 86400, uptime / 86400 == 1 ? "" : "s",
+ anope_SendNumeric(ServerName, 242, source, ":Services up %d day%s, %02d:%02d:%02d", uptime / 86400, uptime / 86400 == 1 ? "" : "s",
(uptime / 3600) % 24, (uptime / 60) % 60, uptime % 60);
- anope_cmd_numeric(ServerName, 250, source, ":Current users: %d (%d ops); maximum %d", usercnt, opcnt, maxusercnt);
- anope_cmd_numeric(ServerName, 219, source, "%c :End of /STATS report.", *av[0] ? *av[0] : '*');
+ anope_SendNumeric(ServerName, 250, source, ":Current users: %d (%d ops); maximum %d", usercnt, opcnt, maxusercnt);
+ anope_SendNumeric(ServerName, 219, source, "%c :End of /STATS report.", *av[0] ? *av[0] : '*');
break;
} /* case 'u' */
default:
- anope_cmd_numeric(ServerName, 219, source, "%c :End of /STATS report.", *av[0] ? *av[0] : '*');
+ anope_SendNumeric(ServerName, 219, source, "%c :End of /STATS report.", *av[0] ? *av[0] : '*');
break;
}
return MOD_CONT;
@@ -294,7 +294,7 @@ int m_stats(const char *source, int ac, const char **av)
int m_version(const char *source, int ac, const char **av)
{
- if (source) anope_cmd_numeric(ServerName, 351, source, "Anope-%s %s :%s - %s (%s) -- %s", version_number, ServerName, ircd->name, version_flags,
+ if (source) anope_SendNumeric(ServerName, 351, source, "Anope-%s %s :%s - %s (%s) -- %s", version_number, ServerName, ircd->name, version_flags,
EncModule, version_build);
return MOD_CONT;
}
@@ -329,11 +329,11 @@ int m_whois(const char *source, const char *who)
clientdesc = desc_DevNull;
else if (s_BotServ && (bi = findbot(who))) {
/* Bots are handled separately */
- anope_cmd_numeric(ServerName, 311, source, "%s %s %s * :%s", bi->nick, bi->user, bi->host, bi->real);
- anope_cmd_numeric(ServerName, 307, source, "%s :is a registered nick", bi->nick);
- anope_cmd_numeric(ServerName, 312, source, "%s %s :%s", bi->nick, ServerName, ServerDesc);
- anope_cmd_numeric(ServerName, 317, source, "%s %ld %ld :seconds idle, signon time", bi->nick, time(NULL) - bi->lastmsg, start_time);
- anope_cmd_numeric(ServerName, 318, source, "%s :End of /WHOIS list.", who);
+ anope_SendNumeric(ServerName, 311, source, "%s %s %s * :%s", bi->nick, bi->user, bi->host, bi->real);
+ anope_SendNumeric(ServerName, 307, source, "%s :is a registered nick", bi->nick);
+ anope_SendNumeric(ServerName, 312, source, "%s %s :%s", bi->nick, ServerName, ServerDesc);
+ anope_SendNumeric(ServerName, 317, source, "%s %ld %ld :seconds idle, signon time", bi->nick, time(NULL) - bi->lastmsg, start_time);
+ anope_SendNumeric(ServerName, 318, source, "%s :End of /WHOIS list.", who);
return MOD_CONT;
} else if (!(ircd->svshold && UseSVSHOLD) && (na = findnick(who))
&& (na->status & NS_KILL_HELD)) {
@@ -341,18 +341,18 @@ int m_whois(const char *source, const char *who)
* We can't just say it doesn't exist here, even tho it does for
* other servers :) -GD
*/
- anope_cmd_numeric(ServerName, 311, source, "%s %s %s * :Services Enforcer", na->nick, NSEnforcerUser, NSEnforcerHost);
- anope_cmd_numeric(ServerName, 312, source, "%s %s :%s", na->nick, ServerName, ServerDesc);
- anope_cmd_numeric(ServerName, 318, source, "%s :End of /WHOIS list.", who);
+ anope_SendNumeric(ServerName, 311, source, "%s %s %s * :Services Enforcer", na->nick, NSEnforcerUser, NSEnforcerHost);
+ anope_SendNumeric(ServerName, 312, source, "%s %s :%s", na->nick, ServerName, ServerDesc);
+ anope_SendNumeric(ServerName, 318, source, "%s :End of /WHOIS list.", who);
return MOD_CONT;
} else {
- anope_cmd_numeric(ServerName, 401, source, "%s :No such service.", who);
+ anope_SendNumeric(ServerName, 401, source, "%s :No such service.", who);
return MOD_CONT;
}
- anope_cmd_numeric(ServerName, 311, source, "%s %s %s * :%s", who, ServiceUser, ServiceHost, clientdesc);
- anope_cmd_numeric(ServerName, 312, source, "%s %s :%s", who, ServerName, ServerDesc);
- anope_cmd_numeric(ServerName, 317, source, "%s %ld %ld :seconds idle, signon time", who, time(NULL) - start_time, start_time);
- anope_cmd_numeric(ServerName, 318, source, "%s :End of /WHOIS list.", who);
+ anope_SendNumeric(ServerName, 311, source, "%s %s %s * :%s", who, ServiceUser, ServiceHost, clientdesc);
+ anope_SendNumeric(ServerName, 312, source, "%s %s :%s", who, ServerName, ServerDesc);
+ anope_SendNumeric(ServerName, 317, source, "%s %ld %ld :seconds idle, signon time", who, time(NULL) - start_time, start_time);
+ anope_SendNumeric(ServerName, 318, source, "%s :End of /WHOIS list.", who);
}
return MOD_CONT;
}