mIRC Home    About    Download    Register    News    Help

Print Thread
kick ban detect #269686 08/12/21 09:09 PM
Joined: Apr 2005
Posts: 71
X
XGamerAMD Offline OP
Babel fish
OP Offline
Babel fish
X
Joined: Apr 2005
Posts: 71
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

Re: kick ban detect [Re: XGamerAMD] #269689 09/12/21 03:37 PM
Joined: Jan 2004
Posts: 1,745
maroon Offline
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 1,745
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
}

Re: kick ban detect [Re: maroon] #269690 09/12/21 03:58 PM
Joined: Apr 2005
Posts: 71
X
XGamerAMD Offline OP
Babel fish
OP Offline
Babel fish
X
Joined: Apr 2005
Posts: 71
Thnx for the fast responding

Re: kick ban detect [Re: maroon] #269691 09/12/21 07:25 PM
Joined: Apr 2005
Posts: 71
X
XGamerAMD Offline OP
Babel fish
OP Offline
Babel fish
X
Joined: Apr 2005
Posts: 71
its not working

Re: kick ban detect [Re: XGamerAMD] #269692 09/12/21 10:13 PM
Joined: Jan 2004
Posts: 1,745
maroon Offline
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 1,745
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 }

Re: kick ban detect [Re: maroon] #269693 10/12/21 12:59 AM
Joined: Apr 2005
Posts: 71
X
XGamerAMD Offline OP
Babel fish
OP Offline
Babel fish
X
Joined: Apr 2005
Posts: 71
thnx maroon