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 

Help with Clones.. Tcl

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


Joined: 30 Apr 2015
Posts: 30
Location: Pakistan

PostPosted: Sun Jan 14, 2018 9:14 am    Post subject: Help with Clones.. Tcl Reply with quote

Code:
# Set the next line as the kick msg you want to say
set clone_msg "Clones"
# Set the next line as the number of clones to scan for
set clone_max 2
# Set the next line as the channels you want to run in
set clone_chans "#SuKooN"

proc join_clone {nick uhost hand chan} {
 global clone_msg clone_max clone_chans botnick
 if {(([lsearch -exact [string tolower $clone_chans] [string tolower $chan]] != -1) || ($clone_chans == "*")) && (![matchattr $hand m|m $chan]) && (![matchattr $hand b]) && ($nick != $botnick)} {
  set host [lindex [split $uhost @] 1]
  set count 0
  foreach i [chanlist $chan] {
   if {[string equal -nocase [lindex [split [getchanhost $i $chan] @] 1] $host]} {
    incr count
    lappend cnicks "$i"
   }
  }
  if {$count >= $clone_max} {
   putquick "MODE $chan +b *!*@$host"
   foreach cnick $cnicks {
    putquick "KICK $chan $cnick :$clone_msg"
   }
  }
 }
}
bind join - * join_clone


------------------------------------------------------------------------------------
There is nothing wrong with this tcl .. need ban time option bot auto remove the ban the timer i set ..

If any one can help me for it . thanks to them ..

F|irT
Back to top
View user's profile Send private message Yahoo Messenger
SpiKe^^
Owner


Joined: 12 May 2006
Posts: 632
Location: Tennessee, USA

PostPosted: Sun Jan 14, 2018 1:59 pm    Post subject: Reply with quote

This seems like the easiest way to expire those bans.

Code:

# Set the next line as the kick msg you want to say
 set clone_msg "Clones"
 # Set the next line as the number of clones to scan for
 set clone_max 2
 # Set the next line as the channels you want to run in
 set clone_chans "#SuKooN"

 # Set ban time (in seconds)
 set clone_bantime 120


 proc join_clone {nick uhost hand chan} {
  global clone_msg clone_max clone_chans botnick
  if {(([lsearch -exact [string tolower $clone_chans] [string tolower $chan]] != -1) || ($clone_chans == "*")) && (![matchattr $hand m|m $chan]) && (![matchattr $hand b]) && ($nick != $botnick)} {
   set host [lindex [split $uhost @] 1]
   set count 0
   foreach i [chanlist $chan] {
    if {[string equal -nocase [lindex [split [getchanhost $i $chan] @] 1] $host]} {
     incr count
     lappend cnicks "$i"
    }
   }
   if {$count >= $clone_max} {
    putquick "MODE $chan +b *!*@$host"
    foreach cnick $cnicks {
     putquick "KICK $chan $cnick :$clone_msg"
    }

    utimer $::clone_bantime [list putserv "MODE $chan -b *!*@$host"]

   }
  }
 }
 bind join - * join_clone


_________________
SpiKe^^

Get BogusTrivia 2.06.4.7 at www.mytclscripts.com
or visit the New Tcl Acrhive at www.tclarchive.org
.
Back to top
View user's profile Send private message Visit poster's website
caesar
Mint Rubber


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

PostPosted: Mon Jan 15, 2018 2:07 am    Post subject: Reply with quote

Questions:

1. Why do you use -exact and turn the two string into lower case and not go with -nocase directly that basically dose the same thing?

2. ($nick != $botnick) really? Who are you and what have you done to SpiKe? Smile

3. Why didn't check if bot is channel operator (botisop) before doing any checks and punishments?

I would change this section:
Code:

foreach i [chanlist $chan] {
    if {[string equal -nocase [lindex [split [getchanhost $i $chan] @] 1] $host]} {
     incr count
     lappend cnicks "$i"
    }
   }
   if {$count >= $clone_max} {
    putquick "MODE $chan +b *!*@$host"
    foreach cnick $cnicks {
     putquick "KICK $chan $cnick :$clone_msg"
    }

with:
Code:

foreach user [chanlist $chan] {
   if {[string equal -nocase [lindex [split [getchanhost $user $chan] @] 1] $host]} {
      lappend kickList $user
   }
}

if {[info exists kickList]} {
   set max 6
   set count [llength $kickList]
   if {$count >= $clone_max} {
      putquick "MODE $chan +b *!*@$host"
      while {$count > 0} {
         if {$count > $max} {
            set users [join [lrange $kickList 0 [expr {$max - 1}]] ","]
            set kickList [lrange $kickList $max end]
            incr count -$max
            } else {
               set users [join $kickList ","]
               set count 0
            }
            putquick "KICK $chan $users $clone_msg"
         }
      }
   }   
}

that will try to kick up to $max per line.

For example with the code as is right now if you have 3 people that needs to be kicked then the bot will send 3 kick lines to the server. But, with the change I mentioned above the bot will kick all 3 with just a single line sent to the server (in theory should be faster).
_________________
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
F|irT
Voice


Joined: 30 Apr 2015
Posts: 30
Location: Pakistan

PostPosted: Mon Jan 15, 2018 10:32 pm    Post subject: More to come.. ? Reply with quote

Code:

# Set the next line as the kick msg you want to say
 set clone_msg "Clones"
 # Set the next line as the number of clones to scan for
 set clone_max 2
 # Set the next line as the channels you want to run in
 set clone_chans "#SuKooN"

 # Set ban time (in seconds)
 set clone_bantime 120


 proc join_clone {nick uhost hand chan} {
  global clone_msg clone_max clone_chans botnick
  if {(([lsearch -exact [string tolower $clone_chans] [string tolower $chan]] != -1) || ($clone_chans == "*")) && (![matchattr $hand m|m $chan]) && (![matchattr $hand b]) && ($nick != $botnick)} {
   set host [lindex [split $uhost @] 1]
   set count 0
   foreach i [chanlist $chan] {
    if {[string equal -nocase [lindex [split [getchanhost $i $chan] @] 1] $host]} {
     incr count
     lappend cnicks "$i"
    }
   }
   if {$count >= $clone_max} {
    putquick "MODE $chan +b *!*@$host"
    foreach cnick $cnicks {
     putquick "KICK $chan $cnick :$clone_msg"
    }

    utimer $::clone_bantime [list putserv "MODE $chan -b *!*@$host"]

   }
  }
 }
 bind join - * join_clone

i did not try caesar yet ... will try that soon ..

working fine the timer is on .. no issue .. but there is a problem i saw like to share .. it's baning cloud ip .. as well as ops match the clones cloud .. here are some result fot u ..
Quote:

[07:07] * Joins: Jutt (uid187859@ealing.irccloud.com)
[07:07] * ChanServ sets mode: +o Jutt
[07:07] * MaSt3r sets mode: +b *!*@ealing.irccloud.com
[07:07] * Charsi-Larka was kicked by MaSt3r (Clones Are Not Allowed 120 Sec Ban ...!!!)
[07:07] * Jutt was kicked by MaSt3r (Clones Are Not Allowed 120 Sec Ban ...!!!)

if it is possibel to make some some ip protect option . or to protect not to kick ops/voice user .. it will be fair enuff for me ..

Thanks .. hoping for the reply soon ..

F|irT
Back to top
View user's profile Send private message Yahoo Messenger
SpiKe^^
Owner


Joined: 12 May 2006
Posts: 632
Location: Tennessee, USA

PostPosted: Mon Jan 15, 2018 11:48 pm    Post subject: Reply with quote

caesar:

I didn't write the script, and just fixed the one issue F|irT asked to have fixed...
Quote:
There is nothing wrong with this tcl .. need ban time option bot auto remove the ban the timer i set ..

All are valid fixes for this script though.
_________________
SpiKe^^

Get BogusTrivia 2.06.4.7 at www.mytclscripts.com
or visit the New Tcl Acrhive at www.tclarchive.org
.
Back to top
View user's profile Send private message Visit poster's website
SpiKe^^
Owner


