mIRC Homepage
Posted By: XGamerAMD kick ban detect - 08/12/21 09:09 PM
alias meop { if ($me isop $1) || ($me isvoice $1) || ($me isreg $1) return $true }

alias kb {
//echo -a if $meop($chan) { .echo -st 0,4 No Se puede echar | halt }
mode # +b ~q: $+ $1
}

doesnt work any help
Posted By: maroon Re: kick ban detect - 09/12/21 03:37 PM
Your alias returns $true for almost everyone in the channel, including those who don't have the power to ban someone. So, for everyone except for someone who has only the +h halfop status, it returns $true, which causes your alias to display the message and halt.

If you want MEOP to return true if someone has the power to ban someone, which is everyone except voices and those with no status:

alias meop { if ($nick($1,$me,a,rv) return $true }

and then your if statement becomes:

alias kb {
//echo -a if (!$meop($chan)) { .echo -st 0,4 No Se puede echar | halt }
mode # +b ~q: $+ $1
}
Posted By: XGamerAMD Re: kick ban detect - 09/12/21 03:58 PM
Thnx for the fast responding
Posted By: XGamerAMD Re: kick ban detect - 09/12/21 07:25 PM
its not working
Posted By: maroon Re: kick ban detect - 09/12/21 10:13 PM
The meop alias didn't have matching parenthesis, but I assumed you'd see the obvious fix from the hint given by the error message in the status window when you used this.

alias meop { if ($nick($1,$me,a,rv)) return $true }
Posted By: XGamerAMD Re: kick ban detect - 10/12/21 12:59 AM
thnx maroon
© mIRC Discussion Forums