Colored vhosts in UnrealIRCd
Linux 1 Comment »If you don't care that it is violating the RFC (like me),
you can easily modify the unreal source-code so it will take colored vhosts.
In src/s_misc.c, find the valid_host function, and change:
if (!isalnum(*p) && (*p != '_') && (*p != '-') && (*p != '.') && (*p != ':'))
to:
if (!isalnum(*p) && (*p != '_') && (*p != '-') && (*p != '.') && (*p != ':') && (*p != '\x03') && (*p != '\x0f'))
Recompile.
Now the /chghost function will not complain when changing someone's virtual host to something colorful 🙂
This also supports the 'off' character (CTRL+O in mIRC). I encourage you to always use this at the end of your colored vhost to prevent bleeding.
This will only allow foreground colors.
If you want background colors, you will have to add (*p != ',').
If you want bolds, you will have to add (*p != '\x02').