Joined: 12 May 2006
Posts: 632
Location: Tennessee, USA

PostPosted: Tue Jan 16, 2018 2:26 pm    Post subject: Reply with quote

Try this, report back.

Code:

# Set the next line as the kick msg you want to say
set clone_msg "Clones"
# Set the next line as the number of clones to scan for
set clone_max 2
# Set the next line as the channels you want to run in (* = allchannels)
set clone_chans "#SuKooN"

# Set ban time (in seconds)
set clone_bantime 120

# Exempt +o users from this script ??
#  0 = No, do not exempt users with +o
#  1 = Yes, exempt users with +o
#  2 = Yes, also exempt users with +v
set clone_exemptops 1

# Set exempt users by standard "nick!user@host" mask ??
set clone_exemptmask {
*!*@DALnet
*!*@*.users.quakenet.org
*!*@*.irccloud.com
}
###########  End Settings  ###########


proc join_clone {nick uhost hand chan} {
 global clone_msg clone_max clone_chans clone_exemptops
 if {$clone_chans ne "*" && [lsearch -nocase $clone_chans $chan] == -1} { return }
 if {[isbotnick $nick] || ![botisop $chan] || [matchattr $hand bm|m $chan]} { return }
 if {$clone_exemptops>0 && [matchattr $hand o|o $chan]} {  return  }
 if {$clone_exemptops>1 && [matchattr $hand v|v $chan]} {  return  }
 if {[llength $::clone_exemptmask]} {
   foreach mask $::clone_exemptmask {
     if {[string match -nocase $mask $nick!$uhost]} {  return  }
   }
 }
 set host [lindex [split $uhost @] 1]
 set clonelist ""

 foreach user [chanlist $chan] {
   if {[string equal -nocase [lindex [split [getchanhost $user $chan] @] 1] $host]} {
     if {$clone_exemptops>0 && [isop $user $chan]} {  return  }
     if {$clone_exemptops>1 && [isvoice $user $chan]} {  return  }
     lappend clonelist $user
   }
 }

 if {[set count [llength $clonelist]] >= $clone_max} {
   set max 6
   putquick "MODE $chan +b *!*@$host"
   while {$count > 0} {   ;# Thanks caesar #
     if {$count > $max} {
       set users [join [lrange $clonelist 0 [expr {$max - 1}]] ","]
       set clonelist [lrange $clonelist $max end]
       incr count -$max
     } else {
       set users [join $clonelist ","]
       set count 0
     }
     putquick "KICK $chan $users :$clone_msg"
   }
   utimer $::clone_bantime [list putserv "MODE $chan -b *!*@$host"]
 }

}
bind join - * join_clone


_________________
SpiKe^^

Get BogusTrivia 2.06.4.7 at www.mytclscripts.com
or visit the New Tcl Acrhive at www.tclarchive.org
.
Back to top
View user's profile Send private message Visit poster's website
SpiKe^^
Owner


Joined: 12 May 2006
Posts: 632
Location: Tennessee, USA

PostPosted: Wed Jan 17, 2018 12:30 pm    Post subject: Reply with quote

Here is hopefully the final working copy...
Code:

## DeClone v0.3 ##

# Set the next line as the kick msg you want to say
set clone_msg "Clones"
# Set the next line as the number of clones to scan for
set clone_max 2
# Set the next line as the channels you want to run in (* = allchannels)
set clone_chans "#SuKooN"

# Set ban time (in seconds)
set clone_bantime 120

# Exempt +o users from this script ??
#  0 = No, do not exempt users with +o
#  1 = Yes, exempt users with +o
#  2 = Yes, also exempt users with +v
set clone_exemptops 1

# Set exempt users by standard "nick!user@host" mask ??
# If you do not have any mask to exempt: set clone_exemptmask {}
set clone_exemptmask {
*!*@DALnet
*!*@*.users.quakenet.org
*!*@*.irccloud.com
}
###########  End Settings  ###########


