Color MOTD

Talk about pretty much anything here, but DO NOT USE FOR SUPPORT.

Moderator: Supporters

eQuiliBrium
Posts: 40
Joined: Sat Mar 06, 2004 9:42 am
Location: Netherland (Amsterdam)
Contact:

Color MOTD

Post by eQuiliBrium » Sat Mar 06, 2004 10:00 am

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.
Let me think about it

AngryWolf
Posts: 554
Joined: Sat Mar 06, 2004 10:53 am
Location: Hungary
Contact:

Post by AngryWolf » Sat Mar 06, 2004 11:39 am

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.

eQuiliBrium
Posts: 40
Joined: Sat Mar 06, 2004 9:42 am
Location: Netherland (Amsterdam)
Contact:

Post by eQuiliBrium » Sat Mar 06, 2004 5:11 pm

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.
Let me think about it

AngryWolf
Posts: 554
Joined: Sat Mar 06, 2004 10:53 am
Location: Hungary
Contact:

Post by AngryWolf » Sat Mar 06, 2004 7:47 pm

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.

DeMiNe0
Posts: 50
Joined: Sat Feb 28, 2004 4:11 am

Post by DeMiNe0 » Sat Mar 06, 2004 8:52 pm

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.

eQuiliBrium
Posts: 40
Joined: Sat Mar 06, 2004 9:42 am
Location: Netherland (Amsterdam)
Contact:

Post by eQuiliBrium » Sat Mar 06, 2004 11:11 pm

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.
Let me think about it

codemastr
Former UnrealIRCd head coder
Posts: 811
Joined: Sat Mar 06, 2004 8:47 pm
Location: United States
Contact:

Post by codemastr » Sat Mar 06, 2004 11:26 pm

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+_
-- codemastr

AngryWolf
Posts: 554
Joined: Sat Mar 06, 2004 10:53 am
Location: Hungary
Contact:

Post by AngryWolf » Sat Mar 06, 2004 11:57 pm

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?

codemastr
Former UnrealIRCd head coder
Posts: 811
Joined: Sat Mar 06, 2004 8:47 pm
Location: United States
Contact:

Post by codemastr » Sun Mar 07, 2004 12:33 am

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.
-- codemastr

DeMiNe0
Posts: 50
Joined: Sat Feb 28, 2004 4:11 am

Post by DeMiNe0 » Sun Mar 07, 2004 3:01 am

if they want that sequence they could entrap it in quotes or somthing.
For example

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

AngryWolf
Posts: 554
Joined: Sat Mar 06, 2004 10:53 am
Location: Hungary
Contact:

Post by AngryWolf » Sun Mar 07, 2004 11:59 am

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.

aquanight
Official supporter
Posts: 862
Joined: Tue Mar 09, 2004 10:47 pm
Location: Boise, ID

Post by aquanight » Wed Mar 10, 2004 6:20 pm

Can't you use color codes like %C## in the text file? Just remind mIRC users to enable ANSI color codes.

codemastr
Former UnrealIRCd head coder
Posts: 811
Joined: Sat Mar 06, 2004 8:47 pm
Location: United States
Contact:

Post by codemastr » Wed Mar 10, 2004 7:06 pm

Not everyone uses mIRC you know...
-- codemastr

aquanight
Official supporter
Posts: 862
Joined: Tue Mar 09, 2004 10:47 pm
Location: Boise, ID

Post by aquanight » Wed Mar 10, 2004 11:34 pm

But the ANSI colors work for most clients (like JIRC, etc.)

codemastr
Former UnrealIRCd head coder
Posts: 811
Joined: Sat Mar 06, 2004 8:47 pm
Location: United States
Contact:

Post by codemastr » Thu Mar 11, 2004 12:59 am

Well I use Klient, and as far as I know it doesn't support ANSI color codes.
-- codemastr

Locked