mIRC Home    About    Download    Register    News    Help

Print Thread
#225354 31/08/10 04:25 PM
Joined: Dec 2007
Posts: 24
T
Tzar469 Offline OP
Ameglian cow
OP Offline
Ameglian cow
T
Joined: Dec 2007
Posts: 24
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!

Tzar469 #225355 31/08/10 04:41 PM
Joined: Apr 2010
Posts: 969
F
Hoopy frood
Offline
Hoopy frood
F
Joined: Apr 2010
Posts: 969
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.


I am SReject
My Stuff
Tzar469 #225356 31/08/10 05:05 PM
Joined: Dec 2002
Posts: 2,031
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 2,031

Last edited by RoCk; 31/08/10 05:08 PM.
Tzar469 #225358 31/08/10 05:43 PM
Joined: Jun 2007
Posts: 933
5
Hoopy frood
Offline
Hoopy frood
5
Joined: Jun 2007
Posts: 933
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.

5618 #225360 31/08/10 06:11 PM
Joined: Dec 2007
Posts: 24
T
Tzar469 Offline OP
Ameglian cow
OP Offline
Ameglian cow
T
Joined: Dec 2007
Posts: 24
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

Tzar469 #225363 31/08/10 06:32 PM
Joined: Jun 2007
Posts: 933
5
Hoopy frood
Offline
Hoopy frood
5
Joined: Jun 2007
Posts: 933
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.

5618 #225364 31/08/10 06:41 PM
Joined: Dec 2007
Posts: 24
T
Tzar469 Offline OP
Ameglian cow
OP Offline
Ameglian cow
T
Joined: Dec 2007
Posts: 24
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...

Last edited by Tzar469; 31/08/10 06:44 PM.
Tzar469 #225373 31/08/10 09:18 PM
Joined: Aug 2010
Posts: 134
T
Vogon poet
Offline
Vogon poet
T
Joined: Aug 2010
Posts: 134
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.


Learning something new every day.

Link Copied to Clipboard