* | Inspire Internet Relay Chat Daemon |
* +------------------------------------+
*
- * InspIRCd: (C) 2002-2007 InspIRCd Development Team
+ * InspIRCd: (C) 2002-2008 InspIRCd Development Team
* See: http://www.inspircd.org/wiki/index.php/Credits
*
* This program is free but copyrighted software; see
/* Neat and tidy default values, as we're dealing with a matrix not a simple string */
memset(text, 0, 128);
- if (ServerInstance->clientlist->size() == 0)
+ if (ServerInstance->Users->clientlist->size() == 0)
{
// If there are no users, WHO THE HELL DID THE /MAP?!?!?!
percent = 0;
}
else
{
- percent = ((float)Current->GetUserCount() / (float)ServerInstance->clientlist->size()) * 100;
+ percent = ((float)Current->GetUserCount() / (float)ServerInstance->Users->clientlist->size()) * 100;
}
const std::string operdata = IS_OPER(user) ? MapOperInfo(Current) : "";
// and divisons, we instead render the map onto a backplane of characters
// (a character matrix), then draw the branches as a series of "L" shapes
// from the nodes. This is not only friendlier on CPU it uses less stack.
-void ModuleSpanningTree::HandleMap(const char** parameters, int pcnt, User* user)
+void ModuleSpanningTree::HandleMap(const char* const* parameters, int pcnt, User* user)
{
// This array represents a virtual screen which we will
// "scratch" draw to, as the console device of an irc
// 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;
}