proc join_clone {nick uhost hand chan} {
 global clone_msg clone_max clone_chans clone_exemptops
 if {$clone_chans ne "*" && [lsearch -nocase $clone_chans $chan] == -1} { return }
 if {[isbotnick $nick] || ![botisop $chan] || [matchattr $hand bm|m $chan]} { return }
 if {[llength $::clone_exemptmask]} {
   foreach mask $::clone_exemptmask {
     if {[string match -nocase $mask $nick!$uhost]} {  return  }
   }
 }
 set host [lindex [split $uhost @] 1]
 set clonelist ""

 foreach user [chanlist $chan] {
   if {[string equal -nocase [lindex [split [getchanhost $user $chan] @] 1] $host]} {
     set hn [nick2hand $user $chan]
     if {$clone_exemptops>0 && ([isop $user $chan] || [matchattr $hn o|o $chan])} {
       return
     }
     if {$clone_exemptops>1 && ([isvoice $user $chan] || [matchattr $hn v|v $chan])} {
       return
     }
     lappend clonelist $user
   }
 }

 if {[set count [llength $clonelist]] >= $clone_max} {
   set max 6
   putquick "MODE $chan +b *!*@$host"
   while {$count > 0} {           ;# Thanks caesar #
     if {$count > $max} {
       set users [join [lrange $clonelist 0 [expr {$max - 1}]] ","]
       set clonelist [lrange $clonelist $max end]
       incr count -$max
     } else {
       set users [join $clonelist ","]
       set count 0
     }
     putquick "KICK $chan $users :$clone_msg"
   }
   utimer $::clone_bantime [list putserv "MODE $chan -b *!*@$host"]
 }

}
bind join - * join_clone

putlog "DeClone v0.3 Loaded."


_________________
SpiKe^^

Get BogusTrivia 2.06.4.7 at www.mytclscripts.com
or visit the New Tcl Acrhive at www.tclarchive.org
.
Back to top
View user's profile Send private message Visit poster's website
F|irT
Voice


Joined: 30 Apr 2015
Posts: 30
Location: Pakistan

PostPosted: Fri Jan 19, 2018 5:22 am    Post subject: Thanks .. All Scripter .. Special Thanks to SpiKe^^ Reply with quote

Code:

## DeClone v0.3 ##

# Set the next line as the kick msg you want to say
set clone_msg "10Clones Are Not Allowed 120 Sec Ban ...!!!"
# Set the next line as the number of clones to scan for
set clone_max 3
# Set the next line as the channels you want to run in (* = allchannels)
set clone_chans "#SuKooN"

# Set ban time (in seconds)
set clone_bantime 120

# Exempt +o users from this script ??
#  0 = No, do not exempt users with +o
#  1 = Yes, exempt users with +o
#  2 = Yes, also exempt users with +v
set clone_exemptops 1

# Set exempt users by standard "nick!user@host" mask ??
# If you do not have any mask to exempt: set clone_exemptmask {}
set clone_exemptmask {
*!*@DALnet
*!*@*.users.quakenet.org
*!*@*.irccloud.com
}
###########  End Settings  ###########


proc join_clone {nick uhost hand chan} {
 global clone_msg clone_max clone_chans clone_exemptops
 if {$clone_chans ne "*" && [lsearch -nocase $clone_chans $chan] == -1} { return }
 if {[isbotnick $nick] || ![botisop $chan] || [matchattr $hand bm|m $chan]} { return }
 if {[llength $::clone_exemptmask]} {
   foreach mask $::clone_exemptmask {
     if {[string match -nocase $mask $nick!$uhost]} {  return  }
   }
 }
 set host [lindex [split $uhost @] 1]
 set clonelist ""

 foreach user [chanlist $chan] {
   if {[string equal -nocase [lindex [split [getchanhost $user $chan] @] 1] $host]} {
     set hn [nick2hand $user $chan]
     if {$clone_exemptops>0 && ([isop $user $chan] || [matchattr $hn o|o $chan])} {
       return
     }
     if {$clone_exemptops>1 && ([isvoice $user $chan] || [matchattr $hn v|v $chan])} {
       return
     }
     lappend clonelist $user
   }
 }

 if {[set count [llength $clonelist]] >= $clone_max} {
   set max 6
   putquick "MODE $chan +b *!*@$host"
   while {$count > 0} {           ;# Thanks caesar #
     if {$count > $max} {
       set users [join [lrange $clonelist 0 [expr {$max - 1}]] ","]
       set clonelist [lrange $clonelist $max end]
       incr count -$max
     } else {
       set users [join $clonelist ","]
       set count 0
     }
     putquick "KICK $chan $users :$clone_msg"
   }
   utimer $::clone_bantime [list putserv "MODE $chan -b *!*@$host"]
 }

}
bind join - * join_clone

