+ if (c->IsModeSet('M') && !is_registered && res != MOD_RES_ALLOW)
{
// user messaging a +M channel and is not registered
user->WriteNumeric(477, ""+std::string(user->nick)+" "+std::string(c->name)+" :You need to be identified to a registered account to message this channel");
- return 1;
- }
-
- if (account)
- {
- if (c->GetExtBanStatus(*account, 'M') < 0)
- {
- // may not speak (text is deliberately vague, so they don't know which restriction to evade)
- user->WriteNumeric(477, ""+std::string(user->nick)+" "+std::string(c->name)+" :You may not speak in this channel");
- return 1;
- }
+ return MOD_RES_DENY;
}
}
else if (target_type == TYPE_USER)
@@ -202,40+191,42 @@ class ModuleServicesAccount : public Module
{
// user messaging a +R user and is not registered
user->WriteNumeric(477, ""+ user->nick +" "+ u->nick +" :You need to be identified to a registered account to message this user");
- return 1;
+ return MOD_RES_DENY;
}
}
- return 0;
+ return MOD_RES_PASSTHRU;
}
- virtual int OnCheckBan(User* user, Channel* chan)