This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Only Scan certain ip.

Help for those learning Tcl or writing their own scripts.
Post Reply
g
gamble27
Halfop
Posts: 71
Joined: Tue Aug 05, 2008 7:51 am

Only Scan certain ip.

Post by gamble27 »

hello all i have this working code with me however its versioning every ip but i jus want it to version certain ips like for example *!*@125.* *!*@118.* , i tried to play around with it but with no success,help will be appreciated.. Code is listed below :

Code: Select all

bind ctcr - VERSION version:reply 
bind join - * check:version 

proc check:version {nick uhost hand chan} { 
if {[isop $nick $chan] || [isvoice $nick $chan] || [matchattr $hand Pfov|Pfov $chan]} { 
return 0 
}

global cversion 
chattr proxychk +|+P $chan 
set cversion([string tolower $nick]) 1 
putserv "PRIVMSG $nick :\001Version\001" 
utimer 90 [list no:version:reply $nick $uhost $chan] 
} 

proc version:reply {nick uhost hand dest kw arg} { 
global cversion 
if {[info exists cversion([string tolower $nick])]} { 
unset cversion([string tolower $nick]) 
} 
} 


proc no:version:reply {nick uhost chan} { 
global cversion 
if {[info exists cversion([string tolower $nick])] && [onchan $nick $chan]} { 
putserv "MODE $chan +b *!*@[lindex [split $uhost @] 1]" 
putserv "KICK $chan $nick : Spam" 
unset cversion([string tolower $nick]) 
} 
}

putlog "Version Kicker"
Post Reply