diff options
author | attilamolnar <attilamolnar@hush.com> | 2013-08-13 14:22:07 +0200 |
---|---|---|
committer | attilamolnar <attilamolnar@hush.com> | 2013-08-13 14:22:07 +0200 |
commit | 19cc8380fb9060add68852e40846b10e4d1f18f5 (patch) | |
tree | 8b8a60b706e66b8e4433da198c743b54d9730927 /src/modules | |
parent | 37394a80c2b4a3948e4f0e850710c9518d9ba259 (diff) |
Store oper types and opers in separate containers
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/m_spanningtree/opertype.cpp | 4 | ||||
-rw-r--r-- | src/modules/m_sqloper.cpp | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/modules/m_spanningtree/opertype.cpp b/src/modules/m_spanningtree/opertype.cpp index 9e8c8ed9d..6402b89dc 100644 --- a/src/modules/m_spanningtree/opertype.cpp +++ b/src/modules/m_spanningtree/opertype.cpp @@ -36,8 +36,8 @@ CmdResult CommandOpertype::Handle(const std::vector<std::string>& params, User * ModeHandler* opermh = ServerInstance->Modes->FindMode('o', MODETYPE_USER); u->SetMode(opermh, true); - OperIndex::iterator iter = ServerInstance->Config->oper_blocks.find(" " + opertype); - if (iter != ServerInstance->Config->oper_blocks.end()) + OperIndex::iterator iter = ServerInstance->Config->OperTypes.find(opertype); + if (iter != ServerInstance->Config->OperTypes.end()) u->oper = iter->second; else { diff --git a/src/modules/m_sqloper.cpp b/src/modules/m_sqloper.cpp index b9a883043..295f4aa94 100644 --- a/src/modules/m_sqloper.cpp +++ b/src/modules/m_sqloper.cpp @@ -78,8 +78,8 @@ class OpMeQuery : public SQLQuery bool OperUser(User* user, const std::string &pattern, const std::string &type) { - OperIndex::iterator iter = ServerInstance->Config->oper_blocks.find(" " + type); - if (iter == ServerInstance->Config->oper_blocks.end()) + OperIndex::iterator iter = ServerInstance->Config->OperTypes.find(type); + if (iter == ServerInstance->Config->OperTypes.end()) { ServerInstance->Logs->Log(MODNAME, LOG_DEFAULT, "bad type '%s' in returned row for oper %s", type.c_str(), username.c_str()); return false; |