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.

Clones Tcl

Old posts that have not been replied to for several years.
Y
Yoda
Halfop
Posts: 78
Joined: Thu Oct 24, 2002 2:57 am
Location: Milano, Italy
Contact:

Clones Tcl

Post by Yoda »

I need a very simple clone tcl that only detect clones and infos a writed list of nicks about that, like: [nick] is here with these other nick too: .....

or: these nick comes from the same ip:.........

I saw here some clones scipts but dont works and i dont know why :-?

thanks for help
Yoda
T
Thor

Post by Thor »

if this can help u

set userhost "*!*[string range $host [string first @ $host] e]"
set clonelist ""
set clonenb 0

foreach user [chanlist $chan] {
set clonehost [getchanhost $user $chan]
if {[string match [strlwr $userhost] [strlwr "$user![getchanhost $user $chan]"]] && (![isvoice $user $chan] || ![isop $user $chan])} {
incr clonenb
lappend clonelist $user
}
}
Y
Yoda
Halfop
Posts: 78
Joined: Thu Oct 24, 2002 2:57 am
Location: Milano, Italy
Contact:

Post by Yoda »

thanks, but what exatly this script will do?

Yoda
T
Thor

Post by Thor »

for example u can use it with a bind join

the scripts makes a list of clone (clonelist) and gives the number of clone found (clonenb)

For example, if clonenb == 3, there is 3 clones found in the chan and u can do a foreach clone $clonelist in order to ban them
Y
Yoda
Halfop
Posts: 78
Joined: Thu Oct 24, 2002 2:57 am
Location: Milano, Italy
Contact:

Post by Yoda »

I'm not so expert to prepare a script ready to use, could you help me?

Yoda
T
Thor

Post by Thor »

Code: Select all


bind join - * AntiClone
proc AntiClone {nick host hand chan} {

set userhost "*!*[string range $host [string first @ $host] e]"
 set clonelist ""
 set clonenb 0

 foreach user [chanlist $chan] {
 	set clonehost [getchanhost $user $chan]
      if {[string match [strlwr $userhost] [strlwr "$user![getchanhost $user $chan]"]} {
 		incr clonenb
 		lappend clonelist $user
	}
 }

if {$clonenb >= 2} {
    puthelp "privmsg $chan :clone detected : [join $clonelist ", "]"
}

}
test this
Y
Yoda
Halfop
Posts: 78
Joined: Thu Oct 24, 2002 2:57 am
Location: Milano, Italy
Contact:

Post by Yoda »

tested.
no errors but absolutely nothing happened and no privmsg to channel, or nick.
T
Thor

Post by Thor »

but it's workink. I used a script like this
T
Thor

Post by Thor »

make some tests like this

Code: Select all


bind join - * AntiClone 
proc AntiClone {nick host hand chan} { 

set userhost "*!*[string range $host [string first @ $host] e]" 
set clonelist "" 
set clonenb 0 

putlog "AntiClone : $nick $host $hand $chan, userhost created : $userhost"

foreach user [chanlist $chan] { 
   set clonehost [getchanhost $user $chan] 
      if {[string match [strlwr $userhost] [strlwr "$user![getchanhost $user $chan]"]} { 
      incr clonenb 
      lappend clonelist $user 
   } 
} 

putlog "$clonenb found : [join $clonelist ", "]" 

if {$clonenb >= 2} { 
    puthelp "privmsg $chan :clone detected : [join $clonelist ", "]" 
} 

} 

Y
Yoda
Halfop
Posts: 78
Joined: Thu Oct 24, 2002 2:57 am
Location: Milano, Italy
Contact:

Post by Yoda »

sorry but, no way, nothing happen.
Yoda
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

What are you doign witht he script, apart from readin it ont he forum. IE, what do you do with to load it into your bot?
Y
Yoda
Halfop
Posts: 78
Joined: Thu Oct 24, 2002 2:57 am
Location: Milano, Italy
Contact:

Post by Yoda »

save it as clone.tcl and ad it in .conf then .rehash and see :roll:
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

Out of intrest, type ".binds join" int he partyline, and paste the output.
T
Thor

Post by Thor »

Hmm .. i just see something.
Do u use alltools.tcl ???
All my scripts needs it

Moreover, don't forget to do a .console +d in pl
Y
Yoda
Halfop
Posts: 78
Joined: Thu Oct 24, 2002 2:57 am
Location: Milano, Italy
Contact:

Post by Yoda »

Code: Select all

<Yoda> .binds join
<BiT> [17:28] tcl: builtin dcc call: *dcc:binds Yoda 10 join
<BiT> Command bindings:
<BiT>   TYPE FLGS     COMMAND              HITS BINDING (TCL)
<BiT>   join -|-      #one *               0 cs:join
<BiT>   join -|-      #two *              0 cs:join
<BiT>   join -|-      *                       2 AntiClone

and I did .console +d
Locked