|
|
|
Joined: Nov 2007
Posts: 10
Pikka bird
|
OP
Pikka bird
Joined: Nov 2007
Posts: 10 |
I find 1 script earlier has a virus in it. So i dare not try any unknown scripts again. This is a channel protection script i found, I set it to max 3 chat per min, but after someone spam in the channel more 3 per min. This kick and ban that person. What im finding is after someone talk more then 3 time per min in that channel, the bot temp ban that person for 5min for volating the rule. Is it possible for me? This is a copy of the script. Any people here who has that script can share with me? on 400:text:*flood*:#: {
if ($1 == %c $+ global_flood) {
if ($level($mask($address($nick,2),2)) < 500) { .msg $nick Only the bot owner can set this flag. | halt }
if ($2 == $null) { .msg $nick Command incomplete. Syntax: %c $+ global_flood <on|off>. | halt }
if ($2 !== $null) {
if ($2 == on) { writeini -n ini\globals.ini Protections Flood On | .msg $nick Global Flood Protection now set to ON. | .enable #flood | halt }
if ($2 == off) { writeini -n ini\globals.ini Protections Flood Off | .msg $nick Global Flood Protection now set to OFF. | .disable #flood | halt }
else { .msg $nick Incorrect parameter. Available parameters: ON/OFF. | halt }
}
}
if ($1 == %c $+ channel_flood) {
if ($2 == $null) { .msg $nick Command incomplete. Syntax: %c $+ channel_flood <on|off>. | halt }
if ($2 !== $null) {
if (($readini(ini\globals.ini, Protections, Flood) == off) || ($readini(ini\globals.ini, Protections, Flood) == $null)) { .msg $nick Global Flood Protection not enabled. Contact the bot owner to enable it. | halt }
if ($2 == on) { writeini -n ini\channels.ini $chan Flood On | .msg $nick Flood protection for $chan set to ON. | halt }
if ($2 == off) { writeini -n ini\channels.ini $chan Flood Off | .msg $nick Flood protection for $chan set to OFF. | halt }
else { .msg $nick Incorrect parameter. Available parameters: ON/OFF. | halt }
}
}
}
on 400:text:*flood*:?: {
if ($1 == global_flood) {
if ($level($mask($address($nick,2),2)) < 500) { .msg $nick Only the bot owner can set this flag. | halt }
if ($2 == $null) { .msg $nick Command incomplete. Syntax: /msg $me global_flood <on|off>. | halt }
if ($2 !== $null) {
if ($2 == on) { writeini -n ini\globals.ini Protections Flood On | .msg $nick Global Flood Protection now set to ON. | .enable #flood | halt }
if ($2 == off) { writeini -n ini\globals.ini Protections Flood Off | .msg $nick Global Flood Protection now set to OFF. | .disable #flood | halt }
else { .msg $nick Incorrect parameter. Available parameters: ON/OFF. | halt }
}
}
if ($1 == channel_flood) {
if ($2 == $null) { .msg $nick Command incomplete. Syntax: /msg $me channel_flood <#channel> <on|off>. | halt }
if ($2 !== $null) && ($3 !== $null) {
if (($readini(ini\globals.ini, Protections, Flood) == off) || ($readini(ini\globals.ini, Protections, Flood) == $null)) { .msg $nick Global Flood Protection not enabled. Contact the bot owner to enable it. | halt }
if ($3 == on) { writeini -n ini\channels.ini $2 Flood On | .msg $nick Flood protection for $2 set to ON. | halt }
if ($3 == off) { writeini -n ini\channels.ini $2 Flood Off | .msg $nick Flood protection for $2 set to OFF. | halt }
else { .msg $nick Incorrect parameter. Available parameters: ON/OFF. | halt }
}
}
}
#flood on
on @+1!:text:*:#: {
if ($nick isop $chan) { halt }
inc %flood.nick [ $+ [ $nick ] $+ [ $chan ] ]
.timer 1 %flood.channel.time /unset %flood.nick [ $+ [ $nick ] $+ [ $chan ] ]
if (%flood.nick [ $+ [ $nick ] $+ [ $chan ] ] > %flood.channel.lines) {
if (($readini(ini\globals.ini, Protections, Flood) == on) && ($readini(ini\channels.ini, $chan, Flood) == on)) { $iif(%kb.method != 2, mode $chan +btn $mask($address($nick,2),2)) | kick $chan $nick $cl Flood | unset %flood.nick [ $+ [ $nick ] ] | halt }
}
else { halt }
}
on @+1!:action:*:#: {
if ($nick isop $chan) { halt }
inc %flood.nick [ $+ [ $nick ] $+ [ $chan ]
.timer 1 %flood.channel.time /unset %flood.nick [ $+ [ $nick ] $+ [ $chan ]
if (%flood.nick [ $+ [ $nick ] $+ [ $chan ] > %flood.channel.lines) {
if (($readini(ini\globals.ini, Protections, Flood) == on) && ($readini(ini\channels.ini, $chan, Flood) == on)) { $iif(%kb.method != 2, mode $chan +btn $mask($address($nick,2),2)) | kick $chan $nick $cl Flood | unset %flood.nick [ $+ [ $nick ] ] | halt }
}
else { halt }
}
#flood end
on @1:deop:#: {
if ($nick == $me) { halt }
if ($level($mask($address($opnick,2),2)) > $level($mask($address($nick,2),2))) { mode $chan -o+o $nick $opnick | .msg $nick Illegal deop. }
}
;@@@ Self protections @@@
on +1!:Text:*:?: {
if ($readini(ini\globals.ini, Protections, SFlood) == On) {
inc %flood.nick [ $+ [ $nick ]
.timer 1 %flood.self.time /unset %flood.nick [ $+ [ $nick ]
if (%flood.nick [ $+ [ $nick ] > %flood.self.num) {
.ignore -pnitkdu $+ %flood.self.ignore $nick 2
}
}
}
on +1!:notice:*:?: {
if ($readini(ini\globals.ini, Protections, SNotice) == On) {
inc %flood.nickN [ $+ [ $nick ]
.timer 1 %notice.self.time /unset %flood.nickN [ $+ [ $nick ]
if (%flood.nickN [ $+ [ $nick ] > %notice.self.num) {
.ignore -pnitkdu $+ %notice.self.ignore $nick 2
}
}
}
ctcp +1!:*:?: {
if ($readini(ini\globals.ini, Protections, SCtcp) == On) {
inc %flood.nickC [ $+ [ $nick ]
.timer 1 %CTCP.self.time /unset %flood.nickC [ $+ [ $nick ]
if (%flood.nickC [ $+ [ $nick ] > %CTCP.self.num) {
.ignore -pnitkdu $+ %CTCP.self.ignore $nick 2
}
}
}
on +1!:invite:*: {
if ($readini(ini\globals.ini, Protections, SInvite) == On) {
inc %flood.nickI [ $+ [ $nick ]
.timer 1 %invite.self.time /unset %flood.nickI [ $+ [ $nick ]
if (%flood.nickI [ $+ [ $nick ] > %invite.self.num) {
.ignore -pnitkdu $+ %invite.self.ignore $nick 2
}
}
}
|
|
|
|
Joined: Nov 2007
Posts: 10
Pikka bird
|
OP
Pikka bird
Joined: Nov 2007
Posts: 10 |
Is there no one could help me ?
|
|
|
|
Joined: Feb 2003
Posts: 3,432
Hoopy frood
|
Hoopy frood
Joined: Feb 2003
Posts: 3,432 |
you looking for a script that kick on repeats ?
on @*:text:*:#: {
if ( %rep_tid == $null ) { set %rep_tid 60 }
if ( %rep_ban == $null ) { set %rep_ban 120 }
if ( %rep_antal == $null ) { set %rep_antal 3 }
if ($nick == null) { return }
var %rp.repeats = rp. $+ $nick $+ . $+ $chan
var %rp.text = rp. $+ $nick $+ . $+ $chan $+ .text
if ( % [ $+ [ %rp.repeats ] ] == $null ) {
set -u [ $+ [ %rep_tid ] ] % [ $+ [ %rp.repeats ] ] 1
set -u [ $+ [ %rep_tid ] ] % [ $+ [ %rp.text ] ] $1-
}
elseif ( % [ $+ [ %rp.text ] ] == $1- ) {
inc % [ $+ [ %rp.repeats ] ]
}
elseif ( % [ $+ [ %rp.text ] ] != $1- ) {
set -u [ $+ [ %rep_tid ] ] % [ $+ [ %rp.text ] ] $1-
set -u [ $+ [ %rep_tid ] ] % [ $+ [ %rp.repeats ] ] 1
}
if ( % [ $+ [ %rp.repeats ] ] >= %rep_antal ) {
kick # $nick % [ $+ [ %rp.repeats ] ] repeats in %rep_tid second(s) Banned for $calc(%rep_ban / 60)) $+ minute(s)
ban -u $+ %rep_ban # $nick %bs
unset %rp. $+ $nick $+ . $+ $chan
unset %rp. $+ $nick $+ . $+ $chan $+ . $+ text
}
}
set %rep_tid xx <- repeat rate. default is set to 1 minute set %rep_ban xx <- set how long the script should ban the user. default 2 minutes. set %rep_antal xx <- set how many repeats a user is allowed to do. everything is calced in seconds, so you need to use the value 60 for 1 minute .. 120 for two minutes and so on. And the script will ban for repeats, if you dont want that, coment out the line: ban -u $+ %rep_ban # $nick 3 just add a ; infront of it and ur done, but then you maybe want to change the kick message. and the code goes in to a clean remote file, ALT + R in your mirc, then create a new file and paste the code in to it. If you want to be able to enable/disable it, then use a group for it: #repeatkick on code here #repeatkick end enable it with /enable #repeatkick or disable it with: /disable #repeatkick
Last edited by sparta; 07/11/07 08:45 PM.
if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
|
|
|
|
Joined: Aug 2007
Posts: 334
Pan-dimensional mouse
|
Pan-dimensional mouse
Joined: Aug 2007
Posts: 334 |
regex works well (you can make it like 1-3 lines long)
This is not the signature you are looking for
|
|
|
|
Joined: Feb 2003
Posts: 3,432
Hoopy frood
|
Hoopy frood
Joined: Feb 2003
Posts: 3,432 |
regex works well (you can make it like 1-3 lines long) why dont you make one to him then?
if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
|
|
|
|
Joined: Nov 2007
Posts: 10
Pikka bird
|
OP
Pikka bird
Joined: Nov 2007
Posts: 10 |
Hi this works well, but can i activate this script only in a specific channel?
Last edited by Flexible; 27/11/07 07:36 AM.
|
|
|
|
Joined: Feb 2003
Posts: 3,432
Hoopy frood
|
Hoopy frood
Joined: Feb 2003
Posts: 3,432 |
Replace the part: on @*:text:*:#: { with this one: on @*:text:*:#your_channel_here: {
if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
|
|
|
|
Joined: Nov 2007
Posts: 10
Pikka bird
|
OP
Pikka bird
Joined: Nov 2007
Posts: 10 |
Hey, thanks it work now. i can activate it in a channel i want. Hi, after i changed the default ban time and max spam to 6spam/1min, it still do not work. [Look at the bolded words] on @*:text:*:#: { if ( %rep_tid == $null ) { set %rep_tid 60 } if ( %rep_ban == $null ) { set %rep_ban 60 } if ( %rep_antal == $null ) { set %rep_antal 6 } if ($nick == null) { return } var %rp.repeats = rp. $+ $nick $+ . $+ $chan var %rp.text = rp. $+ $nick $+ . $+ $chan $+ .text if ( % [ $+ [ %rp.repeats ] ] == $null ) { set -u [ $+ [ %rep_tid ] ] % [ $+ [ %rp.repeats ] ] 1 set -u [ $+ [ %rep_tid ] ] % [ $+ [ %rp.text ] ] $1- } elseif ( % [ $+ [ %rp.text ] ] == $1- ) { inc % [ $+ [ %rp.repeats ] ] } elseif ( % [ $+ [ %rp.text ] ] != $1- ) { set -u [ $+ [ %rep_tid ] ] % [ $+ [ %rp.text ] ] $1- set -u [ $+ [ %rep_tid ] ] % [ $+ [ %rp.repeats ] ] 1 } if ( % [ $+ [ %rp.repeats ] ] >= %rep_antal ) { .msg # 15,1[9,1 $nick 15]15,01[08 has been muted for 1Min for breaking the 5Spams/Min rule 15] ban -u $+ %rep_ban # $nick %bs unset %rp. $+ $nick $+ . $+ $chan unset %rp. $+ $nick $+ . $+ $chan $+ . $+ text } }
Last edited by Flexible; 27/11/07 09:06 AM.
|
|
|
|
Joined: Feb 2003
Posts: 3,432
Hoopy frood
|
Hoopy frood
Joined: Feb 2003
Posts: 3,432 |
if ( %rep_tid == $null ) { set %rep_tid 60 } if ( %rep_ban == $null ) { set %rep_ban 60 } if ( %rep_antal == $null ) { set %rep_antal 6 }
that part will only be set if it dosent have any settings since befor. so if u want to set it that way, then unset them first..
if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
|
|
|
|
Joined: Nov 2007
Posts: 10
Pikka bird
|
OP
Pikka bird
Joined: Nov 2007
Posts: 10 |
|
|
|
|
Joined: Feb 2003
Posts: 3,432
Hoopy frood
|
Hoopy frood
Joined: Feb 2003
Posts: 3,432 |
This goes in to your remote, edit the text how you want it, just made something fast.
menu @channel {
Repeat Kick
.During time:{ set %rep_tid $?="Enter time (in secs)" }
.Amount:{ set %rep_antal $?="How many?" }
.Ban time:{ set %rep_antal $?="Enter time (in secs)" }
.-
.Current:{ echo -a During time is set to: %rep_tid $+ . Amount is set to: %rep_antal $+ . And ban time is set to: %rep_antal $+ . }
.Unset:{ unset %rep_* }
}
if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
|
|
|
|
Joined: Nov 2007
Posts: 10
Pikka bird
|
OP
Pikka bird
Joined: Nov 2007
Posts: 10 |
hmm, actually i figured out, no need to unset actaully. I should nt edit at the remote but at the Variables. Now its done. png
|
|
|
|
Joined: Nov 2007
Posts: 10
Pikka bird
|
OP
Pikka bird
Joined: Nov 2007
Posts: 10 |
i have 1 more question. Can i change this repeat spam script to a Word ban script? Such as banning the person if he repeats a specific word then i set. Such as if i set AssHole as the specific word. And, <Person>ASSHOLE!!!
<Person>ASSHOLE!!!
<Person>ASSHOLE!!!
<Bot>[ Person ][ has been muted for 2Min for swearing repeatly ]
Last edited by Flexible; 27/11/07 09:41 AM.
|
|
|
|
Joined: Nov 2007
Posts: 10
Pikka bird
|
OP
Pikka bird
Joined: Nov 2007
Posts: 10 |
hmm how can i make this script to be protecting OPs and voice. So that OPs or voice wont get kb
|
|
|
|
Joined: Oct 2007
Posts: 92
Babel fish
|
Babel fish
Joined: Oct 2007
Posts: 92 |
if ($nick !isop $chan) && ($nick != isvo $chan) {
|
|
|
|
Joined: Dec 2002
Posts: 503
Fjord artisan
|
Fjord artisan
Joined: Dec 2002
Posts: 503 |
I think you're wanting !isvo, not != isvo
|
|
|
|
Joined: Feb 2003
Posts: 3,432
Hoopy frood
|
Hoopy frood
Joined: Feb 2003
Posts: 3,432 |
if (ASSHOLE isin $1-) {
or you can read it from a file:
if ( $read -l $+ $1- $qt($mircdir\textfile.txt) == $null ) { return }
something like that, untested tho.
if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
|
|
|
|
Joined: Nov 2006
Posts: 1,559
Hoopy frood
|
Hoopy frood
Joined: Nov 2006
Posts: 1,559 |
if ($nick !isop $chan) && ($nick != isvo $chan) { Besides the small typo, the most clear sollution to exclude ALL ops and voices (what about %halfops, &protecteds etc (if the ircd allows these modes)) would be imho: make the script evaluate the other way around: make it trigger only for regular users (that is: users without ANY mode prefix/channel privilegues) stop processing for non-regular users: if ($nick !isreg $chan) { return } or proceed if it's a regular user: if ($nick isreg $chan) { protection stuff }
|
|
|
|
Joined: Nov 2007
Posts: 10
Pikka bird
|
OP
Pikka bird
Joined: Nov 2007
Posts: 10 |
on @*:text:*:#: {
if ( %rep_tid1 == $null ) { set %rep_tid1 $60 }
if ( %rep_ban1 == $null ) { set %rep_ban1 $300 }
if ( %rep_antal1 == $null ) { set %rep_antal1 $4 }
if ($nick isop $chan) { halt }
if ($nick isvoice $chan) { halt }
if ($nick == null) { return }
var %rp.repeats = rp. $+ $nick $+ . $+ $chan
var %rp.text = rp. $+ $nick $+ . $+ $chan $+ .text
if ( % [ $+ [ %rp.repeats ] ] == $null ) {
set -u [ $+ [ %rep_tid1 ] ] % [ $+ [ %rp.repeats ] ] 1
set -u [ $+ [ %rep_tid1 ] ] % [ $+ [ %rp.text ] ] $1-
}
elseif ( % [ $+ [ %rp.text ] ] == $1- ) {
inc % [ $+ [ %rp.repeats ] ]
inc -u10 $+(%,sw,$nick) 1
}
elseif ( % [ $+ [ %rp.text ] ] != $1- ) {
set -u [ $+ [ %rep_tid1 ] ] % [ $+ [ %rp.text ] ] $1-
set -u [ $+ [ %rep_tid1 ] ] % [ $+ [ %rp.repeats ] ] 1
}
if ( % [ $+ [ %rp.repeats ] ] >= %rep_antal1 ) {
.msg # 15,1[9,1 $nick 15]15,01[08 has been muted for 5Min for breaking the 3Spams/Min rule 15]
ban -u $+ %rep_ban1 # $nick %bs
unset %rp. $+ $nick $+ . $+ $chan
unset %rp. $+ $nick $+ . $+ $chan $+ . $+ text
}
} From this script. How do i add the Word ban in like Spartar gave.
|
|
|
|
|
|
|
|