- // dump the whole lot to the user.
- if (IS_LOCAL(user))
- {
- ServerInstance->Logs->Log("map",DEBUG,"local");
- for (int t = 0; t < line; t++)
- {
- user->WriteNumeric(RPL_MAP, "%s :%s",user->nick.c_str(),&matrix[t][0]);
- }
- user->WriteNumeric(RPL_MAPUSERS, "%s :%.0f server%s and %.0f user%s, average %.2f users per server",user->nick.c_str(),totservers,(totservers > 1 ? "s" : ""),totusers,(totusers > 1 ? "s" : ""),avg_users);
- user->WriteNumeric(RPL_ENDMAP, "%s :End of /MAP",user->nick.c_str());
- }
- else
- {
- ServerInstance->Logs->Log("map", DEBUG, "remote dump lines=%d", line);
-
- // XXX: annoying that we have to use hardcoded numerics here..
- for (int t = 0; t < line; t++)
- {
- ServerInstance->PI->PushToClient(user, std::string("::") + ServerInstance->Config->ServerName + " 006 " + user->nick + " :" + &matrix[t][0]);
- }