 |
 |
Event_OnBan
|
| |
Parameters
$1 = Channel
$2 = Nick that sets mode +b
$3 = Banned mask
Description
This event fires when an user sets a new ban mask for a channel that you are currently on.
It is bound to the channel window $1.
In $2 you get the nick that sets the ban mask , note that it may be your nick.
In $3 you get the banned mask.
It will never be your mask , since that case is handled by Event_OnMeBan
You may handle this event for example when writing a protection list system , to check if
the banned mask is protected (and then maybe unban it and/or punish the user that tried to set the ban)
or not (and then 'enforce' the ban or directly kick the banned user from the channel).
Example
/<
    if (!$%ext_ismeop[$_chan])halt;
    @ Check the nicks that are going to be banned
    set $4 $%lst_remove[$_mynick,$%nck_match[$1,$3]];
    if ($4)<
        @ Ok,got the nick list and it is not null
        foreach ($temp.on.ban,$4)<
            @ If the nick is in our protect list , unban and kick
            if ($%lst_contains[$temp.on.ban,$my.global.protect.list])<
                unban $1 $3
                kick $1 $2 Hey , that was my friend's mask!!!
                halt;
            >
        >
    >
>
See also
Event_OnMeBan
Index  Event list