From 56d733a9fa9477d281b62ac9237eb7ac8356340d Mon Sep 17 00:00:00 2001 From: danieldg Date: Mon, 15 Feb 2010 18:04:53 +0000 Subject: Add to allow SSL fingerprint-based automatic oper login git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12467 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_spanningtree/main.cpp | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'src/modules/m_spanningtree') 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) -- cgit v1.2.3