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 

Working CloneScan

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases
View previous topic :: View next topic  
Author Message
ComputerTech
Op


Joined: 22 Feb 2020
Posts: 140
Location: Northern Ireland

PostPosted: Sat May 30, 2020 8:33 pm    Post subject: Working CloneScan Reply with quote

so i made this script that scans a channel for clones,it has two options to scan and if it finds clones notice the user Or kick the clones.
comment below if you think of any ideas Smile

Code:

namespace eval clonescan {

   variable flg "1"

        variable trigger "!"

   bind pub -|- "${trigger}clonescan" [namespace current]::clonescan


   proc clonescan {nick uhost hand chan text} {
      puthelp "NOTICE $nick :Starting clonescan for $chan..."
      set start [clock clicks]
      foreach user [chanlist $chan] {
         set host [lindex [split [getchanhost $user $chan] @] 1]
         lappend clones($host) $user
      }
      set total 0
      set count 0
      foreach host [array names clones] {
         set len [llength $clones($host)]
         if {$len > 1} {
            variable flg
            set nickList [join [join $clones($host)] ", "]
            if {$flg} {
               foreach cloneXz $nickList {putnow "kick $chan $cloneXz"}
               } else {
                  puthelp "NOTICE $nick :\($host\) Nick list: $nickList - Clones: "
               }
               incr count $len
            }
            incr total $len
         }
      }
   }


EDIT
Fixed
_________________
ComputerTech


Last edited by ComputerTech on Sat May 30, 2020 10:32 pm; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail Visit poster's website
willyw
Revered One


Joined: 15 Jan 2009
Posts: 1099

PostPosted: Sat May 30, 2020 9:22 pm    Post subject: Re: Working CloneScan Reply with quote

ComputerTech wrote:

...
comment below if you think of any ideas Smile



$trigger is not set.

Beyond that, I have not run the code, nor even tried to figure out if it will work. I just noticed that, and since you asked.... Smile
_________________
For a fun (and popular) Trivia game, visit us at: irc.librairc.net #science-fiction . Over 300K Q & A to play in BogusTrivia !
Back to top
View user's profile Send private message
ComputerTech
Op


Joined: 22 Feb 2020
Posts: 140
Location: Northern Ireland

PostPosted: Sat May 30, 2020 10:32 pm    Post subject: Reply with quote

thanks willyw didnt see that hehe

i reposted the fixed version
_________________
ComputerTech
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases 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