| View previous topic :: View next topic |
| Author |
Message |
Tipi Voice
Joined: 14 Dec 2005 Posts: 9
|
Posted: Fri Jan 27, 2006 1:32 pm Post subject: tcl to find dup hosts |
|
|
| Is anyone aware of a tcl that will find dup hosts that are entered under mutiple handles? |
|
| Back to top |
|
 |
CtrlAltDel Halfop
Joined: 02 Jun 2004 Posts: 49
|
Posted: Fri Jan 27, 2006 8:15 pm Post subject: |
|
|
Do you mean Clone detection scripts?
Here I go again with yet another of those "bogus" links ... |
|
| Back to top |
|
 |
Tipi Voice
Joined: 14 Dec 2005 Posts: 9
|
Posted: Sat Jan 28, 2006 1:00 pm Post subject: |
|
|
no, I run a few large channels, some of the botmasters have not been as good checking before they add to the bot userlist as they should be.
we have numerous duplicate handles, where the user's main nick and his alt nick have both been added as handles in the userlist, with the same hostmask
I'm looking for an easy way to find those duplicate entry's |
|
| Back to top |
|
 |
demond Revered One

Joined: 12 Jun 2004 Posts: 3073 Location: San Francisco, CA
|
Posted: Sat Jan 28, 2006 5:13 pm Post subject: |
|
|
| Code: |
foreach u [userlist] {
foreach h [getuser $u hosts] {lappend ul [list $h $u]}
}
foreach {h u} [eval concat [lsort -index 0 $ul]] {lappend ua($h) $u}
foreach {h u} [array get ua] {
if {[llength $u] > 1} {putlog "$h: [join $u]"}
}
|
_________________ connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use [code] tag when posting logs, code |
|
| Back to top |
|
 |
Tipi Voice
Joined: 14 Dec 2005 Posts: 9
|
Posted: Sat Jan 28, 2006 10:17 pm Post subject: |
|
|
| thank you, you have saved me HOURS of work! |
|
| Back to top |
|
 |
.pt Halfop
Joined: 16 Nov 2005 Posts: 71
|
Posted: Fri Mar 17, 2006 2:05 pm Post subject: |
|
|
it gives me this error
•18:04:50• <bot> [12:03] can't read "ul": no such variable
•18:04:50• <bot> while executing
•18:04:50• <bot> "lsort -index 0 $ul"
•18:04:50• <bot> invoked from within
•18:04:50• <bot> "eval concat [lsort -index 0 $ul]"
•18:04:50• <bot> invoked from within
•18:04:50• <bot> "foreach {h u} [eval concat [lsort -index 0 $ul]] {lappend ua($h) $u}"
•18:04:50• <bot> (file "scripts/duplicatehost.tcl" line 6)
•18:04:50• <bot> invoked from within
•18:04:50• <bot> "source scripts/duplicatehost.tcl" |
|
| Back to top |
|
 |
caesar Mint Rubber

Joined: 14 Oct 2001 Posts: 3741 Location: Mint Factory
|
Posted: Fri Mar 17, 2006 2:28 pm Post subject: |
|
|
Umm.. That should only happen theoreticaly when the bot dosen't have any users in it's userlist. The folowing code should work fine.
| Code: |
foreach u [userlist] {
foreach h [getuser $u hosts] {
lappend ul [list $h $u]
}
}
if {[info exists ul]} {
foreach {h u} [eval concat [lsort -index 0 $ul]] {
lappend ua($h) $u
}
foreach {h u} [array get ua] {
if {[llength $u] > 1} {
putlog "$h: [join $u]"
}
}
}
|
_________________ Once the game is over, the king and the pawn go back in the same box. |
|
| Back to top |
|
 |
.pt Halfop
Joined: 16 Nov 2005 Posts: 71
|
Posted: Fri Mar 17, 2006 4:19 pm Post subject: |
|
|
| i forgot to ask something can the code remove the hosts automaticaly? |
|
| Back to top |
|
 |
.pt Halfop
Joined: 16 Nov 2005 Posts: 71
|
Posted: Thu Mar 23, 2006 7:30 am Post subject: |
|
|
| what is suppost the script do when find a new user because i dont see anything made by the script, sorry for the trouble |
|
| Back to top |
|
 |
|