Skip to content

Instantly share code, notes, and snippets.

@xatlas
Created January 12, 2020 20:29
Show Gist options
  • Save xatlas/55cffc332e9f6c4174803d5adac2ceea to your computer and use it in GitHub Desktop.
Save xatlas/55cffc332e9f6c4174803d5adac2ceea to your computer and use it in GitHub Desktop.
Script que pone el modo +W cuando se recibe un notice del servidor por entrada masiva de usuarios
set pf_warn "This channel has been closed"
set pf_host "chathispano.com"
set pf_chan "#canal"
bind notc -|- * pf_parseNotice
proc pf_parseNotice {n uh h t d} {
global pf_warn pf_host pf_chan
set w [string first $pf_warn $t]
set s [string first $pf_host $uh]
if {$w != -1 && $s != -1 && $d == $pf_chan} {
putlog "Posible ataque en $d, cambiando modos..."
putquick "MODE $d :+W"
putserv "PRIVMSG #canal_ops :\[PreventFlood\] Posible inicio de ataque, colocado modo +W"
}
}
putlog "Script de prevención de flood activado"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment