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.

Working CloneScan

Support & discussion of released scripts, and announcements of new releases.
Post Reply
User avatar
ComputerTech
Master
Posts: 399
Joined: Sat Feb 22, 2020 10:29 am
Contact:

Working CloneScan

Post by ComputerTech »

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 :)

Code: Select all

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
Last edited by ComputerTech on Sat May 30, 2020 10:32 pm, edited 1 time in total.
ComputerTech
w
willyw
Revered One
Posts: 1205
Joined: Thu Jan 15, 2009 12:55 am

Re: Working CloneScan

Post by willyw »

ComputerTech wrote: ...
comment below if you think of any ideas :)
$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.... :)
For a fun (and popular) Trivia game, visit us at: irc.librairc.net #science-fiction . Over 300K Q & A to play in BogusTrivia !
User avatar
ComputerTech
Master
Posts: 399
Joined: Sat Feb 22, 2020 10:29 am
Contact:

Post by ComputerTech »

thanks willyw didnt see that hehe

i reposted the fixed version
ComputerTech
Post Reply