Compare commits

..

2 commits

View file

@ -232,9 +232,14 @@ class CIdleRPGMod : public CModule {
} }
// Bot has op? // Bot has op?
if (!pBot->HasPerm(CChan::Op)) { auto is_op = [](CNick* bot) {
return (bot->HasPerm(CChan::Op) || bot->HasPerm(CChan::HalfOp) ||
bot->HasPerm(CChan::Admin) || bot->HasPerm(CChan::Owner));
};
if (!is_op(pBot)) {
PutModule(t_f( PutModule(t_f(
"Error logging in: Bot [{1}] not operator in in channel [{2}]")( "Error logging in: Bot [{1}] not operator in channel [{2}]")(
sChan.GetBotnick(), sChan.GetChannel())); sChan.GetBotnick(), sChan.GetChannel()));
return; return;
} }
@ -284,4 +289,4 @@ void TModInfo<CIdleRPGMod>(CModInfo& Info) {
NETWORKMODULEDEFS( NETWORKMODULEDEFS(
CIdleRPGMod, CIdleRPGMod,
t_s("Automatically handles your login to IdleRPG games/channels")) t_s("Automatically handles your login to IdleRPG games/channels"))