mIRC Home    About    Download    Register    News    Help

Print Thread
#265440 25/04/19 12:20 AM
Joined: Jul 2014
Posts: 308
TECO Offline OP
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
Joined: Jul 2014
Posts: 308
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 (Co-Admin)
TECO #265441 25/04/19 03:06 AM
Joined: Jan 2005
Posts: 192
Vogon poet
Offline
Vogon poet
Joined: Jan 2005
Posts: 192
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
Brax #265444 25/04/19 03:02 PM
Joined: Jul 2014
Posts: 308
TECO Offline OP
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
Joined: Jul 2014
Posts: 308
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 (Co-Admin)
TECO #265445 25/04/19 03:39 PM
Joined: Jul 2006
Posts: 4,144
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,144
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 }


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Wims #265446 25/04/19 09:41 PM
Joined: Jul 2014
Posts: 308
TECO Offline OP
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
Joined: Jul 2014
Posts: 308
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 (Co-Admin)

Link Copied to Clipboard