| View previous topic :: View next topic |
| Author |
Message |
darksis Voice
Joined: 04 Aug 2012 Posts: 16
|
Posted: Fri Dec 07, 2012 8:18 am Post subject: gline joinflood to snircd |
|
|
Hello i need please script about joinflood i see in this code
| Code: |
bind flud - join foo
proc foo {n u args} {
regsub {[^@]+} $u * u
putserv "akill $u :abusive join flood"
}
|
and i want to change command akill to gline like this
| Code: |
/gline !+*@106.109.108.78 3600 :Localclone?
|
gline+timer and resaon |
|
| Back to top |
|
 |
SpiKe^^ Owner

Joined: 12 May 2006 Posts: 792 Location: Tennessee, USA
|
Posted: Fri Dec 07, 2012 1:21 pm Post subject: |
|
|
Let's just try this:
| Code: |
bind flud - join foo
proc foo {nk uh hn tp ch} {
regsub {[^@]+} $uh * uh
putserv "gline $uh 3600 :abusive join flood"
return 0
}
|
Not sure if you need to 'return 1' or 'return 0'
| Quote: | If the proc returns 1, no further action is taken on the flood.
If the proc returns 0, the bot will do its normal "punishment" for the flood. |
Let me know how that works out. _________________ SpiKe^^
Get BogusTrivia 2.06.4.7 at www.mytclscripts.com
or visit the New Tcl Acrhive at www.tclarchive.org
. |
|
| Back to top |
|
 |
darksis Voice
Joined: 04 Aug 2012 Posts: 16
|
Posted: Fri Dec 07, 2012 2:13 pm Post subject: |
|
|
thanks but i try code and is no work i try now connect 70 clones and all clone inside and no gline |
|
| Back to top |
|
 |
SpiKe^^ Owner

Joined: 12 May 2006 Posts: 792 Location: Tennessee, USA
|
Posted: Fri Dec 07, 2012 3:06 pm Post subject: |
|
|
That would imply the eggdrop join flood is not triggering, so that process is never being called.
Eggdrops' join flood only monitors for 'x' number of joins in 'x' seconds.
You need a script that will monitor for 'x' number of connections from the same host. That process you posted doesn't monitor for that:)
Search the egghelp.org script archive for a script that does clone checking, and maybe it can be modified to do the gline as the punishment method. _________________ SpiKe^^
Get BogusTrivia 2.06.4.7 at www.mytclscripts.com
or visit the New Tcl Acrhive at www.tclarchive.org
. |
|
| Back to top |
|
 |
darksis Voice
Joined: 04 Aug 2012 Posts: 16
|
Posted: Fri Dec 07, 2012 3:16 pm Post subject: |
|
|
ok i undestand but i think change in this code
| Code: |
bind flud - join foo
proc foo {nk uh hn tp ch} {
regsub {[^@]+} $uh * uh
putserv "gline $uh 3600 :abusive join flood"
return 0
}
|
gline on host like command like this
| Code: |
putserv "gline !+*@106.109.108.78 3600 :Localclone?"
|
but i dont know if this possible |
|
| Back to top |
|
 |
SpiKe^^ Owner

Joined: 12 May 2006 Posts: 792 Location: Tennessee, USA
|
Posted: Fri Dec 07, 2012 5:06 pm Post subject: |
|
|
I already did, but it triggers off the eggdrop join flood which has no reference to clones. You need a script that will attempt to count the users from one host and ban/kick/gline/slap/kiss the joined users on that criteria. The eggdrop does not have any of that code, nor does the code you posted.
There are many channel control scripts in the archive that already do the clone checks, find one of them that functions and is close to what you want, then ask for the gline patch to that scripts punishment method. _________________ SpiKe^^
Get BogusTrivia 2.06.4.7 at www.mytclscripts.com
or visit the New Tcl Acrhive at www.tclarchive.org
. |
|
| Back to top |
|
 |
SpiKe^^ Owner

Joined: 12 May 2006 Posts: 792 Location: Tennessee, USA
|
Posted: Fri Dec 07, 2012 5:24 pm Post subject: |
|
|
From the egghelp.org script archive:
Clone Scanner 5.90.b 09/08/2007 awyeah
http://www.egghelp.org/cgi-bin/tcl_archive.tcl?mode=download&id=1464
Eliminates excessive clones residing in a channel (checks: on channel join and on continuous intervals). Clones are detected in the format of: *!*@host.domain.com. Includes op/voice exemption from clone scanning. Also exempts vhosts (virtual hosts) from being detected as clones.
This looks like a nicer start to your clone checking woes. Make sure it does work and trigger on the issue you are trying to address, then maybe someone can help change its punishment method. _________________ SpiKe^^
Get BogusTrivia 2.06.4.7 at www.mytclscripts.com
or visit the New Tcl Acrhive at www.tclarchive.org
. |
|
| Back to top |
|
 |
darksis Voice
Joined: 04 Aug 2012 Posts: 16
|
Posted: Sun Dec 09, 2012 3:08 pm Post subject: |
|
|
spike thanks for help but this code i need
| Code: |
on *:snotice:*Client connecting*:{
if ($network != mIRCx) { return }
var %ip = $iif($regex($10,/(\d+\.\d+\.\d+\.\d+)/),$regml(1),1)
if (!$hget(Botnet,$9)) { hadd -mu4 Botnet $9 %ip }
if ($hget(Botnet,0).item >= 3) {
var %x 1
while ($hget(Botnet,%x).item) {
dll WhileFix.dll WhileFix .
gline $ifmatch - :Abuse - Botnets Flood!
hdel -w Botnet $ifmatch
inc %x
}
}
}
|
this code i need for bot if someone put many client connect |
|
| Back to top |
|
 |
SpiKe^^ Owner

Joined: 12 May 2006 Posts: 792 Location: Tennessee, USA
|
Posted: Sun Dec 09, 2012 5:13 pm Post subject: |
|
|
That's mIRC code, with the help of a dll file that's not there.... there is no ready available tcl code to pull that off with the eggdrop and tcl.
I'm now working on an eggdrop clone checker script myself, the one I posted the link to has some ugly/questionable code in it. Hope to have it ready in a day or so.
Did you even look at or try the script from from the archive?? An eggdrop tcl script to do channel clone checking will be much larger than that few line mirc script you posted. _________________ SpiKe^^
Get BogusTrivia 2.06.4.7 at www.mytclscripts.com
or visit the New Tcl Acrhive at www.tclarchive.org
.
Last edited by SpiKe^^ on Sun Dec 09, 2012 5:39 pm; edited 1 time in total |
|
| Back to top |
|
 |
darksis Voice
Joined: 04 Aug 2012 Posts: 16
|
Posted: Sun Dec 09, 2012 5:32 pm Post subject: |
|
|
| ok thanks for help |
|
| Back to top |
|
 |
SpiKe^^ Owner

Joined: 12 May 2006 Posts: 792 Location: Tennessee, USA
|
Posted: Wed Dec 12, 2012 9:07 pm Post subject: |
|
|
Here's the first try, see if it runs:) I have not tested on it any yet.
| Code: |
# On-Join Clone Checker Version 0.1 #
# author: SpiKe^^ #
# e-mail: spike<at>mytclscripts<dot>com #
# webpage: http://mytclscripts.com/ #
# this script requires EGGDROP v1.6.17 or higher #
# this script requires TCL v8.4 or higher #
########################################################################
# This file is loosely based on: Clone Scanner v5.90.b [clonescan.tcl] #
# Build date: 23rd July 2007 #
# Copyright © 1998-2007 awyeah (awesomeawyeah@gmail.com) #
# and carries all the same Copyright terms as that script. #
########################################################################
# #
# Copyright (C) 2012 SpiKe^^ #
# #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation, either version 3 of the License, or #
# (at your option) any later version. #
# #
# This program is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU General Public License for more details. #
# #
# For a complete copy of the GNU General Public License go to: #
# http://www.gnu.org/copyleft/gpl.html #
# #
########################################################################
############################### Begin Settings ##############################
# Set the channel(s) to monitor on-join for clones. #
# Set this to {*} to monitor all channels the bot is on.
# Set this to {} to disable this script.
set ojClone(join-chan) {#yourchannel #anotherchannel}
# Set the number of clones that would trigger this script. #
# Punish the host when the number of clones equal or excede this number.
# Clones are detected & punished by this format: *!*@host.domain.com
set ojClone(punish-at) "4" ;# (Valid Settings: any number 2 or more)
# Set the 'number of Seconds' to delay the clone check after a join. #
# In a mass join, this may keep the checker from having to run for each join.
# May also allow time for users to gain ops/voice for the (xmpt-ops) option.
set ojClone(delay-time) "6" ;# (Valid Settings: a number 3 to 30)
########################### Exempt Users Settings ###########################
# Set user file flags to exempt from clone checking. ( global|channel ) #
# Set this "" to disable user file flag checking.
set ojClone(xmpt-flags) "bmn|mn"
# If (xmpt-flags) above is on: exempt all clones from the exempt users host ? #
# 0 = no, just exempt the nick with matching flags & count clones from host.
# 1 = yes, exempt all clones from any user that matches any of these flags.
set ojClone(xmptf-all) "1" ;# (Valid Settings: 0 or 1)
# Exempt users with op and/or voice in the channel from clone checking ?? #
# Set this to "0" to not exempt users for ops or voice in the channel.
# 1 = exempt ops only | 2 = exempt voice only | 3 = exempt ops and voice
set ojClone(xmpt-ops) "3" ;# (Valid Settings: a number 0 to 3)
# If (xmpt-ops) above is on: exempt all clones from ops/voice in channel ? #
# 0 = no, just exempt the nick with ops/voice & count other clones from host.
# 1 = yes, exempt all clones from any user that has ops/voice in the channel.
set ojClone(xmpto-all) "1" ;# (Valid Settings: 0 or 1)
# Set specific host masks to exempt from clone checking. #
########## Host Mask Tips ##########
# Put each exempt host mask on its own line.
# Mask format: nick!ident@host.com :or: nick!ident@123.45.67.89
# Allows wildcards: '*' matches 0 or more chars, '?' matches any single char.
####### Exempt Hosts Example #######
# set ojClone(xmpt-hosts) {
# *!*@DALnet
# *!*@*.users.quakenet.org
# *!*@123.45.67.*
# }
##########
# Leave this empty to disable exempt host mask checking. #
set ojClone(xmpt-hosts) {
} ;## end of exempt hosts ##
######################### Excess Clones Punishments #########################
# Do you want to set a channel ban for affected host ?? (0=no | 1=yes) #
set ojClone(do-ban) "0" ;# (Valid Settings: 0 or 1)
# If (do-ban) above is on: set the 'number of Minutes' for the ban. #
# Set this "0" to allow the irc server to expire the ban (usually 60 min).
set ojClone(ban-time) "1" ;# (Valid Settings: a number 0 to 60)
# Do you want to kick all the affected nicks ?? (0=no | 1=yes) #
set ojClone(do-kick) "0" ;# (Valid Settings: 0 or 1)
# If (do-kick) above is on: set the 'reason' to use with the kick. #
set ojClone(kick-resn) {Excess Clones!}
##################### Advanced Excess Clones Punishment #####################
# If the bot has IRC Operator status, the script can KLINE/GLINE the host. #
# Do you want to KLINE or GLINE the affected host ?? (0=no | 1=yes)
set ojClone(do-kline) "1" ;# (Valid Settings: 0 or 1)
# If (do-kline) above is on: set the KLINE/GLINE command used on your server. #
# For example, some ircd servers use: kline %mask %time %reason
# Others use: kline %time %mask %reason :or just: kline %mask %reason
# NOTES: You MUST use the correct command(s) for the ircd server the bot is on!
# : Some ircd commands don't allow for a removal time, If you want this
# script to remove the kline/etc., set the removal command below.
######### Variable Substitutions #########
# %mask = the klined/glined mask.
# %time = the kline/gline time.
# %reason = the kline/gline reason.
########## Some Other Examples ##########
# GLINE +%mask %time %reason
# GLINE %mask %time :%reason
# ZLINE +%mask %time %reason
# TKLINE %mask %time :%reason
##########
set ojClone(kline-cmd) "gline +%mask %time :%reason"
# Set the Reason text to use for the %reason code in (kline-cmd) above. #
set ojClone(kl-reason) {Excess Clones!}
# If (do-kline) above is on: set 'number of Minutes' for the KLINE/GLINE. #
# A time of "0" for the KLINE or GLINE makes it permanent (Never Expires).
# Note: script will convert to seconds, if needed, for %time replacement.
set ojClone(kline-time) "60" ;# (Valid Settings: any number 0 or more)
# If (do-kline) is on: does ircd use minutes or seconds for K/GLINE time ? #
# 1 = Minutes: script uses (kline-time) as is, for %time in (kline-cmd).
# 2 = Seconds: script converts (kline-time) to seconds, for %time substitution.
set ojClone(kl-min-sec) "2" ;# (Valid Settings: 1 or 2)
# If (do-kline) is on: do you want this script to remove the KLINE/GLINE ? #
# Leave this empty if (kline-cmd) above uses the %time code in the command.
# Leave this empty if KLINE/GLINE is permanent or you will remove yourself.
# Or set this to the remove command the script should use after (kline-time).
########## Some Remove Examples ##########
# KLINE -%mask
# UNKLINE %mask
# GLINE -%mask
# ZLINE -%mask
##########
set ojClone(kl-rem-cmd) ""
############################## End Of Settings #############################
#### End Settings #### End Settings #### End Settings #### End Settings ####
set ojClone(ver) 0.1
set ojClone(join-chan) [string trim $ojClone(join-chan)]
if {$ojClone(join-chan) eq ""} {
proc ojccUnload {} { global ojClone
catch {unbind join - * ojccOnJoin}
foreach {name valu} [array get ojClone #*] { catch {killutimer $valu} }
catch {rename ojccOnJoin ""}
catch {rename ojccDoCheck ""}
putlog "On-Join Clone Checker Ver. $ojClone(ver) by SpiKe^^ is Disabled."
unset ojClone ; return
}
ojccUnload ; rename ojccUnload "" ; return
}
if {$ojClone(join-chan) ne "*"} {
set ojClone(join-chan) [split [string tolower $ojClone(join-chan)]]
} else { set ojClone(join-chan) [split [string tolower [join [channels]]]] }
set ojClone(ban-time) [expr {$ojClone(ban-time)*60}]
if {![string match *%mask* $ojClone(kline-cmd)]} { set ojClone(do-kline) 0 }
if {$ojClone(do-kline)=="1"} {
set ojClone(kline-time) [expr {$ojClone(kline-time)*60}]
if {[string match *%time* $ojClone(kline-cmd)]} {
if {$ojClone(kl-min-sec)=="1"} {
set ojClone(kline-time) [expr {$ojClone(kline-time)/60}]
}
set ojClone(kl-rem-cmd) ""
}
}
set ojClone(xmpt-flags) [string trim $ojClone(xmpt-flags)]
set ojClone(xmpt-hosts) [string trim $ojClone(xmpt-hosts)]
set ojClone(xmpt-hosts) [split [string tolower $ojClone(xmpt-hosts)] "\n"]
if {![string is digit -strict $ojClone(xmpt-ops)] || $ojClone(xmpt-ops)>"3"} {
set ojClone(xmpt-ops) 3
}
bind join - * ojccOnJoin
proc ojccOnJoin {nk uh hn ch} { set ch [string tolower $ch]
if {[isbotnick $nk]} { return }
if {[lsearch -exact $::ojClone(join-chan) $ch]=="-1"} { return }
if {$hn ne "*" && $::ojClone(xmpt-flags) ne ""} {
if {[matchattr $hn $::ojClone(xmpt-flags) $ch]} { return }
}
if {[llength $::ojClone(xmpt-hosts)]>"0"} {
foreach host $::ojClone(xmpt-hosts) {
if {$host ne "" && [string match -nocase $host $nk!$uh]} { return }
}
}
if {![info exists ::ojClone($ch)]} {
set ::ojClone($ch) [utimer $::ojClone(delay-time) [list ojccDoCheck $ch]]
}
return
}
proc ojccDoCheck {ch} { global ojClone
unset ojClone($ch)
if {![botonchan $ch]} { return }
set chanls [chanlist $ch]
if {[lsearch -exact $ojClone(join-chan) $ch]=="-1"} { return }
if {[llength $chanls]<[expr {$ojClone(punish-at)+1}]} { return }
set xf $ojClone(xmpt-flags) ; set xfa ojClone(xmptf-all)
set xo $ojClone(xmpt-ops) ; set xoa ojClone(xmpto-all)
set userls [list] ; set xmptls $ojClone(xmpt-hosts)
foreach nk $chanls {
if {[isbotnick $nk]} { continue }
set hn [nick2hand $nk $ch] ; if {$hn eq ""} { continue }
set uh [split [string tolower [getchanhost $nk $ch]] @]
set hs [lindex $uh 1] ; set rn [lindex $uh 0]
set xbyf 0 ; set xbyo 0
if {$xf ne "" && $hn ne "*" && [matchattr $hn $xf $ch]} { set xbyf 1 }
if {($xo == "1" || $xo == "3") && [isop $nk $ch]} { set xbyo 1
} elseif {$xo > "1" && [isvoice $nk $ch]} { set xbyo 1 }
set addtouser 1 ; set addtoxmpt 0
if {$xbyf=="1"} {
if {$xfa=="0"} { set addtouser 0 } else { set addtoxmpt 1 }
}
if {$xbyo=="1"} {
if {$xoa=="0"} { set addtouser 0 } else { set addtoxmpt 1 }
}
if {$addtouser=="1" && $addtoxmpt=="1"} { set addtouser 0 }
if {$addtouser=="1"} { lappend userls $nk $rn $hs }
if {$addtoxmpt=="1"} { lappend xmptls *!*@$hs }
}
if {[llength $userls]<[expr {$ojClone(punish-at)*3}]} { return }
unset chanls
if {[llength $xmptls]>"0"} {
set xmptls [lsort -unique $xmptls] ; set tmpls [list]
foreach {nk rn hs} $userls {
set usr [string tolower $nk]!$rn@$hs ; set isx 0
foreach xmask $xmptls {
if {[string match $xmask $usr]} { set isx 1 ; break }
}
if {$isx=="0"} { lappend tmpls $nk $rn $hs }
}
set userls $tmpls ; unset tmpls xmptls
if {[llength $userls]<[expr {$ojClone(punish-at)*3}]} { return }
}
set chostls [list]
foreach {nk rn hs} $userls {
if {[info exists count($hs)]} { incr count($hs)
if {$count($hs)==$ojClone(punish-at)} { lappend chostls *@$hs }
} else { set count($hs) 1 }
}
if {[llength $chostls]=="0"} { return }
set clonels [list]
foreach {nk rn hs} $userls {
if {$count($hs)>=$ojClone(punish-at)} { lappend clonels $nk }
}
unset count userls
if {$ojClone(do-kline)=="1"} {
lappend map %time $ojClone(kline-time) %reason $ojClone(kl-reason)
set ojClone(kline-cmd) [string map $map $ojClone(kline-cmd)]
foreach hs $chostls {
putquick [string map [list %mask $hs] $ojClone(kline-cmd)]
}
if {[string match *%mask* $ojClone(kl-rem-cmd)]} {
utimer $ojClone(kline-time) [list ojccRemove kln $chostls $ch]
}
}
if {![botisop $ch] && ![botishalfop $ch]} { return }
if {$ojClone(do-ban)=="1"} { set bhostls [list]
foreach hs $chostls { set hs *!$hs
if {![ischanban $hs $ch]} {
pushmode $ch +b $hs ; lappend bhostls $hs
}
}
if {[llength $bhostls]>"0"} { flushmode $ch
if {$ojClone(ban-time)>"0"} {
utimer $ojClone(ban-time) [list ojccRemove ban $bhostls $ch]
}
}
}
if {$ojClone(do-kick)=="1"} { set knickls [list]
foreach nk $clonels {
if {[onchan $nk $ch]} { lappend knickls $nk }
}
if {[llength $knickls]>"0"} {
if {$ojClone(kick-resn) eq ""} {
set ojClone(kick-resn) "On-Join Clone Checker by SpiKe^^"
}
putkick $ch [join $knickls ,] $ojClone(kick-resn)
}
}
return
}
proc ojccRemove {wat rls ch} {
if {$wat eq "kln"} {
foreach hs $rls {
putserv [string map [list %mask $hs] $::ojClone(kl-rem-cmd)]
}
return
}
if {![botonchan $ch]} { return }
if {![botisop $ch] && ![botishalfop $ch]} { return }
foreach hs $rls {
if {![ischanban $hs $ch]} { pushmode $ch -b $hs }
}
return
}
putlog "On-Join Clone Checker ver. $ojClone(ver) by SpiKe^^ loaded."
|
GoodLuck, Let Me Know. _________________ SpiKe^^
Get BogusTrivia 2.06.4.7 at www.mytclscripts.com
or visit the New Tcl Acrhive at www.tclarchive.org
. |
|
| Back to top |
|
 |
|