mIRC Home    About    Download    Register    News    Help

Print Thread
#212994 13/06/09 02:04 PM
Joined: May 2009
Posts: 28
B
Ameglian cow
OP Offline
Ameglian cow
B
Joined: May 2009
Posts: 28
Hello all is me again blush sorry to trouble u guys cuz i am really keen to learn.If /cs banned a chatter wat if he comes in with a random nick and change to the banned nick again .. how can we ban immediately? is there any code for it?

Last edited by Babystone; 13/06/09 02:07 PM.
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
This will check the internal ban list for each and every channel that you and the person that changed their nick have in common, and will issue the ban command if their current nick is listed in the internal ban list.
NOTE: The checks and the ban will only be performed if you are an op on the respective common channel.
Code:
on *:nick:{
  var %a = 1, %b = $comchan($nick,0)
  while %a <= %b {
    if ($me isop $comchan($nick,%a)) {
      var %c = 1, %d = $ibl($comchan($nick,%a),0)
      while %c <= %d {
        if $newnick isin $ibl($comchan($nick,%a),%c) {
          .ban -k $comchan($nick,%a) $newnick
          %c = %d
        }
        inc %c
      }
    }
    inc %a
  }
}


Joined: Jul 2007
Posts: 1,129
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
Why not use
Quote:
on @*:nick:{

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Because the @ character requires a channel name to check to see if you are an op in that channel, and the ON NICK event doesn't support a channel parameter.

In the case of ON JOIN, ON TEXT, ON ACTION, etc., there is a channel parameter in the event, which the @ character uses to see if the client using the code is an op in the associated channel.

Note: this may not be a technically accurate accounting, but it is realistically accurate.


Link Copied to Clipboard