summaryrefslogtreecommitdiff
path: root/src/modules/m_spanningtree
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-10-21 23:45:44 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-10-21 23:45:44 +0000
commita30abe26fc803900eaf5dc4c08a31aa1d3c9c89f (patch)
tree7d59c15a9c23401b91e100ebb9e98df2c7179e53 /src/modules/m_spanningtree
parentff3eef491aa9e107d09d9dd9560ef7715b37b3b3 (diff)
Change User::oper to an OperInfo reference
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11945 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_spanningtree')
-rw-r--r--src/modules/m_spanningtree/netburst.cpp2
-rw-r--r--src/modules/m_spanningtree/opertype.cpp9
2 files changed, 9 insertions, 2 deletions
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 &params)
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);