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/main.cpp18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/modules/m_spanningtree/main.cpp b/src/modules/m_spanningtree/main.cpp
index 11b309557..b313b876a 100644
--- a/src/modules/m_spanningtree/main.cpp
+++ b/src/modules/m_spanningtree/main.cpp
@@ -581,6 +581,13 @@ void ModuleSpanningTree::OnUserConnect(LocalUser* user)
params.push_back(":"+std::string(user->fullname));
Utils->DoOneToMany(ServerInstance->Config->GetSID(), "UID", params);
+ if (IS_OPER(user))
+ {
+ params.clear();
+ params.push_back(user->oper->name);
+ Utils->DoOneToMany(user->uuid,"OPERTYPE",params);
+ }
+
for(Extensible::ExtensibleStore::const_iterator i = user->GetExtList().begin(); i != user->GetExtList().end(); i++)
{
ExtensionItem* item = i->first;
@@ -790,12 +797,11 @@ void ModuleSpanningTree::RedoConfig(Module* mod)
// locally.
void ModuleSpanningTree::OnOper(User* user, const std::string &opertype)
{
- if (IS_LOCAL(user))
- {
- parameterlist params;
- params.push_back(opertype);
- Utils->DoOneToMany(user->uuid,"OPERTYPE",params);
- }
+ if (user->registered != REG_ALL || !IS_LOCAL(user))
+ return;
+ parameterlist params;
+ params.push_back(opertype);
+ Utils->DoOneToMany(user->uuid,"OPERTYPE",params);
}
void ModuleSpanningTree::OnAddLine(User* user, XLine *x)