|
Joined: Aug 2006
Posts: 44
Ameglian cow
|
OP
Ameglian cow
Joined: Aug 2006
Posts: 44 |
Yet another most likely very simple script request.
I need a script for ignoring a person. So when they flood the channel by using !/@ commands on a bot the bot will auto ignore them for 5 mins then take them off the ignore. Also, have it so it sends them a notice that they are ignored for 5 mins for command abuse.
Thank you again.
|
|
|
|
Joined: Mar 2005
Posts: 420
Fjord artisan
|
Fjord artisan
Joined: Mar 2005
Posts: 420 |
try this alias floodcheck {
var %fl.time = 10, %fl.lines = 3, %fl.ignore = 5
inc $iif(!$($+(%,flood,.,$1,.,$2),2),$+(-eu,%fl.time)) $+(%,flood,.,$1,.,$2)
if ( $($+(%,flood,.,$1,.,$2),2) >= %fl.lines ) .ignore $+(-u,$calc(%fl.ignore * 60)) $2
} Syntax: floodcheck $cid $nick Sample use for the alias: On *:TEXT:@test:#: {
floodcheck $cid $nick
msg $chan this is a test
} When the snippet detects the flood, it ignores the nick for 5 mins. Default flood value is 3 lines within 10 secs. Change the value in the variables to fit your needs.
|
|
|
|
Joined: Aug 2006
Posts: 44
Ameglian cow
|
OP
Ameglian cow
Joined: Aug 2006
Posts: 44 |
For some reason it doesnt seem to work...atleast for me.
|
|
|
|
Joined: Mar 2005
Posts: 420
Fjord artisan
|
Fjord artisan
Joined: Mar 2005
Posts: 420 |
The code works as I'm currently using it on my other scripts. How did you use it? Can you give a sample of your code?
|
|
|
|
Joined: Aug 2006
Posts: 44
Ameglian cow
|
OP
Ameglian cow
Joined: Aug 2006
Posts: 44 |
I didnt mod the one he posted I just tried that one. :|
|
|
|
|
Joined: Mar 2005
Posts: 420
Fjord artisan
|
Fjord artisan
Joined: Mar 2005
Posts: 420 |
Tell me how tested the code.
|
|
|
|
Joined: Aug 2006
Posts: 44
Ameglian cow
|
OP
Ameglian cow
Joined: Aug 2006
Posts: 44 |
I just copied a few !commands and pasted in channel(on a test guy not a op/halfop) and the other bot in channel blocks it from using for 5 mins but my bot still doesnt. :| (off subject: Can someone add a op check to this on *:TEXT:*swearword*:#:{ /ban -ku10 # $nick $nick $+ , Kicked for Inappropriate content. | //write KickLogs.txt ( $+ $date $+ - $+ $time $+ ) $nick $+ , Kicked for Inappropriate content. [Inappropriate Content.You have a 10 second ban you may rejoin after.]: $1- } ) ty
|
|
|
|
Joined: Mar 2005
Posts: 420
Fjord artisan
|
Fjord artisan
Joined: Mar 2005
Posts: 420 |
Try this then alias floodcheck {
var %fl.time = 10, %fl.lines = 3, %fl.ignore = 5
inc $iif(!$($+(%,flood,.,$1,.,$2),2),$+(-eu,%fl.time)) $+(%,flood,.,$1,.,$2)
if ( $($+(%,flood,.,$1,.,$2),2) >= %fl.lines ) set $+(-eu,$calc(%fl.ignore * 60)) %flood.var 1
} Then in the event, use this On *:TEXT:@test:#: {
floodcheck $cid $chan
if ( %flood.var ) halt
}
|
|
|
|
Joined: Mar 2005
Posts: 420
Fjord artisan
|
Fjord artisan
Joined: Mar 2005
Posts: 420 |
Do you mean Op check for the bot? On @*:TEXT:*swearword*:#:{
ban -ku10 # $nick $nick $+ , Kicked for Inappropriate content.
write KickLogs.txt ( $+ $date $+ - $+ $time $+ ) $nick $+ , Kicked for Inappropriate content. [Inappropriate Content. You have a 10 second ban you may rejoin after.]: $1-
} Or you want to exclude ops for this script? On @*:TEXT:*swearword*:#:{
if ( $nick isop $chan ) {
ban -ku10 # $nick $nick $+ , Kicked for Inappropriate content.
write KickLogs.txt ( $+ $date $+ - $+ $time $+ ) $nick $+ , Kicked for Inappropriate content. [Inappropriate Content. You have a 10 second ban you may rejoin after.]: $1-
}
}
|
|
|
|
Joined: Aug 2006
Posts: 44
Ameglian cow
|
OP
Ameglian cow
Joined: Aug 2006
Posts: 44 |
exclude so dont get the annoying things saying op banned etc.
:| and I have no clue the flood thing still doenst work for me. lol
|
|
|
|
Joined: Mar 2005
Posts: 420
Fjord artisan
|
Fjord artisan
Joined: Mar 2005
Posts: 420 |
Sorry, the event should look like this On *:TEXT:@test:#: {
if ( %flood.var ) halt
msg $chan test
floodcheck $cid $chan
}
|
|
|
|
Joined: Aug 2006
Posts: 44
Ameglian cow
|
OP
Ameglian cow
Joined: Aug 2006
Posts: 44 |
ok to make sure add the one into aliases and the other into remote?
EDIT: Grr... Cant get this thing to work...:| I must be stupid or something. lol
Last edited by Xtibian; 30/08/06 10:01 PM.
|
|
|
|
Joined: Mar 2005
Posts: 420
Fjord artisan
|
Fjord artisan
Joined: Mar 2005
Posts: 420 |
No, both should go to the remotes section.
If you see 'alias alias_name_here {...', this means that it should be placed in the remotes section & mirc will identify it as an alias. If there is no 'alias' in front of it, then it should be placed in the aliases section.
|
|
|
|
Joined: Aug 2006
Posts: 44
Ameglian cow
|
OP
Ameglian cow
Joined: Aug 2006
Posts: 44 |
ok ty. Appears to work but doesnt send a notice to the user...
EDIT: Umm looks like it stops anyone in channel from using the command not the one person.
Last edited by Xtibian; 30/08/06 10:24 PM.
|
|
|
|
Joined: Mar 2005
Posts: 420
Fjord artisan
|
Fjord artisan
Joined: Mar 2005
Posts: 420 |
Then my first post should do that. 
|
|
|
|
Joined: Aug 2006
Posts: 44
Ameglian cow
|
OP
Ameglian cow
Joined: Aug 2006
Posts: 44 |
that works lol
Anyways do you know how to set it so it sends a notice to the user?
|
|
|
|
Joined: Mar 2005
Posts: 420
Fjord artisan
|
Fjord artisan
Joined: Mar 2005
Posts: 420 |
alias floodcheck {
var %fl.time = 10, %fl.lines = 3, %fl.ignore = 5
inc $iif(!$($+(%,flood,.,$1,.,$2),2),$+(-eu,%fl.time)) $+(%,flood,.,$1,.,$2)
if ( $($+(%,flood,.,$1,.,$2),2) >= %fl.lines ) {
[color:red] .notice $2 You have been ignored for %fl.ignore mins. [/color]
.ignore $+(-u,$calc(%fl.ignore * 60)) $2
}
}
|
|
|
|
Joined: Aug 2006
Posts: 44
Ameglian cow
|
OP
Ameglian cow
Joined: Aug 2006
Posts: 44 |
Thk again.  works perfect. 
|
|
|
|
|