mIRC Home    About    Download    Register    News    Help

Print Thread
[Request]Again yet another nooby one. :( #157961 30/08/06 07:20 PM
Joined: Aug 2006
Posts: 44
X
Xtibian Offline OP
Ameglian cow
OP Offline
Ameglian cow
X
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.


Newbie Scripter. Learning pretty fast...lol :P
Re: [Request]Again yet another nooby one. :( #157962 30/08/06 07:58 PM
Joined: Mar 2005
Posts: 420
X
xDaeMoN Offline
Fjord artisan
Offline
Fjord artisan
X
Joined: Mar 2005
Posts: 420
try this

Code:
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:

Code:
 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.


If you have a plastic floor runner over your tiles, then you're one Hella Pinoy!
Re: [Request]Again yet another nooby one. :( #157963 30/08/06 08:37 PM
Joined: Aug 2006
Posts: 44
X
Xtibian Offline OP
Ameglian cow
OP Offline
Ameglian cow
X
Joined: Aug 2006
Posts: 44
For some reason it doesnt seem to work...atleast for me.


Newbie Scripter. Learning pretty fast...lol :P
Re: [Request]Again yet another nooby one. :( #157964 30/08/06 09:03 PM
Joined: Mar 2005
Posts: 420
X
xDaeMoN Offline
Fjord artisan
Offline
Fjord artisan
X
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?


If you have a plastic floor runner over your tiles, then you're one Hella Pinoy!
Re: [Request]Again yet another nooby one. :( #157965 30/08/06 09:07 PM
Joined: Aug 2006
Posts: 44
X
Xtibian Offline OP
Ameglian cow
OP Offline
Ameglian cow
X
Joined: Aug 2006
Posts: 44
I didnt mod the one he posted I just tried that one. :|


Newbie Scripter. Learning pretty fast...lol :P
Re: [Request]Again yet another nooby one. :( #157966 30/08/06 09:17 PM
Joined: Mar 2005
Posts: 420
X
xDaeMoN Offline
Fjord artisan
Offline
Fjord artisan
X
Joined: Mar 2005
Posts: 420
Tell me how tested the code.


If you have a plastic floor runner over your tiles, then you're one Hella Pinoy!
Re: [Request]Again yet another nooby one. :( #157967 30/08/06 09:20 PM
Joined: Aug 2006
Posts: 44
X
Xtibian Offline OP
Ameglian cow
OP Offline
Ameglian cow
X
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
Code:
*: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

Re: [Request]Again yet another nooby one. :( #157968 30/08/06 09:26 PM
Joined: Mar 2005
Posts: 420
X
xDaeMoN Offline
Fjord artisan
Offline
Fjord artisan
X
Joined: Mar 2005
Posts: 420
Try this then

Code:
 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



Code:
 On *:TEXT:@test:#: {
 floodcheck $cid $chan
 if ( %flood.var ) halt
 } 


If you have a plastic floor runner over your tiles, then you're one Hella Pinoy!
Re: [Request]Again yet another nooby one. :( #157969 30/08/06 09:29 PM
Joined: Mar 2005
Posts: 420
X
xDaeMoN Offline
Fjord artisan
Offline
Fjord artisan
X
Joined: Mar 2005
Posts: 420
Do you mean Op check for the bot?

Code:
 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?

Code:
 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- 
 }
} 


If you have a plastic floor runner over your tiles, then you're one Hella Pinoy!
Re: [Request]Again yet another nooby one. :( #157970 30/08/06 09:35 PM
Joined: Aug 2006
Posts: 44
X
Xtibian Offline OP
Ameglian cow
OP Offline
Ameglian cow
X
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

Re: [Request]Again yet another nooby one. :( #157971 30/08/06 09:49 PM
Joined: Mar 2005
Posts: 420
X
xDaeMoN Offline
Fjord artisan
Offline
Fjord artisan
X
Joined: Mar 2005
Posts: 420
Sorry, the event should look like this

Code:
 On *:TEXT:@test:#: {
  if ( %flood.var ) halt 
  msg $chan test
  floodcheck $cid $chan

} 
 


If you have a plastic floor runner over your tiles, then you're one Hella Pinoy!
Re: [Request]Again yet another nooby one. :( #157972 30/08/06 09:54 PM
Joined: Aug 2006
Posts: 44
X
Xtibian Offline OP
Ameglian cow
OP Offline
Ameglian cow
X
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.
Re: [Request]Again yet another nooby one. :( #157973 30/08/06 10:06 PM
Joined: Mar 2005
Posts: 420
X
xDaeMoN Offline
Fjord artisan
Offline
Fjord artisan
X
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.


If you have a plastic floor runner over your tiles, then you're one Hella Pinoy!
Re: [Request]Again yet another nooby one. :( #157974 30/08/06 10:20 PM
Joined: Aug 2006
Posts: 44
X
Xtibian Offline OP
Ameglian cow
OP Offline
Ameglian cow
X
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.

Newbie Scripter. Learning pretty fast...lol :P
Re: [Request]Again yet another nooby one. :( #157975 30/08/06 10:29 PM
Joined: Mar 2005
Posts: 420
X
xDaeMoN Offline
Fjord artisan
Offline
Fjord artisan
X
Joined: Mar 2005
Posts: 420
Then my first post should do that. wink


If you have a plastic floor runner over your tiles, then you're one Hella Pinoy!
Re: [Request]Again yet another nooby one. :( #157976 30/08/06 10:49 PM
Joined: Aug 2006
Posts: 44
X
Xtibian Offline OP
Ameglian cow
OP Offline
Ameglian cow
X
Joined: Aug 2006
Posts: 44
that works lol

Anyways do you know how to set it so it sends a notice to the user?


Newbie Scripter. Learning pretty fast...lol :P
Re: [Request]Again yet another nooby one. :( #157977 30/08/06 11:08 PM
Joined: Mar 2005
Posts: 420
X
xDaeMoN Offline
Fjord artisan
Offline
Fjord artisan
X
Joined: Mar 2005
Posts: 420
Code:
 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
  
  }

}   


If you have a plastic floor runner over your tiles, then you're one Hella Pinoy!
Re: [Request]Again yet another nooby one. :( #157978 31/08/06 01:39 AM
Joined: Aug 2006
Posts: 44
X
Xtibian Offline OP
Ameglian cow
OP Offline
Ameglian cow
X
Joined: Aug 2006
Posts: 44
Thk again. smile works perfect. grin