mIRC Home    About    Download    Register    News    Help

Print Thread
#269686 08/12/21 09:09 PM
Joined: Apr 2005
Posts: 100
X
Vogon poet
OP Offline
Vogon poet
X
Joined: Apr 2005
Posts: 100
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

Joined: Jan 2004
Posts: 1,989
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 1,989
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
}

maroon #269690 09/12/21 03:58 PM
Joined: Apr 2005
Posts: 100
X
Vogon poet
OP Offline
Vogon poet
X
Joined: Apr 2005
Posts: 100
Thnx for the fast responding

maroon #269691 09/12/21 07:25 PM
Joined: Apr 2005
Posts: 100
X
Vogon poet
OP Offline
Vogon poet
X
Joined: Apr 2005
Posts: 100
its not working

Joined: Jan 2004
Posts: 1,989
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 1,989
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 }

maroon #269693 10/12/21 12:59 AM
Joined: Apr 2005
Posts: 100
X
Vogon poet
OP Offline
Vogon poet
X
Joined: Apr 2005
Posts: 100
thnx maroon


Link Copied to Clipboard