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.

Clone scan

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
User avatar
ultralord
Master
Posts: 255
Joined: Mon Nov 06, 2006 6:52 pm

Clone scan

Post by ultralord »

Hello does anyone have any clone scan tcl.. i want to clone scan when someone join in specific channel and then i want to send message in other channel like that :


BOT: «« Koukouvaouvaou is a clone! - The nicks ( Koukouvaouvaou salAa ) are the same person! - Mask/host: *!~koukouvao@ppp079166115072.dsl.hol.gr »»

etc..
r
r0t3n
Owner
Posts: 507
Joined: Tue May 31, 2005 6:56 pm
Location: UK

Post by r0t3n »

Code: Select all

set clonescan(channel) "#mychannel"
set clonescan(relaychan) "#staff"
set clonescan(strip) "0"; # set this to 1 to strip ~ from idents

bind join - * onjoin:clonescan

proc onjoin:clonescan {nick uhost hand chan} {
    global clonescan
    if {[lsearch -exact [string tolower $clonescan(channel)] [string tolower $chan]] == -1} { return }
    set list ""
    foreach user [chanlist $chan] {
        if {$user != "" && [string equal -nocase [expr {$clonescan(strip) == 1 ? "[string map {~ ""} $uhost]" : "$uhost"}] [expr {$clonescan(strip) == 1 ? "[string map {~ ""} [getchanhost $user $chan]]" : "[getchanhost $user $chan]"}]} {
            if {[lsearch -exact [string tolower $list] [string tolower $user]] == -1} {
                lappend list "$user"
            }
        }
    }
    if {[llength $list] > 0} {
        putserv "PRIVMSG $clonescan(relaychan) :«« $nick is a clone! - The nicks ( [join $list " "] ) are the same person! - Mask/Host: [expr {$clonescan(strip) == 1 ? "[string map {~ ""} $uhost]" : "$uhost"}] »»"
    }
}
Not tested!
Last edited by r0t3n on Wed Oct 10, 2007 2:11 pm, edited 2 times in total.
r0t3n @ #r0t3n @ Quakenet
User avatar
ultralord
Master
Posts: 255
Joined: Mon Nov 06, 2006 6:52 pm

Post by ultralord »

thnx man i am gonna test it in a while..
User avatar
ultralord
Master
Posts: 255
Joined: Mon Nov 06, 2006 6:52 pm

Post by ultralord »

Error:


[17:22] can't read "list": no such variable
while executing
"llength $list"
(file "scripts/clone.tcl" line 1)
(file "eggdrop.conf" line 1)

when i make start
r
r0t3n
Owner
Posts: 507
Joined: Tue May 31, 2005 6:56 pm
Location: UK

Post by r0t3n »

I edited the script above, give it a try, it should work.
r0t3n @ #r0t3n @ Quakenet
User avatar
ultralord
Master
Posts: 255
Joined: Mon Nov 06, 2006 6:52 pm

Post by ultralord »

same error

Code: Select all

[19:34:41] <BOTNICK> [11:34] Tcl error in file 'eggdrop.conf':
[19:34:41] <BOTNICK> [11:34] can't read "list": no such variable
[19:34:41] <BOTNICK>     while executing
[19:34:41] <BOTNICK> "llength $list"
[19:34:41] <BOTNICK>     (file "scripts/clone.tcl" line 1)
[19:34:41] <BOTNICK>     (file "gatherbot.txt" line 1)
[19:34:41] <BOTNICK> [11:34] * CONFIG FILE NOT LOADED (NOT FOUND, OR ERROR)
-
r
r0t3n
Owner
Posts: 507
Joined: Tue May 31, 2005 6:56 pm
Location: UK

Post by r0t3n »

I added a extra } in one of the expr's by mistake, the edited version should work now...
r0t3n @ #r0t3n @ Quakenet
User avatar
ultralord
Master
Posts: 255
Joined: Mon Nov 06, 2006 6:52 pm

Post by ultralord »

this error :/

Code: Select all

[13:46] Tcl error [onjoin:clonescan]: missing close-bracket
User avatar
ultralord
Master
Posts: 255
Joined: Mon Nov 06, 2006 6:52 pm

Post by ultralord »

anyone? :/
User avatar
DragnLord
Owner
Posts: 711
Joined: Sat Jan 24, 2004 4:58 pm
Location: C'ville, Virginia, USA

Post by DragnLord »

User avatar
ultralord
Master
Posts: 255
Joined: Mon Nov 06, 2006 6:52 pm

Post by ultralord »

Thnx but i dont like it.. i need previus script but doesnt working i have this error..
User avatar
ultralord
Master
Posts: 255
Joined: Mon Nov 06, 2006 6:52 pm

Post by ultralord »

anyone?
m
metroid
Owner
Posts: 771
Joined: Wed Jun 16, 2004 2:46 am

Post by metroid »

That's because Tosser _still_ doesn't get how TCL works.

Code: Select all

set clonescan(channel) [list #mychannel1 #mychannel2 #mychannel3]; # put the channel name(s) here in lowercase.
set clonescan(relaychan) "#staff"
set clonescan(strip) 0; # set this to 1 to strip ~ from idents

bind join - * onjoin:clonescan

proc onjoin:clonescan {nick uhost hand chan} {
    global clonescan
    if {[lsearch -exact $clonescan(channel) [string tolower $chan]]} {
    
        if {$clonescan(strip)} {
            set uhost [string trimleft $uhost "~"]
        }
        set list [list]
        
        foreach user [chanlist $chan] {
       
            if {$clonescan(strip)} {
                set host [string trimleft [getchanhost $user $chan] "~"];
            } else {
                set host [getchanhost $user $chan];
            }
            
            if {[string equal -nocase $uhost $host]} {
                lappend list $user;
            }
        }
        if {[llength $list] > 1} {
            putserv "PRIVMSG $clonescan(relaychan) :«« $nick is a clone! - The nicks ( [join $list ", "] ) are the same person! - Mask/Host: $uhost »»"
        }
    }
}
Last edited by metroid on Mon Oct 15, 2007 3:48 pm, edited 1 time in total.
User avatar
ultralord
Master
Posts: 255
Joined: Mon Nov 06, 2006 6:52 pm

Post by ultralord »

i have this error..

[20:20] Tcl error [onjoin:clonescan]: can't read "strip": no such variable

:/
r
r0t3n
Owner
Posts: 507
Joined: Tue May 31, 2005 6:56 pm
Location: UK

Post by r0t3n »

change all

Code: Select all

$clonescan($strip)
to

Code: Select all

$clonescan(strip)
r0t3n @ #r0t3n @ Quakenet
Post Reply