Kill PM

By MartyniP on Apr 26, 2010

if you pm the bot it will respond with:

No PM On ChocolateOrange You Are breaching Geekshed's TOS... http://www.geekshed.net/tos/ You will be reported Goodbye... Then it will pm you with the nick that pm your bot ```mirc on *:OPEN:?:*: { /msg $nick No PM On $me /msg $nick You Are breaching IRC SEVER's TOS... http://www.server.site/tos/ (LOCATION) /msg $nick You will be reported /msg $nick Goodbye... /close -icfgms@ /notice YourNick Please note $nick has PM'ed me } ```

Comments

Sign in to comment.
Bielie   -  Apr 29, 2010

ooh yeaah... Nevermind gooshie i didnt realize this was about PM's even though the title is "Kill PM"

 Respond  
gooshie   -  Apr 29, 2010

You do realize that /ignore has a switch for just ignoring private messages? I can not see having this code on a bot that allows commands to be sent by private message.

 Respond  
Bielie   -  Apr 29, 2010

Not realy..... If your ignored for 15mins you cant trigger anything for 15mins. What if ur bot has more commands the users want to use? Then they have to wait 15mins. You wouldnt be able to use simple on *:text: events......

BTW: IF you have an example of what you mean with /ignore in a whole script, post it and try to make it clear. For now i dont get you very well.

 Respond  
gooshie   -  Apr 29, 2010

No it does not. It is absolutely zero protection and a waste of bytes. Every three seconds it can be triggered and cause one message to be sent and five unnamed timers to start. Having a delay in the timers will make no difference after several triggers. It would be far better for everyone if it only sent one message to the offending nick and then put that nick on private ignore for about 15 minutes or more.

 Respond  
Bielie   -  Apr 29, 2010

whatever it does work for me ;)

 Respond  
gooshie   -  Apr 28, 2010

No it does not. That is one set of six messages every three seconds.

 Respond  
Bielie   -  Apr 28, 2010

it does..... No messages are being send for atleast 3 seconds. so thats 1 message per 3 seconds... Cant see why tha wouldnt work

 Respond  
gooshie   -  Apr 28, 2010

Bielie
Instead of:

if ($(,$+(%,flood,$nick))) { return }
    set -eu3 $+(%,flood,$nick)

You could use /ignore for private messages with a time of like an hour or whatever. Also, all those messages to the offending $nick would be better combined into one message. That 3 second delay with all those messages and timers isn't really gonna stop it from flooding.

 Respond  
Bielie   -  Apr 28, 2010
on ^*:OPEN:?:*: {
if ($(,$+(%,flood,$nick))) { return }
    set -eu3 $+(%,flood,$nick)

else {
msg $nick No PM On $me | .timer 1 2 msg $nick You Are breaching IRC SEVER's TOS... | .timer 1 3 msg $nick http://www.server.site/tos/ (LOCATION) | .timer 1 4 msg $nick You will be reported | .timer 1 5 msg $nick Goodbye... | .timer 1 6 notice $me Please note $nick has PM'ed me | haltdef }

I cleaned it a bit up and added timers else your bot might get kicked for flooding. I also added a flood control that will ignore for 3 seconds after te command is triggered.

Enjoy!!!

 Respond  
Jethro   -  Apr 26, 2010

Ah I see, gooshie. I've seen people use it with or without the asterisk symbol before, but I never bothered to find out why. Thanks for the heads up, though. =)

 Respond  
gooshie   -  Apr 26, 2010

Jethro
You should be able to use
on ^:OPEN:?: {
on ^
:OPEN::?: {
on ^
:OPEN:MATCH TEXT:?: {
I believe it is the only event that does NOT require
at least a wildcard match text parameter.
Perhaps the one for dcc chat is the same.
Also, I believe you can use simply halt instead of haltdef.

 Respond  
Jethro   -  Apr 26, 2010

Shouldn't the open event be constructed as:> on ^:OPEN:?:: {

 Respond  
gooshie   -  Apr 26, 2010

You do not need to use /close at all. Just use the ^ and haltdef.

on ^*:OPEN:?: {
  msg $nick No PM On $me
  haltdef
}
 Respond  
Jethro   -  Apr 26, 2010

As napa said, you can simply use:

/close -m $nick

Or

/closemsg $nick

<-this one is deprecated but remains working.

 Respond  
napa182   -  Apr 26, 2010

well you may want to add some flood control or a one time response to the person or risk being flooded off..
also why use so many switches for ur close? -m will do for a pm

you said " Then it will pm you with the nick that pm your bot "
don't you mean notice

for this

 /notice YourNick Please note $nick has PM'ed me

you could just get rid of the YourNick part an use $me

notice $me Please note $nick has PM'ed me
 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.