/** Because the core won't let users or even SERVERS set +o,
* we use the OPERTYPE command to do this.
*/
-CmdResult CommandOpertype::HandleRemote(RemoteUser* u, std::vector<std::string>& params)
+CmdResult CommandOpertype::HandleRemote(RemoteUser* u, CommandBase::Params& params)
{
const std::string& opertype = params[0];
if (!u->IsOper())
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())