From a30abe26fc803900eaf5dc4c08a31aa1d3c9c89f Mon Sep 17 00:00:00 2001 From: danieldg Date: Wed, 21 Oct 2009 23:45:44 +0000 Subject: Change User::oper to an OperInfo reference git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11945 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_spanningtree/netburst.cpp | 2 +- src/modules/m_spanningtree/opertype.cpp | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'src/modules/m_spanningtree') diff --git a/src/modules/m_spanningtree/netburst.cpp b/src/modules/m_spanningtree/netburst.cpp index 5f47c690b..82b6c2b68 100644 --- a/src/modules/m_spanningtree/netburst.cpp +++ b/src/modules/m_spanningtree/netburst.cpp @@ -259,7 +259,7 @@ void TreeSocket::SendUsers(TreeServer* Current) this->WriteLine(data); if (IS_OPER(u->second)) { - snprintf(data,MAXBUF,":%s OPERTYPE %s", u->second->uuid.c_str(), u->second->oper.c_str()); + snprintf(data,MAXBUF,":%s OPERTYPE %s", u->second->uuid.c_str(), u->second->oper->name.c_str()); this->WriteLine(data); } if (IS_AWAY(u->second)) diff --git a/src/modules/m_spanningtree/opertype.cpp b/src/modules/m_spanningtree/opertype.cpp index dc9c0064f..32ffa4fc7 100644 --- a/src/modules/m_spanningtree/opertype.cpp +++ b/src/modules/m_spanningtree/opertype.cpp @@ -35,7 +35,14 @@ bool TreeSocket::OperType(const std::string &prefix, parameterlist ¶ms) if (!IS_OPER(u)) ServerInstance->Users->all_opers.push_back(u); u->modes[UM_OPERATOR] = 1; - u->oper.assign(opertype, 0, 512); + OperIndex::iterator iter = ServerInstance->Config->oper_blocks.find(" " + opertype); + if (iter != ServerInstance->Config->oper_blocks.end()) + u->oper = iter->second; + else + { + u->oper = new OperInfo; + u->oper->name = opertype; + } Utils->DoOneToAllButSender(u->uuid, "OPERTYPE", params, u->server); TreeServer* remoteserver = Utils->FindServer(u->server); -- cgit v1.2.3