mIRC Home    About    Download    Register    News    Help

Print Thread
#180712 13/07/07 04:56 AM
Joined: Jul 2007
Posts: 30
I
Ameglian cow
OP Offline
Ameglian cow
I
Joined: Jul 2007
Posts: 30
Hello.

I'm currently running tat's trivia script on MIRC version 6.21.
I dont want people to pvt my bot.
Does anyone have a simple remote script to disable people from private messaging my trivia bot with the option to turn it on/off.

Thanks in advance.

Last edited by ispukikoy; 13/07/07 05:02 AM.
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Code:
#pm on
on *:open:?:*:{
  if $nick != ispukikoy {
    close -m $nick
  }
  elseif $1 == off {
    .disable #pm
  }
}
#pm off
on *:open:?:*:{
  if $1 == on && $group(#pm) == off {
    .enable #pm
  }
}

Joined: Jul 2007
Posts: 30
I
Ameglian cow
OP Offline
Ameglian cow
I
Joined: Jul 2007
Posts: 30
Hello Russel.

Can you please explain the script?
How do i switch the script on and how do i switch it off?


Joined: Mar 2005
Posts: 420
X
Fjord artisan
Offline
Fjord artisan
X
Joined: Mar 2005
Posts: 420
Another suggestion
Code:
On ^*:OPEN:?:*: {
  if ( $nick == ispukikoy ) && ( $1 isin on off ) set %pmb $iif($1 == on,1,0)
  if ( %pmb ) halt
}


You pm the bot with "on" to turn on the PM blocker then "off" to turn it off.
* Only your nick can turn it on/off.


If you have a plastic floor runner over your tiles, then you're one Hella Pinoy!
Joined: Jul 2007
Posts: 30
I
Ameglian cow
OP Offline
Ameglian cow
I
Joined: Jul 2007
Posts: 30
Hello xDaemon,

What about making it a little sophisticated.

1. No pvt messaging with on and off switch

2. when pvt messaging is disabled and someone tries to pvt
my bot, the bot will respond "sorry pvt messaging is disabled"
with no query windows opened (because pvt messaging is disabled).

Thanks in advance.

ps. are you pinoy? I'm pinoy!

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
you asked for simple, and you got two simple methods...the more you want in it, the more complicated it's going to be, and you really should include all of the options that you want in the first post.

If you don't want the bot to turn the script on/off via pm, how do you want it? in channel, via DCC, or CTCP?

In regards to my script, the group at the start controls if the on open event in that group is recognized or not...if the group is on, then it will be, and it overrides the 2nd on open event.
If the group is off, then the 1st on open event is ignored, and the 2nd one is processed.

Joined: Jul 2007
Posts: 30
I
Ameglian cow
OP Offline
Ameglian cow
I
Joined: Jul 2007
Posts: 30
sorry about it.
I guess the first two scripts are just alright for me, for now. thank you very much sir.

Joined: Mar 2005
Posts: 420
X
Fjord artisan
Offline
Fjord artisan
X
Joined: Mar 2005
Posts: 420
If you want to send a message if pm is disabled, then change
Code:
if ( %pmb ) halt

to
Code:
if ( %pmb ) { .msg $nick Message here | halt }


Originally Posted By: "ispukikoy"
ps. are you pinoy? I'm pinoy!

100% noypi smile


If you have a plastic floor runner over your tiles, then you're one Hella Pinoy!
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Code:
#pm on
on *:open:?:*:{
  if $nick != ispukikoy {
    close -m $nick
  }
  elseif $1 == off {
    .disable #pm
  }
}
#pm off
on *:open:?:*:{
  if $1 == on && $group(#pm) == off {
    .enable #pm
  }
}



You was probably half asleep when writing this code.

OP: Line 10 should read #pm end and not #pm off.

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
oops...I wish I could honestly claim that I was half-asleep, but I'm too honest to do that.

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Heh, that gets me all of the time as well. You expect it to be "off" if you start it with "on". Not sure why Khaled didn't make it on/off or start/stop or begin/end, rather than on/end. It would be more intuitive that way.


Invision Support
#Invision on irc.irchighway.net
Joined: Nov 2006
Posts: 1,559
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559
As it is (ON || OFF) ...code... END
The first param is the switch smile


Link Copied to Clipboard