| View previous topic :: View next topic |
| Author |
Message |
ultralord Master

Joined: 06 Nov 2006 Posts: 255
|
Posted: Mon Oct 08, 2007 12:47 pm Post subject: Clone scan |
|
|
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.. |
|
| Back to top |
|
 |
r0t3n Owner
Joined: 31 May 2005 Posts: 507 Location: UK
|
Posted: Mon Oct 08, 2007 3:03 pm Post subject: |
|
|
| Code: | 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! _________________ r0t3n @ #r0t3n @ Quakenet
Last edited by r0t3n on Wed Oct 10, 2007 2:11 pm; edited 2 times in total |
|
| Back to top |
|
 |
ultralord Master

Joined: 06 Nov 2006 Posts: 255
|
Posted: Mon Oct 08, 2007 4:26 pm Post subject: |
|
|
| thnx man i am gonna test it in a while.. |
|
| Back to top |
|
 |
ultralord Master

Joined: 06 Nov 2006 Posts: 255
|
Posted: Mon Oct 08, 2007 5:24 pm Post subject: |
|
|
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 |
|
| Back to top |
|
 |
r0t3n Owner
Joined: 31 May 2005 Posts: 507 Location: UK
|
Posted: Tue Oct 09, 2007 12:26 pm Post subject: |
|
|
I edited the script above, give it a try, it should work. _________________ r0t3n @ #r0t3n @ Quakenet |
|
| Back to top |
|
 |
ultralord Master

Joined: 06 Nov 2006 Posts: 255
|
Posted: Tue Oct 09, 2007 12:36 pm Post subject: |
|
|
same error
| Code: |
[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)
-
|
|
|
| Back to top |
|
 |
r0t3n Owner
Joined: 31 May 2005 Posts: 507 Location: UK
|
Posted: Wed Oct 10, 2007 2:12 pm Post subject: |
|
|
I added a extra } in one of the expr's by mistake, the edited version should work now... _________________ r0t3n @ #r0t3n @ Quakenet |
|
| Back to top |
|
 |
ultralord Master

Joined: 06 Nov 2006 Posts: 255
|
Posted: Wed Oct 10, 2007 2:48 pm Post subject: |
|
|
this error :/
| Code: |
[13:46] Tcl error [onjoin:clonescan]: missing close-bracket
|
|
|
| Back to top |
|
 |
ultralord Master

Joined: 06 Nov 2006 Posts: 255
|
Posted: Fri Oct 12, 2007 5:54 am Post subject: |
|
|
| anyone? :/ |
|
| Back to top |
|
 |
DragnLord Owner

Joined: 24 Jan 2004 Posts: 711 Location: C'ville, Virginia, USA
|
|
| Back to top |
|
 |
ultralord Master

Joined: 06 Nov 2006 Posts: 255
|
Posted: Fri Oct 12, 2007 1:43 pm Post subject: |
|
|
| Thnx but i dont like it.. i need previus script but doesnt working i have this error.. |
|
| Back to top |
|
 |
ultralord Master

Joined: 06 Nov 2006 Posts: 255
|
Posted: Sun Oct 14, 2007 5:59 am Post subject: |
|
|
| anyone? |
|
| Back to top |
|
 |
metroid Owner
Joined: 16 Jun 2004 Posts: 771
|
Posted: Sun Oct 14, 2007 3:07 pm Post subject: |
|
|
That's because Tosser _still_ doesn't get how TCL works.
| Code: | 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 |
|
| Back to top |
|
 |
ultralord Master

Joined: 06 Nov 2006 Posts: 255
|
Posted: Sun Oct 14, 2007 9:20 pm Post subject: |
|
|
i have this error..
[20:20] Tcl error [onjoin:clonescan]: can't read "strip": no such variable
:/ |
|
| Back to top |
|
 |
r0t3n Owner
Joined: 31 May 2005 Posts: 507 Location: UK
|
Posted: Mon Oct 15, 2007 12:28 pm Post subject: |
|
|
change all to _________________ r0t3n @ #r0t3n @ Quakenet |
|
| Back to top |
|
 |
|