Compare commits
2 commits
main
...
bot_perm_f
Author | SHA1 | Date | |
---|---|---|---|
5c84130313 | |||
68c6630552 |
1 changed files with 8 additions and 3 deletions
11
idlerpg.cpp
11
idlerpg.cpp
|
@ -232,9 +232,14 @@ class CIdleRPGMod : public CModule {
|
|||
}
|
||||
|
||||
// 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(
|
||||
"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()));
|
||||
return;
|
||||
}
|
||||
|
@ -284,4 +289,4 @@ void TModInfo<CIdleRPGMod>(CModInfo& Info) {
|
|||
|
||||
NETWORKMODULEDEFS(
|
||||
CIdleRPGMod,
|
||||
t_s("Automatically handles your login to IdleRPG games/channels"))
|
||||
t_s("Automatically handles your login to IdleRPG games/channels"))
|
||||
|
|
Loading…
Add table
Reference in a new issue