mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Aug 2003
Posts: 319
P
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
P
Joined: Aug 2003
Posts: 319
Help file says:

"The -m switch indicates that the line should be treated as a user message, not an event."

But what does this actually mean?

Joined: Jan 2004
Posts: 2,127
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 2,127
It affects the mirc-options/display colors. Because of the -m switch, the code below highlights the channel icon with the color you configured beneath mirc-options/displaycolors/"message". Remove the -m and it highlights the icon with the color beneath "event" instead, because the echo is being done during an event.

Code:
on ^*:JOIN:#:{
  var %i $ial($address($nick,2),0) | var %nicks | var %j $iif(%i isnum 2-,%i)
  while (%j) { var %nicks $ial($address($nick,2),%j).nick %nicks | dec %j }
  echo $color(join) -m # $timestamp * $nick $+($chr(40),$gettok($fulladdress,2-,33),$chr(41)) has joined # $comchan($nick,0) $iif(%nicks,$chr(22) %i $v1 )
  haltdef
}


Note that "* ChanServ sets mode: +o nick" immediately resets the color to the event color if you had colored the icon as the message color. The -n switch keeps an echo during an $event from highlighting as the event color, so should not be used along with the -m switch.

Joined: Aug 2003
Posts: 319
P
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
P
Joined: Aug 2003
Posts: 319
Thanks - I have updated wikichip to reflect this.

Joined: Jul 2006
Posts: 4,146
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,146
Thanks for editing wikichip! Note that -m probably does more than that, it simply does everything it would do if that line was echoed from an 'IRC event', not sure but for example it should apply stripping option, antiflood option etc.

Edit: it's not applying those options, so maybe it's just for the color of the item in the switch/treebar

Last edited by Wims; 17/10/17 10:46 PM.

#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Aug 2003
Posts: 319
P
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
P
Joined: Aug 2003
Posts: 319
I think we need a definitive answer of what -m does because this explanation is actually completely different to the original one.

Joined: Aug 2003
Posts: 319
P
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
P
Joined: Aug 2003
Posts: 319
@Wims - can you please stop removing my explanation from wikichip until you have proven that your explanation is correct.

It seems like we need either:

  • Khaled to explain what his code actually does; or
  • Someone (who has the time) to experiment and demonstrate exactly what happens

Joined: Aug 2003
Posts: 319
P
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
P
Joined: Aug 2003
Posts: 319
Ok - a little bit of experimentation:

1. /query x1 - opens a query window - button colour black
2. /echo x1 test - button stays black
3. /echo -m x1 - button turns "message" colour
4. switch to window and back to clear colour
Using a remote with "on *:signal:echotest: echo $1-":
5. /signal echotest x1 test - button stays black (even though this is now an event)
6. /signal echotest -m x1 test - button turns "message" colour.

Summary: echo without -m doesn't change colour

Interestingly I also tested the -f and -b flags and these do not work regardless of the "Options/IRC/Options flash on message for Query setting and regardless of whether the query window has had flashing and beeping explicitly enabled and regardless of whether you use the -m flag or not.

I tried this using a variety of events and sending to a channel instead of a query window and get the same results.

So it seems that a variety of echo flags fail to work as expected.

This is on mIRC 7.51. If someone else can do their own experiments to confirm my findings, that would be helpful confirmation. In the mean time I will report this as a bug to Khaled.

Last edited by Protopia; 18/10/17 08:45 AM.
Joined: Jul 2006
Posts: 4,146
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,146
I edited back but keep in mind I have the right to edit your change.
I think your experimentation is working as expected though, it's getting clearer that what the help file means with 'message' and 'event' are related to the color option alt+o>display, and that -m is really about the color used for the item in the tree/switchbar. 'event' not being related to mIRC event such as on signal.

I also tested -b -f and -l and they are working as expected for me, remember it's best to test these with a timer and making mIRC not the active application.

Last edited by Wims; 18/10/17 09:40 AM.

#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Aug 2003
Posts: 319
P
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
P
Joined: Aug 2003
Posts: 319
Originally Posted By: Wims
I edited back but keep in mind I have the right to edit your change.


Of course you have the right to edit it - it's a wiki. All I ask is that your changes reflect reality as tested not as we might think it should work.

Originally Posted By: Wims
I also tested -b -f and -l and they are working as expected for me, remember it's best to test these with a timer and making mIRC not the active application.


Ah - you are probably right - beeping and flashing are when mIRC is not the active application. I am re-testing this at the moment.

Joined: Aug 2003
Posts: 319
P
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
P
Joined: Aug 2003
Posts: 319
Yes - beeping / flashing does seem to work.


Link Copied to Clipboard