diff options
author | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2010-02-15 18:04:53 +0000 |
---|---|---|
committer | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2010-02-15 18:04:53 +0000 |
commit | 56d733a9fa9477d281b62ac9237eb7ac8356340d (patch) | |
tree | b521a5c0bcbc7692659994af33fb02c85034e241 /src/modules/m_spanningtree | |
parent | 065d1788b602c807a4d669ba413a175c0059e357 (diff) |
Add <oper:autologin> to allow SSL fingerprint-based automatic oper login
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12467 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_spanningtree')
-rw-r--r-- | src/modules/m_spanningtree/main.cpp | 18 |
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) |