mIRC Home    About    Download    Register    News    Help

Topic Options
#265440 - 25/04/19 01:20 AM Onotice
Tiago Offline
Vogon poet

Registered: 05/07/14
Posts: 118
Hi
I've been looking for mIRC help and found that on TEXT event there is on NOTICE but there is no on ONOTICE.

I was wondering if there is any way to separate the onotice messages and to receive the messages sent by the channel operators in a separate window.

Thank you!
_________________________
TECO
irc.PTirc.org (IRCop)

Top
#265441 - 25/04/19 04:06 AM Re: Onotice [Re: Tiago]
Brax Offline
Vogon poet

Registered: 26/01/05
Posts: 187
You can use $target to check to whom the notice was sent.

For op notice check the presence of @ in $target
For chan notice check for #

Some networks allow voice notices as well in which case you would look for +

And as with other events you can prefix the event with ^ and halt the default output.
_________________________
echo -a $signature

Top
#265444 - 25/04/19 04:02 PM Re: Onotice [Re: Brax]
Tiago Offline
Vogon poet

Registered: 05/07/14
Posts: 118
Originally Posted By: Brax
You can use $target to check to whom the notice was sent.

For op notice check the presence of @ in $target
For chan notice check for #

Some networks allow voice notices as well in which case you would look for +

And as with other events you can prefix the event with ^ and halt the default output.

I did not understand your help.
You can explain to me how I'm going to use the $ target in the code.
_________________________
TECO
irc.PTirc.org (IRCop)

Top
#265445 - 25/04/19 04:39 PM Re: Onotice [Re: Tiago]
Wims Offline
Planetary brain

Registered: 31/07/06
Posts: 3509
Loc: France
He is saying that you have to use the on notice event.
$target is an identifier that returns the target for an event.

If someone talks in #mIRC, it's a privmsg to #mIRC that is sent, the on text event would trigger with $target returning #mIRC.

If someone sends a notice to #mIRC, it's a notice to #mIRC and on notice will trigger with $target set to #mIRC.

If someone sends a notice to @#mIRC, it's what you call a onotice, $target should be @#mIRC.

So inside your on notice event, check if the first character is a @:

if ($left($target,1) == @) { echo -s this is a onotice event }
_________________________
Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net

Top
#265446 - 25/04/19 10:41 PM Re: Onotice [Re: Wims]
Tiago Offline
Vogon poet

Registered: 05/07/14
Posts: 118
Originally Posted By: Wims
He is saying that you have to use the on notice event.
$target is an identifier that returns the target for an event.

If someone talks in #mIRC, it's a privmsg to #mIRC that is sent, the on text event would trigger with $target returning #mIRC.

If someone sends a notice to #mIRC, it's a notice to #mIRC and on notice will trigger with $target set to #mIRC.

If someone sends a notice to @#mIRC, it's what you call a onotice, $target should be @#mIRC.

So inside your on notice event, check if the first character is a @:

if ($left($target,1) == @) { echo -s this is a onotice event }

Wims
Thanks for the help and the explanation.
Hug!
_________________________
TECO
irc.PTirc.org (IRCop)

Top