diff options
author | attilamolnar <attilamolnar@hush.com> | 2013-06-18 19:17:39 +0200 |
---|---|---|
committer | attilamolnar <attilamolnar@hush.com> | 2013-07-19 19:40:05 +0200 |
commit | 2dc01893c67fedb7b249773c43bc83b46086ee5f (patch) | |
tree | 40a1bc5936628b98b4ae0c0c9427b44cf2cf1809 /src/modules/m_spanningtree | |
parent | fd1d19d6345943ecdb5ce4ef947f9b3c5c8bca86 (diff) |
Get rid of enum UserModes and mark User::modes as private
Diffstat (limited to 'src/modules/m_spanningtree')
-rw-r--r-- | src/modules/m_spanningtree/opertype.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/modules/m_spanningtree/opertype.cpp b/src/modules/m_spanningtree/opertype.cpp index 021100870..9e8c8ed9d 100644 --- a/src/modules/m_spanningtree/opertype.cpp +++ b/src/modules/m_spanningtree/opertype.cpp @@ -32,7 +32,10 @@ CmdResult CommandOpertype::Handle(const std::vector<std::string>& params, User * const std::string& opertype = params[0]; if (!u->IsOper()) ServerInstance->Users->all_opers.push_back(u); - u->modes[UM_OPERATOR] = 1; + + 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()) u->oper = iter->second; |