egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

tcl to find dup hosts

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
Tipi
Voice


Joined: 14 Dec 2005
Posts: 9

PostPosted: Fri Jan 27, 2006 1:32 pm    Post subject: tcl to find dup hosts Reply with quote

Is anyone aware of a tcl that will find dup hosts that are entered under mutiple handles?
Back to top
View user's profile Send private message
CtrlAltDel
Halfop


Joined: 02 Jun 2004
Posts: 49

PostPosted: Fri Jan 27, 2006 8:15 pm    Post subject: Reply with quote

Do you mean Clone detection scripts?

Here I go again with yet another of those "bogus" links ...
Back to top
View user's profile Send private message
Tipi
Voice


Joined: 14 Dec 2005
Posts: 9

PostPosted: Sat Jan 28, 2006 1:00 pm    Post subject: Reply with quote

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
View user's profile Send private message
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Sat Jan 28, 2006 5:13 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Tipi
Voice


Joined: 14 Dec 2005
Posts: 9

PostPosted: Sat Jan 28, 2006 10:17 pm    Post subject: Reply with quote

thank you, you have saved me HOURS of work!
Back to top
View user's profile Send private message
.pt
Halfop


Joined: 16 Nov 2005
Posts: 71

PostPosted: Fri Mar 17, 2006 2:05 pm    Post subject: Reply with quote

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
View user's profile Send private message
caesar
Mint Rubber


Joined: 14 Oct 2001
Posts: 3741
Location: Mint Factory

PostPosted: Fri Mar 17, 2006 2:28 pm    Post subject: Reply with quote

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
View user's profile Send private message
.pt
Halfop


Joined: 16 Nov 2005
Posts: 71

PostPosted: Fri Mar 17, 2006 4:19 pm    Post subject: Reply with quote

i forgot to ask something can the code remove the hosts automaticaly?
Back to top
View user's profile Send private message
.pt
Halfop


Joined: 16 Nov 2005
Posts: 71

PostPosted: Thu Mar 23, 2006 7:30 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber