mIRC Homepage
Posted By: Tzar469 /Echo problems - 31/08/10 04:25 PM
I have 2 questions regarding /echo, and would like some help in solving them.

1) For some reason the echo in the code below does not apply the highlight settings to the line (line color, sound, etc). Surprisingly, it works if I add any character between $chan and $1- . Basically, I need someone to verify if the code works as intended for them.
Code:
on ^*:text:*:#:{
   if ($highlight($1-)) && ($1 !isnum) {
   haltdef
   echo -tmlc highlight $chan $1-
   }
}


2) This problem is unrelated to the first one. I find that when I /echo into a channel window that has logging enabled, a timestamp will automatically be added to the line in the log, even if I don't use the -t switch. Is there a way to modify this behavior? For example, consider the following code:

Code:
//echo -a $timestamp 6text


This code will display as I intend it in the channel window, but it is written to the log as [timestamp][timestamp] text, which is not what I want. I know I can disable the timestamp in the options, but if I do that, any /echo -t that I have won't have the timestamp in the log, which is again not what I want.

Any help for these two problems is appreciated!
Posted By: FroggieDaFrog Re: /Echo problems - 31/08/10 04:41 PM
with the /echo timestamp, u could use the -g switch to keep the line from being logged, and add it to the log as u see fit.
Posted By: RoCk Re: /Echo problems - 31/08/10 05:05 PM

I thought he replied.

https://forums.mirc.com/ubbthreads.php?ubb=showflat&Number=221868
Posted By: 5618 Re: /Echo problems - 31/08/10 05:43 PM
Your second question has already been answered, I see.

Regarding your first question: it works fine/as expected for me.
Note however, that the -l switch overrides your -c switch. A line which matches a line in your Address Book's Highlight section will be coloured according to the highlight colour set there (due to the -l switch) and not according to the Highlight text colour specified in the Colors dialog.
Posted By: Tzar469 Re: /Echo problems - 31/08/10 06:11 PM
Yes, I want the -l switch to override it, but it isn't doing so for me, even on a fresh mIRC install (7.1, btw). I see the -c highlight color instead.


As for the timestamps issue, I really don't want to script my own logging so I guess I'm stuck with the double timestamps for now frown
Posted By: 5618 Re: /Echo problems - 31/08/10 06:32 PM
Then why are you specifying "-c highlight"? Since your if-statement is only true if the line matches an entry in the Address Book's Highlight section, the echoed line will always have that colour and never the "Highlight text" colour.
Posted By: Tzar469 Re: /Echo problems - 31/08/10 06:41 PM
I do it so if I don't specify a color in the highlight dialog it will use the highlight text color and not the default text color.

Edit: It still doesn't work without "-c highlight". It will echo with no colors, and still not use the highlight color from the address book entry...
Posted By: Thels Re: /Echo problems - 31/08/10 09:18 PM
Do keep in mind that -l (and likewise -b and -f) ALLOW highlights in that line (and likewise beep and flash).

That means that if there's something in the line that would cause a highlight, the line will be highlighted. It doesn't automatically highlight all lines with the -l flag.

If there is nothing in the line that is in your highlight list, it will be treated like a regular line.
© mIRC Discussion Forums