diff options
Diffstat (limited to 'vchat-protocol.c')
-rwxr-xr-x | vchat-protocol.c | 15 |
1 files changed, 15 insertions, 0 deletions
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 @@ | |||
26 | #include <readline/readline.h> | 26 | #include <readline/readline.h> |
27 | #include <openssl/ssl.h> | 27 | #include <openssl/ssl.h> |
28 | #include <openssl/err.h> | 28 | #include <openssl/err.h> |
29 | #ifndef NO_LOCALE | ||
30 | #include <locale.h> | ||
31 | #include <langinfo.h> | ||
32 | #endif | ||
29 | 33 | ||
30 | /* local includes */ | 34 | /* local includes */ |
31 | #include "vchat.h" | 35 | #include "vchat.h" |
@@ -62,6 +66,7 @@ static void anonlogin (unsigned char *message); | |||
62 | static void topicinfo (unsigned char *message); | 66 | static void topicinfo (unsigned char *message); |
63 | static void pubaction (unsigned char *message); | 67 | static void pubaction (unsigned char *message); |
64 | static void pubthoughts (unsigned char *message); | 68 | static void pubthoughts (unsigned char *message); |
69 | static void serverlogin (unsigned char *message); | ||
65 | static void idleprompt (unsigned char *message); | 70 | static void idleprompt (unsigned char *message); |
66 | static void topicchange (unsigned char *message); | 71 | static void topicchange (unsigned char *message); |
67 | static void pmnotsent (unsigned char *message); | 72 | static void pmnotsent (unsigned char *message); |
@@ -408,6 +413,16 @@ pubthoughts (unsigned char *message) | |||
408 | writechan (tmpstr); | 413 | writechan (tmpstr); |
409 | } | 414 | } |
410 | 415 | ||
416 | /* parse and handle server logon */ | ||
417 | static void | ||
418 | serverlogin (unsigned char *message) | ||
419 | { | ||
420 | #ifndef NO_LOCALE | ||
421 | int utf8=!strcmp(nl_langinfo(CODESET), "UTF-8"); | ||
422 | if (utf8) | ||
423 | networkoutput(".e utf8"); | ||
424 | #endif | ||
425 | } | ||
411 | /* parse and handle an idle message | 426 | /* parse and handle an idle message |
412 | * format: 305 | 427 | * format: 305 |
413 | * vars: %s message */ | 428 | * vars: %s message */ |