summaryrefslogtreecommitdiff
path: root/src/messages.c
diff options
context:
space:
mode:
authorrburchell <rburchell@5417fbe8-f217-4b02-8779-1006273d7864>2009-06-11 10:16:35 +0000
committerrburchell <rburchell@5417fbe8-f217-4b02-8779-1006273d7864>2009-06-11 10:16:35 +0000
commit8fa67528583b83a23030d5d358e070586672cc87 (patch)
treefc2f1a81de12c8a1f8bb73148b102b0a5461111a /src/messages.c
parenta68b5efe279cafc3b2d81b335871091813c940d2 (diff)
Cleanup of internals of new opertype stuff by Adam. Removes OS OPER and OS ADMIN, changes OS STAFF to be more helpful in their place.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2319 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/messages.c')
-rw-r--r--src/messages.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/messages.c b/src/messages.c
index a1135b2f1..a29841b6a 100644
--- a/src/messages.c
+++ b/src/messages.c
@@ -243,14 +243,16 @@ int m_stats(const char *source, int ac, const char **av)
if (u && !is_oper(u) && HideStatsO) {
ircdproto->SendNumeric(ServerName, 219, source, "%c :End of /STATS report.", *av[0] ? *av[0] : '*');
} else {
- for (i = 0; i < RootNumber; i++)
- ircdproto->SendNumeric(ServerName, 243, source, "O * * %s Root 0", ServicesRoots[i]);
- for (i = 0; i < servadmins.count && (nc = static_cast<NickCore *>(servadmins.list[i]));
- i++)
- ircdproto->SendNumeric(ServerName, 243, source, "O * * %s Admin 0", nc->display);
- for (i = 0; i < servopers.count && (nc = static_cast<NickCore *>(servopers.list[i]));
- i++)
- ircdproto->SendNumeric(ServerName, 243, source, "O * * %s Oper 0", nc->display);
+ std::list<std::pair<std::string, std::string> >::iterator it;
+
+ for (it = svsopers_in_config.begin(); it != svsopers_in_config.end(); it++)
+ {
+ const std::string nick = it->first;
+ const std::string type = it->second;
+
+ if ((nc = findcore(it->first.c_str())))
+ ircdproto->SendNumeric(ServerName, 243, source, "O * * %s %s 0", it->first.c_str(), it->second.c_str());
+ }
ircdproto->SendNumeric(ServerName, 219, source, "%c :End of /STATS report.", *av[0] ? *av[0] : '*');
}