From 24b1fbeec8e61e9636daaf606778c324d3ae3042 Mon Sep 17 00:00:00 2001 From: brain Date: Thu, 10 Aug 2006 21:39:57 +0000 Subject: Move all_opers into class InspIRCd git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4857 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/users.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/users.cpp') diff --git a/src/users.cpp b/src/users.cpp index 63cc1763d..1a8e52fee 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -36,7 +36,6 @@ extern Server* MyServer; irc::whowas::whowas_users whowas; static unsigned long already_sent[MAX_DESCRIPTORS] = {0}; -std::vector all_opers; typedef std::map opertype_t; typedef opertype_t operclass_t; @@ -614,7 +613,7 @@ void userrec::Oper(const std::string &opertype) FOREACH_MOD(I_OnOper, OnOper(this, opertype)); log(DEFAULT,"OPER: %s!%s@%s opered as type: %s", this->nick, this->ident, this->host, opertype.c_str()); strlcpy(this->oper, opertype.c_str(), NICKMAX - 1); - all_opers.push_back(this); + ServerInstance->all_opers.push_back(this); FOREACH_MOD(I_OnPostOper,OnPostOper(this, opertype)); } @@ -624,12 +623,12 @@ void userrec::UnOper() { *this->oper = 0; this->modes[UM_OPERATOR] = 0; - for (std::vector::iterator a = all_opers.begin(); a < all_opers.end(); a++) + for (std::vector::iterator a = ServerInstance->all_opers.begin(); a < ServerInstance->all_opers.end(); a++) { if (*a == this) { log(DEBUG,"Oper removed from optimization list"); - all_opers.erase(a); + ServerInstance->all_opers.erase(a); return; } } -- cgit v1.3.1-10-gc9f91