putlog "DeClone v0.3 Loaded."

----------------------------------------------------------------------------------
Tested in all format excellent work .. here are few result to show ..

[21:37] * MaSt3r sets mode: +b *!*@103.255.6.80
[21:37] * meri_bhn was kicked by MaSt3r (10Clones Are Not Allowed 120 Sec Ban ...!!!)
[21:37] * bhn_k_doud was kicked by MaSt3r (10Clones Are Not Allowed 120 Sec Ban ...!!!)
[21:37] * any_real_amil was kicked by MaSt3r (10Clones Are Not Allowed 120 Sec Ban ...!!!)
-------------------------------------------------------------------------------------
[14:00] * Joins: cRaZy` (~R-P@119.157.179.86)
[14:00] * F|irT sets mode: +v cRaZy`
- Clones from 119.157.179.86
- 1. cRaZy` (~R-P)
- 2. R-K (~R-P)
- 3. R-P (~R-P)
Not Kicking voice user match with clones... as i wanted .. good
----------------------------------------------------------------------------
[14:05] * Parts: +cRaZy` (~R-P@119.157.179.86)
[14:05] * Joins: cRaZy` (~R-P@119.157.179.86)
[14:05] * MaSt3r sets mode: +b *!*@119.157.179.86
[14:05] * R-K was kicked by MaSt3r (Clones Are Not Allowed 120 Sec Ban ...!!!)
[14:05] * R-P was kicked by MaSt3r (Clones Are Not Allowed 120 Sec Ban ...!!!)
[14:05] * cRaZy` was kicked by MaSt3r (Clones Are Not Allowed 120 Sec Ban ...!!!)
-------------------------------------------------------------------------------------
- Clones from id-234240.tooting.irccloud.com
- 1. boy19 (uid234240)
- 2. f-30 (uid234240)
- 3. Mard1 (uid234240)
---------------------------------------------------------------------------------
Protecting Some host i add like Cloud .. not reading clones on cloud host ..
-------------------------------------------------------------------------------------

i am running this srcipt on Dalnet .. No issue ... Thank Goes To SpiKe^^ to Helping it to make it write..

F|irT...!
Back to top
View user's profile Send private message Yahoo Messenger
simo
Master


Joined: 22 Mar 2015
Posts: 436

PostPosted: Wed May 27, 2020 9:53 am    Post subject: Reply with quote

very nice work again SpiKe^^ i tested it on my testnet and added a

privmsg $chan + *!*$host

and found it kept setting bans on already banned clone hosts is there a way to have it set once per clone host ?

also it pushes out the stacked kicks fine at the start but then it starts gettin much slower

tested with this:

Code:

## DeClone v0.3 ##

# Set the next line as the kick msg you want to say
set clone_msg "10Clones Are Not Allowed 120 Sec Ban ...!!!"
# Set the next line as the number of clones to scan for
set clone_max 3
# Set the next line as the channels you want to run in (* = allchannels)
set clone_chans "#SuKooN"

# Set ban time (in seconds)
set clone_bantime 120

# Exempt +o users from this script ??
#  0 = No, do not exempt users with +o
#  1 = Yes, exempt users with +o
#  2 = Yes, also exempt users with +v
set clone_exemptops 1

# Set exempt users by standard "nick!user@host" mask ??
# If you do not have any mask to exempt: set clone_exemptmask {}
set clone_exemptmask {
*!*@DALnet
*!*@*.users.quakenet.org
*!*@*.irccloud.com
}
###########  End Settings  ###########


