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.

how to match detect this kind of flood

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
G
Gulio
Halfop
Posts: 73
Joined: Sun Nov 01, 2020 11:53 am

how to match detect this kind of flood

Post by Gulio »

how to do it to match 2 letters and down for lines from 1 nick or multi nick host
text and action also when is match *.irccloud.com and *.mibbit.com to send ban on *!iden@*

Code: Select all

[16:31:38] <guest827> A
[16:31:40] <guest827> B
[16:31:42] <guest827> C
[16:31:45] <guest827> Ç
[16:31:47] <guest827> D
[16:31:52] <guest827> DH
[16:31:55] <guest827> E
[16:31:57] <guest827> Ë
this code is take it from Spike^^ code

Code: Select all

Line 44: NOTICE: Found constant "bflood" which is also a variable.

utimer $bflood(unsettime) [list array unset bflood $chan:$nick]

Code: Select all


set bflood(maxlength) 2
set bflood(unsettime) 5

bind pubm - * pubm:byteflood

proc pubm:byteflood {nick host hand chan text} {
	global bflood

	if {![botisop $chan] || [isop $nick $chan]} {  return 0  }
	if {[validuser $hand] && [matchattr $hand +bfmo|fmo $chan]} {  return 0  }

	set nick [string tolower $nick]
	set chan [string tolower $chan]

	set length [string length $text]
	set text  [lindex [split $text ":"] 0]

	if {[info exists bflood($chan:$nick)]} {  incr length $bflood($chan:$nick)  }

	if {($length > $bflood(maxlength))} {

		foreach user $text {

			if {![onchan $user $chan]} {
				putserv "NOTICE $nick $user is not on channel $chan"
			} else {

				if {[set chost [getchanhost $nick $chan]] ne ""} {
					switch -glob -- $chost {
						{*.irccloud.com} - {*.mibbit.com} {
							if {[isvoice $nick $chan]} {  pushmode $chan -v $nick  }
							set mask *![lindex [split $chost @] 0]@*
						}
						{default} {

							set mask [maskhost "$user!$chost" 2]
						}
					}
					array unset bflood $chan:$nick
					return 0
				}

				if {![info exists bflood($chan:$nick)]} {
					utimer $bflood(unsettime) [list array unset bflood $chan:$nick]
				}

				set bflood($chan:$nick) $length
				return 0
			}

		}
	}
}

Post Reply