From 3c75b863a628adc020062e773d7edf5bac0649fb Mon Sep 17 00:00:00 2001 From: erdgeist <> Date: Sat, 15 Nov 2003 19:03:54 +0000 Subject: UTF-8 autodetection, some gcc warnings --- vchat-protocol.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'vchat-protocol.c') diff --git a/vchat-protocol.c b/vchat-protocol.c index 5113365..f1e8b5c 100755 --- a/vchat-protocol.c +++ b/vchat-protocol.c @@ -26,6 +26,10 @@ #include #include #include +#ifndef NO_LOCALE +#include +#include +#endif /* local includes */ #include "vchat.h" @@ -62,6 +66,7 @@ static void anonlogin (unsigned char *message); static void topicinfo (unsigned char *message); static void pubaction (unsigned char *message); static void pubthoughts (unsigned char *message); +static void serverlogin (unsigned char *message); static void idleprompt (unsigned char *message); static void topicchange (unsigned char *message); static void pmnotsent (unsigned char *message); @@ -408,6 +413,16 @@ pubthoughts (unsigned char *message) writechan (tmpstr); } +/* parse and handle server logon */ +static void +serverlogin (unsigned char *message) +{ +#ifndef NO_LOCALE + int utf8=!strcmp(nl_langinfo(CODESET), "UTF-8"); + if (utf8) + networkoutput(".e utf8"); +#endif +} /* parse and handle an idle message * format: 305 * vars: %s message */ -- cgit v1.2.3