proc join_clone {nick uhost hand chan} {
 global clone_msg clone_max clone_chans clone_exemptops
 if {$clone_chans ne "*" && [lsearch -nocase $clone_chans $chan] == -1} { return }
 if {[isbotnick $nick] || ![botisop $chan] || [matchattr $hand bm|m $chan]} { return }
 if {[llength $::clone_exemptmask]} {
   foreach mask $::clone_exemptmask {
     if {[string match -nocase $mask $nick!$uhost]} {  return  }
   }
 }
 set host [lindex [split $uhost @] 1]
 set clonelist ""

 foreach user [chanlist $chan] {
   if {[string equal -nocase [lindex [split [getchanhost $user $chan] @] 1] $host]} {
     set hn [nick2hand $user $chan]
     if {$clone_exemptops>0 && ([isop $user $chan] || [matchattr $hn o|o $chan])} {
       return
     }
     if {$clone_exemptops>1 && ([isvoice $user $chan] || [matchattr $hn v|v $chan])} {
       return
     }
     lappend clonelist $user
   }
 }

 if {[set count [llength $clonelist]] >= $clone_max} {
   set max 6
   putserv "privmsg $chan +b *!*@$host"
   putquick "MODE $chan +b *!*@$host"
   while {$count > 0} {           ;# Thanks caesar #
     if {$count > $max} {
       set users [join [lrange $clonelist 0 [expr {$max - 1}]] ","]
       set clonelist [lrange $clonelist $max end]
       incr count -$max
     } else {
       set users [join $clonelist ","]
       set count 0
     }
     putquick "KICK $chan $users :$clone_msg"
   }
   utimer $::clone_bantime [list putserv "MODE $chan -b *!*@$host"]
 }

}
bind join - * join_clone

_________________
Coming together is a beginning, staying together is progress, working together is succes.


Last edited by simo on Wed May 27, 2020 12:06 pm; edited 1 time in total
Back to top
View user's profile Send private message
SpiKe^^
Owner


Joined: 12 May 2006
Posts: 632
Location: Tennessee, USA

PostPosted: Tue Jun 09, 2020 5:51 pm    Post subject: DeClone v0.4 Reply with quote

Here is another try at the clone kicker script.

simo: please test this and report back.

Code:

## DeClone v0.4 ##

# Set the next line as the kick msg you want to say
set clone_msg "Clones"
# Set the next line as the number of clones to scan for
set clone_max 3
# Set the next line as the channels you want to run in (* = allchannels)
set clone_chans "#SuKooN"

# Set ban time (in seconds)
set clone_bantime 120

# Exempt +o users from this script ??
#  0 = No, do not exempt users with +o
#  1 = Yes, exempt users with +o
#  2 = Yes, also exempt users with +v
set clone_exemptops 1

# Set exempt users by standard "nick!user@host" mask ??
# If you do not have any mask to exempt: set clone_exemptmask {}
set clone_exemptmask {
*!*@DALnet
*!*@*.users.quakenet.org
*!*@*.irccloud.com
}
###########  End Settings  ###########


proc join_clone {nk uh hand chan} {
 global clone_msg clone_max clone_chans clone_exemptops declones
 if {$clone_chans ne "*" && [lsearch -nocase $clone_chans $chan] == -1} { return }
 if {[isbotnick $nk] || ![botisop $chan] || [matchattr $hand bm|m $chan]} { return }
 if {[llength $::clone_exemptmask]} {
   foreach mask $::clone_exemptmask {
     if {[string match -nocase $mask $nk!$uh]} {  return  }
   }
 }
 set host [string tolower [lindex [split $uh @] 1]]
 set chan [string tolower $chan]

 if {[info exists declones($chan,$host)]} {
   set nowls $declones($chan,$host)
 } else {  set nowls ""  }

 set new ""

 foreach user [chanlist $chan] {
   if {[string equal -nocase [lindex [split [getchanhost $user $chan] @] 1] $host]} {
     set hn [nick2hand $user $chan]
     if {$clone_exemptops>0 && ([isop $user $chan] || [matchattr $hn o|o $chan])} {
       return
     }
     if {$clone_exemptops>1 && ([isvoice $user $chan] || [matchattr $hn v|v $chan])} {
       return
     }
     if {[lsearch -nocase $nowls $user] == -1} {  lappend new $user  }
   }
 }

 if {([llength $nowls]+[llength $new]) >= $clone_max} {
   if {![llength $nowls]} {
     putquick "MODE $chan +b *!*@$host"
     utimer $::clone_bantime [list unban_clone $chan $host]
   }
   if {[llength $new]} {
     qkick $chan [join $new ","] $clone_msg
     set declones($chan,$host) [concat $nowls $new]
   }
 }
}

