summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_spanningtree/opertype.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/modules/m_spanningtree/opertype.cpp b/src/modules/m_spanningtree/opertype.cpp
index 473cdb857..99c5ea8bc 100644
--- a/src/modules/m_spanningtree/opertype.cpp
+++ b/src/modules/m_spanningtree/opertype.cpp
@@ -33,7 +33,8 @@ CmdResult CommandOpertype::HandleRemote(RemoteUser* u, CommandBase::Params& para
ServerInstance->Users->all_opers.push_back(u);
ModeHandler* opermh = ServerInstance->Modes->FindMode('o', MODETYPE_USER);
- u->SetMode(opermh, true);
+ if (opermh)
+ u->SetMode(opermh, true);
ServerConfig::OperIndex::const_iterator iter = ServerInstance->Config->OperTypes.find(opertype);
if (iter != ServerInstance->Config->OperTypes.end())