summaryrefslogtreecommitdiff
path: root/src/modules/m_spanningtree
diff options
context:
space:
mode:
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);