Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- menu Channel,Nicklist,Menubar,Status {
- -
- Real name Checker
- .$iif($timer(.Recheck),$style(1)) Enable:.timer.Recheck $iif($timer(.Recheck),off,1 %RN.Delay GetName.Checker)
- .-
- .Set Real names:set %RN.Check $$input(Separated by semi-colon,e,Real name checker,%RN.Check)
- .Exception?:var %ex = $$input(Separated by semi-colon,e,Exception list,%RN.Exception) | $iif(%ex != $null,set,unset) %RN.Exception %ex
- .-
- .Set Delay $+($chr(40),$iif(%RN.Delay != $null,every $v1 $+ s,Not set yet),$chr(41)):set %RN.Delay $$?="Enter a number from 1 to 60"
- .-
- .$iif(%RN.Wise == 1,$style(1)) Use Wise Method:set %RN.Wise $iif(%RN.Wise == 1,0,1) | unset %RN.Last
- -
- }
- on !@*:Join:#:{ GetName $nick }
- alias GetName {
- if ($1) && ($timer(.Recheck)) {
- if (!$hget(GetName)) { hmake GetName }
- if (!$hget(GetName,$1)) { hadd -m GetName $1 !@! }
- }
- }
- alias GetName.Checker {
- if (%RN.Delay == $null) { set %RN.Delay 1 }
- if (%RN.Wise == 1) && (%RN.Last != $null) goto Jump
- var %x = 1
- while ($hget(GetName,%x).item) {
- var %item = $hget(GetName,%x).item
- if ($hget(GetName,%item) == !@!) {
- .enable #WhoisHalt
- set %RN.Last -u60 %item
- !whois %item %item
- break
- }
- inc %x
- }
- :Jump
- .timer.Recheck 1 %RN.Delay GetName.Checker
- }
- alias TakeAction {
- if ($1) {
- var %x = $hget(GetName,$1)
- if ($istok(%RN.Check,%x,59)) {
- if ($istok(%RN.Exception,%x,59)) goto Jump
- var %i = 1
- while ($comchan($1,%i)) { ban -k $v1 $1 2 You're not welcome! | inc %i }
- :Jump
- hdel GetName $1
- unset %RN.Last
- }
- }
- }
- raw 311:*:{ haltdef | hadd -m GetName $2 $strip($6-) | TakeAction $2 }
- raw 401:*:{
- haltdef
- if ($hget(GetName,$2).item) { hdel GetName $2 }
- }
- #WhoisHalt off
- raw *:*:{
- if ($numeric == 318) { .disable #WhoisHalt }
- if ($istok(311 307 319 317 313 330 338 379 378 310 318,$numeric,32)) haltdef
- }
- #WhoisHalt end
Advertisement
Add Comment
Please, Sign In to add comment