Top

Auth ban


mIRC Code
+ 0 likes
Please Register to submit score.
Bookmark and Share
Average Score  5.0 (of 2 scores)
Date Added  Apr 27, 2005
Last Updated  Sep 04, 2008

Introduction

This bans a users auth on join.. regardless of their address!
This is brilliant if they are changing their address but not their authname

Grab the Code

;Usage.. on the bot type these..
;Set the channel, on the bot /set %authc #chan1,#chan2
;You can use 1 chan if you like. 
;/auser 100 $address(YOURNICK,2)
;to add the user on 100 the bot must be on a chan with you
;$mode +b <authname> <reason> will ban the users auth from your channels,
;if no reason is specified it will say You are BANNED from this channel
;on the kick message
;$mode -b <authname> to unban an authname
;$banflags will show all auths banned to the bot
 
 
on *:JOIN:%authc: {
  set %nick $nick 
  set %authbanchan $chan
  who %nick n%nat,465
}
 
raw 354:& 465 & *: {
  set %authname. [ $+ [ $address(%nick,2) ] ] $4
}
 
raw 315:*: {
  if ($2 == %nick) {
    if (%authname. [ $+ [ $address(%nick,2) ] ] == 0) {
      unset %nick
      unset %authname. [ $+ [ $address(%nick,2) ] ]
      unset %authbanchan
    }
    elseif ($istok(%banned,%authname. [ $+ [ $address(%nick,2) ] ],32)) {
      ban -ku60 %authbanchan %nick 2 $iif(%reason. [ $+ [ %authname. [ $+ [ $address(%nick,2) ] ] ] ], %reason. [ $+ [ %authname. [ $+ [ $address(%nick,2) ] ] ] ], You are BANNED from this channel.)
      unset %nick
      unset %authname. [ $+ [ $address(%nick,2) ] ]
      unset %authbanchan
    }
    else {
      unset %nick
      unset %authname. [ $+ [ $address(%nick,2) ] ]
      unset %authbanchan
    }
  }
}
 
on 100:TEXT:$mode +b *:*: { 
  if ($istok(%banned,$3,32)) { notice $nick $3 is already banned with me. }
  else { 
    set %banned $addtok(%banned,$3,32)
    set %reason. [ $+ [ $3 ] ] $4-
    notice $nick +b set to $3 $+ .
  }
}
 
on 100:TEXT:$mode -b *:*: { 
  if (!$istok(%banned,$3,32)) { notice $nick BanID not found. }
  else { 
    set %banned $remtok(%banned,$3,32)
    unset %reason. [ $+ [ $3 ] ]
    notice $nick -b set to $3 $+ .
  }
}
 
on 100:TEXT:$banflags:*: { 
  notice $nick Banned flags on me are:
  notice $nick %banned
  notice $nick To add a ban flag type /msg $me mode +b authname
} 

Comments

  (2)  RSS
DarthReven
Comments: 468
 
mIRC Snippet:  Auth ban
Posted on Apr 27, 2005 3:41 pm
well considering ips of some users change slightly you can use $address($nick,5) as the stored ip then use $wildtok(%banned,$address($nick,3),32)
Chaz
Comments: 6
 
mIRC Snippet:  Auth ban
Posted on May 29, 2005 9:39 am
That doesn't really matter, they can have whatever ip/host but they will have the same auth, it will add to banned the address of that auth name.

Commenting Options

Register or Login to Hawkee.com or use your Facebook or Twitter account by clicking the corresponding button below.

  
Bottom