Page 1 of 2

Color MOTD

Posted: Sat Mar 06, 2004 10:00 am
by eQuiliBrium
Hello,

I admin an Unreal3.2RC ircd server. In the unrealircd.conf i have specified a motd.ircd textfile to be used as the motd file. My question is how to add colors to this motd, in order for it to be shown in color to all users.

Greets.

Posted: Sat Mar 06, 2004 11:39 am
by AngryWolf
If you have Windows, as far as I know the UnrealIRCd's wircd has a built-in editor that supports colors and you can edit MOTD files in it. From the other hand, I've never seen any MOTD editors for *NIX. The only way I can suggest is to write your MOTD from line to line in an IRC client and paste the lines into the MOTD file. There should be an easier solution, thought.

Posted: Sat Mar 06, 2004 5:11 pm
by eQuiliBrium
So what you are saying is install wircd and take the motd file and place it
in the unix shell ... there must be a much shorter way of doing this.
i'll still google some more on the issue.

Anyway Thanks.

Posted: Sat Mar 06, 2004 7:47 pm
by AngryWolf
Probably I used wrong words, but I'm not telling you to install wircd, It's absolutely up to you. Since I don't use Windows, I'ld also like to see an MOTD editor for *NIX systems that supports mIRC color codes. By the way, I haven't found anything on Google yet.

Posted: Sat Mar 06, 2004 8:52 pm
by DeMiNe0
Basicly what angrywolf is saying is to Go into mirc, and use Alt+k to do what ever colors you need to in the text. Once you've done this, copy and paist it from mirc into the MOTD file.

Posted: Sat Mar 06, 2004 11:11 pm
by eQuiliBrium
I have tryed this too, but the unix codes are not the same with the mIRC one's.
I have edit a line of text using mIRC and copy/past it in the MOTD file, after "/rehash" you get black squiars.
And some form of giberish text, and than my text but there are no color's.

Perhaps i am asking to much.

Posted: Sat Mar 06, 2004 11:26 pm
by codemastr
The "codes" have nothing to do with the OS, ASCII is ASCII regardless of whether your on Windows, Linux, or any other OS.

It sounds like your editor (my guess is pico) doesn't support the codes. Try using vi, it allows you to insert codes by using the ctrl+v sequence. For example, to insert a bold character you type ctrl+v+b for color, ctrl+v+c, and for underline, ctrl+v+_

Posted: Sat Mar 06, 2004 11:57 pm
by AngryWolf
What do you think about a script that converts specific formatting symbols to ASCII codes? In that way we can simply write our colored MOTDs too. I've written a simple Perl script that does the convertion, http://www.angrywolf.org/convert.pl, I think such a thing can be very helpful. What my script does is, it replaces any occurrences of ^C to an appropriate ASCII code so all colors will be displayed well on IRC clients supporting mIRC color codes, and does the same with ^B (bold), ^R (reverse), ^U (underline and ^P (plain). Any comments?

Posted: Sun Mar 07, 2004 12:33 am
by codemastr
The problem with such scripts is you run into the possibility, however unlikely, that someone will actually want the character sequence ^B in their text.

Posted: Sun Mar 07, 2004 3:01 am
by DeMiNe0
if they want that sequence they could entrap it in quotes or somthing.
For example

The useage of the /"^b/" sequence is helpful.

Posted: Sun Mar 07, 2004 11:59 am
by AngryWolf
To codemastr: yeah, it has already come into my mind, thanks anyway. I've made it so carets (^) are escapable, for example, any occurrences of ^^C are replaced with ^C, and ^^ with ^. Works similarly to the printf-styled '%' formatting symbol in C.

To DeMiNe0: surely, but I find it too difficult, and still has the problem that codemastr mentioned in his last response. Anyway, thanks for you suggestion.

Posted: Wed Mar 10, 2004 6:20 pm
by aquanight
Can't you use color codes like %C## in the text file? Just remind mIRC users to enable ANSI color codes.

Posted: Wed Mar 10, 2004 7:06 pm
by codemastr
Not everyone uses mIRC you know...

Posted: Wed Mar 10, 2004 11:34 pm
by aquanight
But the ANSI colors work for most clients (like JIRC, etc.)

Posted: Thu Mar 11, 2004 12:59 am
by codemastr
Well I use Klient, and as far as I know it doesn't support ANSI color codes.