proc unban_clone {chan host} {
 if {[lsearch -exact [join [chanbans $chan]] "*!*@$host"] > -1} {
   putserv "MODE $chan -b *!*@$host"
 }
 catch {unset declones($chan,$host)}
}

bind join - * join_clone

putlog "DeClone v0.4 Loaded."



You will also need to load this kick queuing script from an earlier thread.
http://forum.egghelp.org/viewtopic.php?t=20782

Code:

##########################################################

 ##  qkick ver 0.2 by SpiKe^^ - 25 May 2020

 ##  A possible alternative for the Eggdrop tcl command: ##
 ##          putkick <channel> <nick,nick,...> [reason]  ##

 ##  New tcl command:                                    ##
 ##          qkick <channel> <nick,nick,...> [reason]    ##

 ##########################################################
 proc qkick {ch {nk ""} {wy ""}} {  global qkick

   set qmax 10
   set qsec 1
   set qwhy "Go away."

   if {![validchan $ch]} { return 1 }
   set ch [string tolower $ch]
   set nkls [split $nk ","]
   if {[info exists qkick($ch)] && [llength $qkick($ch)]} {
     set nkls [concat $qkick($ch) $nkls]
   }

   if {$wy ne ""} {
     set qwhy $wy
     set qkick(why$ch) $wy
   } elseif {[info exists qkick(why$ch)]} {
     set qwhy $qkick(why$ch)
   }

   if {$nk eq "" || [llength $nkls]>=$qmax} {
     while {[llength $nkls]} {
       if {[llength $nkls]<$qmax && $nk ne ""} { break }
       if {[llength $nkls]>$qmax} {
         set kick [join [lreplace $nkls $qmax end] ","]
         set nkls [lrange $nkls $qmax end]
       } else {
         set kick [join $nkls ","]
         set nkls [list]
       }
       putserv "KICK $ch $kick :$qwhy"
     }
   }

   if {![info exists qkick($ch)]} {
     set qkick($ch) $nkls
     utimer $qsec [list qkick $ch]
   } elseif {$nk eq ""} {
     unset qkick($ch)

     catch {unset qkick(why$ch)}

   } else {
     set qkick($ch) $nkls
   }
   return 0
 }

 putlog "qkick ver 0.2 loaded."


_________________
SpiKe^^

Get BogusTrivia 2.06.4.7 at www.mytclscripts.com
or visit the New Tcl Acrhive at www.tclarchive.org
.
Back to top
View user's profile Send private message Visit poster's website
simo
Master


Joined: 22 Mar 2015
Posts: 436

PostPosted: Wed Jun 10, 2020 8:12 am    Post subject: Reply with quote

hey there SpiKe^^
i tested your last posted tcl and it only sets the bans and kicks the first time i used it and after i cleared bans and rejoined same clones it didnt seem to trigger anymore
_________________
Coming together is a beginning, staying together is progress, working together is succes.
Back to top
View user's profile Send private message
simo
Master


Joined: 22 Mar 2015
Posts: 436

PostPosted: Wed Jun 10, 2020 9:55 am    Post subject: Reply with quote

if the bans are manually removed it hangs and wont set the bans again if clones rejoin

and on the timed unban perhaps its an idea to use pushmode to have it remove in stacked order rather then 1 by 1

and the duplicate bans seems to be solved now
_________________
Coming together is a beginning, staying together is progress, working together is succes.
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