summaryrefslogtreecommitdiff
path: root/src/modules/m_spanningtree
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-03-22 12:03:43 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-03-22 12:03:43 +0000
commit68730d4c9701b34c962302e6410908865fb2ba28 (patch)
treedfa6b0b1d79bfd894ab75d0415e054b54ff2d850 /src/modules/m_spanningtree
parent9ee525bec55521e9d911df40c2d8ca8b0212ee22 (diff)
Wheeee for HUGE commits. Convert all numerics to WriteNumeric so that OnNumeric can capture them.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9175 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_spanningtree')
-rw-r--r--src/modules/m_spanningtree/main.cpp22
-rw-r--r--src/modules/m_spanningtree/override_map.cpp6
-rw-r--r--src/modules/m_spanningtree/override_time.cpp2
-rw-r--r--src/modules/m_spanningtree/override_whois.cpp4
-rw-r--r--src/modules/m_spanningtree/time.cpp2
5 files changed, 18 insertions, 18 deletions
diff --git a/src/modules/m_spanningtree/main.cpp b/src/modules/m_spanningtree/main.cpp
index 27179ad49..73f41880f 100644
--- a/src/modules/m_spanningtree/main.cpp
+++ b/src/modules/m_spanningtree/main.cpp
@@ -90,7 +90,7 @@ void ModuleSpanningTree::ShowLinks(TreeServer* Current, User* user, int hops)
else if ((Current->Hidden) && (!IS_OPER(user)))
return;
- user->WriteServ("364 %s %s %s :%d %s", user->nick,Current->GetName().c_str(),
+ user->WriteNumeric(364, "%s %s %s :%d %s", user->nick,Current->GetName().c_str(),
(Utils->FlatLinks && (!IS_OPER(user))) ? ServerInstance->Config->ServerName : Parent.c_str(),
(Utils->FlatLinks && (!IS_OPER(user))) ? 0 : hops,
Current->GetDesc().c_str());
@@ -109,7 +109,7 @@ int ModuleSpanningTree::CountServs()
void ModuleSpanningTree::HandleLinks(const char* const* parameters, int pcnt, User* user)
{
ShowLinks(Utils->TreeRoot,user,0);
- user->WriteServ("365 %s * :End of /LINKS list.",user->nick);
+ user->WriteNumeric(365, "%s * :End of /LINKS list.",user->nick);
return;
}
@@ -141,23 +141,23 @@ void ModuleSpanningTree::HandleLusers(const char* const* parameters, int pcnt, U
}
}
}
- user->WriteServ("251 %s :There are %d users and %d invisible on %d servers",user->nick,
+ user->WriteNumeric(251, "%s :There are %d users and %d invisible on %d servers",user->nick,
n_users-ServerInstance->Users->ModeCount('i'),
ServerInstance->Users->ModeCount('i'),
ulined_count ? this->CountServs() - ulined_count : this->CountServs());
if (ServerInstance->Users->OperCount())
- user->WriteServ("252 %s %d :operator(s) online",user->nick,ServerInstance->Users->OperCount());
+ user->WriteNumeric(252, "%s %d :operator(s) online",user->nick,ServerInstance->Users->OperCount());
if (ServerInstance->Users->UnregisteredUserCount())
- user->WriteServ("253 %s %d :unknown connections",user->nick,ServerInstance->Users->UnregisteredUserCount());
+ user->WriteNumeric(253, "%s %d :unknown connections",user->nick,ServerInstance->Users->UnregisteredUserCount());
if (ServerInstance->ChannelCount())
- user->WriteServ("254 %s %d :channels formed",user->nick,ServerInstance->ChannelCount());
+ user->WriteNumeric(254, "%s %d :channels formed",user->nick,ServerInstance->ChannelCount());
- user->WriteServ("255 %s :I have %d clients and %d servers",user->nick,ServerInstance->Users->LocalUserCount(),ulined_local_count ? this->CountLocalServs() - ulined_local_count : this->CountLocalServs());
- user->WriteServ("265 %s :Current Local Users: %d Max: %d",user->nick,ServerInstance->Users->LocalUserCount(),max_local);
- user->WriteServ("266 %s :Current Global Users: %d Max: %d",user->nick,n_users,max_global);
+ user->WriteNumeric(255, "%s :I have %d clients and %d servers",user->nick,ServerInstance->Users->LocalUserCount(),ulined_local_count ? this->CountLocalServs() - ulined_local_count : this->CountLocalServs());
+ user->WriteNumeric(265, "%s :Current Local Users: %d Max: %d",user->nick,ServerInstance->Users->LocalUserCount(),max_local);
+ user->WriteNumeric(266, "%s :Current Global Users: %d Max: %d",user->nick,n_users,max_global);
return;
}
@@ -321,7 +321,7 @@ int ModuleSpanningTree::HandleVersion(const char* const* parameters, int pcnt, U
if (found)
{
std::string Version = found->GetVersion();
- user->WriteServ("351 %s :%s",user->nick,Version.c_str());
+ user->WriteNumeric(351, "%s :%s",user->nick,Version.c_str());
if (found == Utils->TreeRoot)
{
ServerInstance->Config->Send005(user);
@@ -329,7 +329,7 @@ int ModuleSpanningTree::HandleVersion(const char* const* parameters, int pcnt, U
}
else
{
- user->WriteServ("402 %s %s :No such server",user->nick,parameters[0]);
+ user->WriteNumeric(402, "%s %s :No such server",user->nick,parameters[0]);
}
return 1;
}
diff --git a/src/modules/m_spanningtree/override_map.cpp b/src/modules/m_spanningtree/override_map.cpp
index 853010b4d..7103b23de 100644
--- a/src/modules/m_spanningtree/override_map.cpp
+++ b/src/modules/m_spanningtree/override_map.cpp
@@ -167,11 +167,11 @@ void ModuleSpanningTree::HandleMap(const char* const* parameters, int pcnt, User
// dump the whole lot to the user. This is the easy bit, honest.
for (int t = 0; t < line; t++)
{
- user->WriteServ("006 %s :%s",user->nick,&matrix[t][0]);
+ user->WriteNumeric(6, "%s :%s",user->nick,&matrix[t][0]);
}
float avg_users = totusers / totservers;
- user->WriteServ("270 %s :%.0f server%s and %.0f user%s, average %.2f users per server",user->nick,totservers,(totservers > 1 ? "s" : ""),totusers,(totusers > 1 ? "s" : ""),avg_users);
- user->WriteServ("007 %s :End of /MAP",user->nick);
+ user->WriteNumeric(270, "%s :%.0f server%s and %.0f user%s, average %.2f users per server",user->nick,totservers,(totservers > 1 ? "s" : ""),totusers,(totusers > 1 ? "s" : ""),avg_users);
+ user->WriteNumeric(7, "%s :End of /MAP",user->nick);
return;
}
diff --git a/src/modules/m_spanningtree/override_time.cpp b/src/modules/m_spanningtree/override_time.cpp
index cbd29f535..20f377979 100644
--- a/src/modules/m_spanningtree/override_time.cpp
+++ b/src/modules/m_spanningtree/override_time.cpp
@@ -51,7 +51,7 @@ int ModuleSpanningTree::HandleTime(const char* const* parameters, int pcnt, User
}
else
{
- user->WriteServ("402 %s %s :No such server",user->nick,parameters[0]);
+ user->WriteNumeric(402, "%s %s :No such server",user->nick,parameters[0]);
}
}
return 1;
diff --git a/src/modules/m_spanningtree/override_whois.cpp b/src/modules/m_spanningtree/override_whois.cpp
index 3cb282cb0..f0d8139a3 100644
--- a/src/modules/m_spanningtree/override_whois.cpp
+++ b/src/modules/m_spanningtree/override_whois.cpp
@@ -47,8 +47,8 @@ int ModuleSpanningTree::HandleRemoteWhois(const char* const* parameters, int pcn
}
else if (!remote)
{
- user->WriteServ("401 %s %s :No such nick/channel",user->nick, parameters[1]);
- user->WriteServ("318 %s %s :End of /WHOIS list.",user->nick, parameters[1]);
+ user->WriteNumeric(401, "%s %s :No such nick/channel",user->nick, parameters[1]);
+ user->WriteNumeric(318, "%s %s :End of /WHOIS list.",user->nick, parameters[1]);
return 1;
}
}
diff --git a/src/modules/m_spanningtree/time.cpp b/src/modules/m_spanningtree/time.cpp
index 3bf1e67b1..4149aee58 100644
--- a/src/modules/m_spanningtree/time.cpp
+++ b/src/modules/m_spanningtree/time.cpp
@@ -67,7 +67,7 @@ bool TreeSocket::Time(const std::string &prefix, std::deque<std::string> &params
char tms[26];
snprintf(tms,26,"%s",asctime(timeinfo));
tms[24] = 0;
- u->WriteServ("391 %s %s :%s",u->nick,prefix.c_str(),tms);
+ u->WriteNumeric(391, "%s %s :%s",u->nick,prefix.c_str(),tms);
}
else
{