Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;Clones Scripts
- ;Made by nick1
- ;Last edit March 16, 2012
- ;Usage: after a clone joins a chan hit f6 to kick the older clone, happening a lot? hit f7 to give you an option to ban them for a certain amount of time
- ;Note: Are there certain clones you don't want to worry about//kick? Type !clonesignore NICK to ignore them
- on *:join:#: {
- if ($nick != $me) {
- if (($me isop $chan) || ($me isowner $chan) || ($me ishop $chan) || ($me isprotect $chan)) {
- clones $nick
- }
- }
- }
- alias f6 {
- scid %clone.cid kick %clone.chan $iif($gettok(%clone.nicks,2,44) != %clone.joined,$v1,$gettok(%clone.nicks,1,44)) Double/Clone of %clone.address $+([,%clone.nicks,])
- }
- alias f7 {
- ;kickban with time
- mode %clone.chan +b %clone.address
- var %time $?="How many seconds until they are unbanned? 30 mins = 1800 1 hour = 3600 etc."
- if (%time !isnum) {
- echo -ac info Invalid Input -- Halting
- halt
- }
- var %i 0
- while (%i < $numtok(%clone.nicks,44)) {
- inc %i
- kick %clone.chan $gettok(%clone.nicks,%i,44) Double/Clone of %clone.address $+([,%clone.nicks,]) -- Temporary Ban unbanned in $duration(%time)
- }
- .timerunban $+ %clone.address 1 %time mode %clone.chan -b %clone.address
- }
- alias Clones {
- var %x $nick($chan,0),%m,%n
- while (%x) {
- if ($ialchan($address($nick($chan,%x),2),$chan,0) > 1) && ($istok(%n,$nick($chan,%x),44) == $false) {
- if (!$istok($ignoreclone,$address($nick($chan,%x),2),44)) {
- echo 4 -at [Clone] - $address($nick($chan,%x),2) has a clone in $chan $+([,$cloner($nick($chan,%x),$chan),])
- set %clone.address $address($nick($chan,%x),2)
- set %clone.nicks $cloner($nick($chan,%x),$chan)
- set %clone.chan $chan
- set %clone.cid $cid
- set %clone.joined $1
- }
- %n = $addtok(%n,$cloner($nick($chan,%x),$chan),44)
- inc %m
- }
- dec %x
- }
- }
- alias cloner {
- var %a $address($1,2),%c $2,%i $ialchan($address($1,2),$2,0),%r
- while (%i) {
- %r = $addtok(%r,$ialchan(%a,%c,%i).nick,44)
- dec %i
- }
- return %r
- }
- alias ignoreclone {
- return %clonesignore
- }
- on *:input:*: {
- if (($1 == !ignoreclone) || ($1 == !ignoreclones) || ($1 == !cloneignore) || ($1 == !clonesignore)) {
- if (*!*@* iswm $2) {
- set %clonesignore $addtok(%clonesignore,$2,44)
- echo -act info Ignoring the host $qt($2) for clone search
- }
- elseif ($nick($active,$2)) {
- set %clonesignore $addtok(%clonesignore,$address($2,2),44)
- echo -act info Ignoring the host $qt($address($2,2)) for clone search
- }
- else {
- echo -act info Invalid Syntax: !ignoreclone <nick|host>
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement