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.

Need help on how to implement some things

Old posts that have not been replied to for several years.
Locked
User avatar
CoMMy
Halfop
Posts: 99
Joined: Thu Jul 24, 2003 1:03 am
Location: Cyprus

Need help on how to implement some things

Post by CoMMy »

Hi guys,

I need to know the way of how to do this.

When somebody in a chan does a text flood of 3 lines first kick him. If he text floods 3 lines again then ban him. If the text flood is big ie. lots of lines, then set the channel to +im.

When there is a join-part flood at the first 2 join parts kick the person. The next 2 join parts he makes ban him.

When a lot of people join the chan very fast (over 7 people) then set the chan to +i. If they also do a text flood then ban all the joiners.

When a person uses colours kick him and if he does it again ban him. If he uses a lot of colours kick/ban him immediately.

When a person changes his nick 4 times (time irrelevant) ban him.

The same goes for ctcp and notice floods. first kick and then ban.

Can you tell me how to implement the "First kick him and then ban him if he does it again" part?
I dont know how to save the information to use for later use.
Please demonstrate with a rough code if you can.

Appreciate your help.
(c) CoMMy (c)
Resistance is Futile!!
We Are The Borg!!
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

Alot of your answers are already present.

For this you can take a look at slennox's repeat kick tcl.
That script detects if a *!*@host repeats then punishes the
user accordingly, then it records the host in a variable list and then
if another repeat flood is detected within the given amount of
time by that *!*@host matches the previously banned host
then the user can be punished accordingly.

That is a good script to serve this purpose.
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

slennox's Tcl Scripts
Also look at sentinel.tcl v2.70. :)
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
User avatar
CoMMy
Halfop
Posts: 99
Joined: Thu Jul 24, 2003 1:03 am
Location: Cyprus

Post by CoMMy »

Hey guys,

Thanks for the scripts suggestions. :mrgreen:
Well I Tried Implementing Them To My Script Using Similar Code But I'm Having Problems.

This Is Part Of Script:

Code: Select all

#----Text Flood Starts------
#NOTE: TO SET THIS ON JUST SET THE CHANNEL TO +textflood

#Kick On How Many Lines?
set txt_kick 3

#Kick Reason?
set txt_kick_reason "text flood detected, stin epomeni exei ban."

#Kick-Ban On How Many Lines?
set txt_ban 6

#Ban Reason?
set txt_ban_reason "sto ipa ego gidi-text flood ban 10min"

#Ban Time? (MINUTES)
set txt_ban_time 10

#Set Here The Expiry Time For The Lines. (SECONDS)
set txt_time 60

#----Text Flood Ends------



#----Strong Text Flood Starts------
#NOTE: TO SET THIS ON JUST SET THE CHANNEL TO +strongtextflood

#Set Here The (Lines:In How Many Seconds) To Trigger The Specific Mode Change.
set txt_flood_time 5:4

#Set Here The Modes To Set In The Channel.
set txt_flood_mode "mi"

#Set Here The Time To Remove The +im (MINUTES)
set txt_flood_mode_time 10

#----Strong Text Flood Ends------






set txt_flood_time [split $txt_flood_time ":"]

#Load Vars
proc loadvars {type} {
global textcount
set textcount 0
}

#Binds
bind evnt - connect-server loadvars
bind pubm - "*" txt_flood

#Flags
setudef flag textflood
setudef flag strongtextflood

#Text Flood Starts
proc txt_flood {nick host handle chan text} {
global txt_count textcount userprotect userchanprotect txt_kick txt_kick_reason txt_ban txt_ban_reason txt_ban_time txt_time txt_flood_time
set host [string tolower $host]
set chan [string tolower $chan]
set text [string tolower $text]
if {![channel get $chan textflood]} {return 0}
if {[isbotnick $nick]} {return 0}
if {[matchattr $handle $userprotect]} {return 0}
if {[matchattr $handle &${userchanprotect} $chan]} {return 0}

if {[channel get $chan strongtextflood]} {
incr textcount
if {![string match "*txtcount*" "[utimers]"]} {
utimer [lindex $txt_flood_time 1] [list txt_check "$chan"] }}

if {![info exists txt_count($host:$chan)]} {
set txt_count($host:$chan) "0"
utimer $txt_time [list unset txt_count($host:$chan)] }

incr txt_count($host:$chan)

if {$txt_count($host:$chan) == "$txt_ban"} {
if {[botisop $chan] && [onchan $nick $chan]} {
set banmask *!*[string tolower [string range $host [string first "@" $host] end]]
putquick "MODE $chan +b $banmask" -next
putquick "KICK $chan $nick :$txt_ban_reason" -next
newchanban $chan $banmask "Txt Flood" $txt_ban_reason $txt_ban_time sticky
unset txt_count($host:$chan) }}

if {[info exists txt_count($host:$chan)]} {
if {$txt_count($host:$chan) == "$txt_kick"} {
if {[botisop $chan] && [onchan $nick $chan]} {
putquick "KICK $chan $nick :$txt_kick_reason" -next }}}

return 1 }

#Text Flood Check To Set +im
proc txt_check {chan} {
global textcount txt_flood_time txt_flood_mode_time txt_flood_mode
if {$textcount == [lindex $txt_flood_time 0]} {
putquick "MODE $chan +$txt_flood_mode" -next
channel set $chan chanmode +$txt_flood_mode
utimer $txt_flood_mode_time [list channel set $chan chanmode -$txt_flood_mode] 
utimer $txt_flood_mode_time [list putquick "MODE $chan -$txt_flood_mode" -next] }
set textcount "0" }
#Text Flood Ends
The Problem Is The It doesn't Set The Channel to +im When There Are Over 5lines in 4seconds as specified in the configuration. :-?
Everything else works fine.

Please help me. Thanks :)
(c) CoMMy (c)
Resistance is Futile!!
We Are The Borg!!
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

Make a seperate procedure to enforce the mode locks and then to remove them after the time you choose.

Make sure you use getchan mode to check already if the modes
aren't in place as some ops and bots already enforce modes, and
do the same when removing the modes, so it doesnt do a mode flood.
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
User avatar
CoMMy
Halfop
Posts: 99
Joined: Thu Jul 24, 2003 1:03 am
Location: Cyprus

Post by CoMMy »

Yea, i understand what you say. But do you know of an accurate way of detecting how many lines in the specified seconds?

Thanks :)
(c) CoMMy (c)
Resistance is Futile!!
We Are The Borg!!
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

Na I'm not that advanced yet.
You might want to try other scripts which do the same thing

lines:seconds

Some of slennox's tcls have those settings.
also mc_8's, banflooders, repeat and etc.

Or if you want you can use the bots chan-flood
setting which is better than tcls, it is more effective
as it is coded directly in C++.
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
d
dollar
Op
Posts: 178
Joined: Tue Oct 28, 2003 3:47 pm
Location: Netherlands

Post by dollar »

awyeah wrote:Or if you want you can use the bots chan-flood
setting which is better than tcls, it is more effective
as it is coded directly in C++.
Eggdrop is C, afaik. :P
dollar (or something similar) at:
#eggdrop / #tcl - undernet
#egghelp / #tcl / #eggtcl - efnet
#eggdrop.support / #tcl - quakenet
#eggdrop - ircnet
User avatar
CoMMy
Halfop
Posts: 99
Joined: Thu Jul 24, 2003 1:03 am
Location: Cyprus

Post by CoMMy »

I made it work :):):):):)

So happy :P

Now im trying to make the join/part flood protecion proc !!!!

If you have any ideas how to start with this please tell me :)

(btw. When the script is finished i'll upload it with your help credits!!)

Thanks
(c) CoMMy (c)
Resistance is Futile!!
We Are The Borg!!
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

Use clonepro by algol its the best for dealing
with join and part floods.

I've modified mine to work accordingly to that
as well as lock the channel and unlock it and etc.
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
User avatar
CoMMy
Halfop
Posts: 99
Joined: Thu Jul 24, 2003 1:03 am
Location: Cyprus

Post by CoMMy »

Tcl was removed from the scripts archive and i cant seem to find it elsewhere.

btw. i think it had a vulnurability ?
(c) CoMMy (c)
Resistance is Futile!!
We Are The Borg!!
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

Yes it had, but I fixed it not a big deal.

If you need it let me know.
Contact me through email or my msn
messenger 'awyeah@awyeah.org' (ID).
I will send it to ya.
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
User avatar
CoMMy
Halfop
Posts: 99
Joined: Thu Jul 24, 2003 1:03 am
Location: Cyprus

Post by CoMMy »

Thanks a lot but i will not need it anymore :wink: !!

I managed to write a working code after so many tries and tests.
Now it works :)
(c) CoMMy (c)
Resistance is Futile!!
We Are The Borg!!
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

good 4 yah ;)
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
Locked