View Issue Details

IDProjectCategoryView StatusLast Update
0000052unrealircdpublic2005-11-11 09:24
Reporter|savage| Assigned To 
Status closedResolutionduplicate 
PlatformIntel PIIIOSLinuxOS VersionRedHat 7.2
Product Version3.2-beta12 
Summary0000052: LOCALE_NICK support
DescriptionI have implemented a simple and small patch to allow nicknames
be LOCALE aware. Configuration via set::locale

The same locale MUST be set on all servers connected to the net. I think SERVER or PROTOCTL will be a great place to anounce LOCALE on server<->server connects.
sample config:

set {
   locale "es_ES.ISO-8859-1";
Additional Informationdiff -urN Unreal3.2/include/common.h Unreal3.2_limit_webhost_locale/include/common.h
--- Unreal3.2/include/common.h Fri Jan 11 23:33:06 2002
+++ Unreal3.2_limit_webhost_locale/include/common.h Wed Jan 23 14:05:44 2002
@@ -141,7 +141,7 @@
 extern u_char tolowertab[], touppertab[];
-#if defined(CHINESE_NICK) || defined(JAPANESE_NICK)
+#if defined(CHINESE_NICK) || defined(JAPANESE_NICK) || defined(LOCALE_NICK)
 #define USE_LOCALE
diff -urN Unreal3.2/include/config.h Unreal3.2_limit_webhost_locale/include/config.h
--- Unreal3.2/include/config.h Fri Jan 11 23:33:06 2002
+++ Unreal3.2_limit_webhost_locale/include/config.h Wed Jan 23 14:03:05 2002
@@ -133,6 +133,7 @@
+#define LOCALE_NICK
   Remote rehash
diff -urN Unreal3.2/include/struct.h Unreal3.2_limit_webhost_locale/include/struct.h
--- Unreal3.2/include/struct.h Tue Jan 22 13:26:30 2002
+++ Unreal3.2_limit_webhost_locale/include/struct.h Wed Jan 23 14:16:18 2002
@@ -1341,7 +1341,11 @@
 #define BadPtr(x) (!(x) || (*(x) == '\0'))
+#if defined(LOCALE_NICK)
+#define isvalid(c) (isalpha(c) || ((c) >= 'A' && (c) <= '~') || isdigit(c) || (c) == '-')
 #define isvalid(c) (((c) >= 'A' && (c) <= '~') || isdigit(c) || (c) == '-')
 #define MyConnect(x) ((x)->fd >= 0)
 #define MyClient(x) (MyConnect(x) && IsClient(x))
diff -urN Unreal3.2/src/s_conf.c Unreal3.2_limit_webhost_locale/src/s_conf.c
--- Unreal3.2/src/s_conf.c Mon Jan 7 22:10:03 2002
+++ Unreal3.2_limit_webhost_locale/src/s_conf.c Wed Jan 23 17:39:20 2002
@@ -25,6 +25,7 @@
 #include "channel.h"
 #include <fcntl.h>
 #ifndef _WIN32
+#include <locale.h>
 #include <sys/socket.h>
 #include <sys/wait.h>
@@ -2195,6 +2196,10 @@
             ircstrdup(KLINE_ADDRESS, cep->ce_vardata);
+ else if (!strcmp(cep->ce_varname, "locale")) {
+ CheckNull(cep);
+ setlocale(LC_ALL, cep->ce_vardata);
+ }
         else if (!strcmp(cep->ce_varname, "modes-on-connect")) {
             CONN_MODES = (long) set_usermode(cep->ce_vardata);

TagsNo tags attached.
3rd party modules


related to 0002070 resolvedsyzop Localized nick support 



2002-01-25 00:38

reporter   ~0000068

Protocol enacement prporsal:

Server->Client LOCALE // CHARSET information:

:server 005 _nick_ LOCALE=es_ES.ISO-8859-1 CHARSET=ISO-8859-1 :are supported by this server

Server<->Server LOCALE negotiation:
-> PROTOCTL bla bla bla LOCALE=es_ES.ISO-8859-1
<- PROTOCTL bla bla bla LOCALE=es_ES.ISO-8859-1

both servers talk the same LOCALE and mutually allows connection. in case of mismatch, connection is not allowed and servers disconnect, and inform about the problem like on password mismatchs ...


2002-08-21 16:49

reporter   ~0000356

I like the idea, differences between patch and the way I'd like it implimented:
1.) synch through NETINFO
2.) ((c) >= 'A' && (c) <= '~') || (c) == '-') remove that, because in some
    locales you may not want A-Za-z, etc. Should be fully locale specific.
3.) 'rfc1459' option to use the format specified in rfc1459
4.) 'rfc1459.unreal' to use the current method
5.) 'unicode' to enable unicode support - this may seem hard at first but the
    chinese_nick and japanese_nick patches give us a hint on a nice easy hack
    that will allow something like this to be done.
6.) ability to do 'unicode subranges' eg. select only chinese from the unicode
6.) 005 CHARSET and CASEMAPPING tokens, done differently than the way the
    other ircds do it (broken) CHARSET=ascii tells us nothing
    CHARSET=ascii.es_ES.ISO-8859-1 does. the CHARSET=rfc1459 is good enough
    because it is defined, but simply doing CHARSET=ascii doesn't tell the
    client any relevant information. For the unicode stuff CHARSET=unicode and
    CHARSET=unicode.chinese, etc. should be acceptable to provide enough
    information to the client.

In order to do this successfully, nicks need to be changed from char to unsigned char. But instead of just doing that I suggest we make all char unsigned chars, the only reason I can think of not to use unsigned is if you happen to need a counter from -128 to 128, but we don't use anything like that so unsigned shouldn't hurt other than in cases where some string functions might not like it, but we can address that as we come to it. The only problem that I forsee is when you use unicode (in a hacked manner) you have only 16 chars for a nick because each letter is two bytes, I don't see any way around this other than completely implimenting wide chars, which I think is a ways off.

Anyone have any suggestions/ideas on this? I think it is great, it will help Unreal be more globalized.


2002-08-31 17:32

reporter   ~0000453

Last edited: 2002-09-08 17:53

i also looking for hebrew support for my network.. stupied users that enter from java want to using hebrew nicks, and also users from the server.

it can very helpful.. that you can config your local ascii in the conifg file..
also if it work of spoof we be great..

so i support this, and i will be happy if unreal will allow local's supporting..

edited on: 09-08 17:53


2002-09-08 14:49

reporter   ~0000475

This idea is great. Codemastr, is this patch going to make its way into the official Unreal distribution? :)
From my point of view, iso-8859-1 (aka latin-1) would be enough, although the idea of unicode nicks sounds intriguing. I could use any word in esperanto as my nick! :)


2002-09-15 08:01

reporter   ~0000498

i have a q..
how can i using that patch? :-))

i want to try to work with hebrew nick..
someone tell my to insert all the patch to file "loacalnick.c"
and write
patch < localnick.c

i do it, and enter the "local.." to set in the Conf
and get "local - no such..."

someone? :-()


2002-12-09 10:23

reporter   ~0000806

to codemastr:
what u have reference to unicode is UTF-16, it's 16bits, ircd should use UTF-8 for backward-compatibility(BackCompact)


2004-10-11 01:10

reporter   ~0007947

sorry to ask question here.
but i see only:
"Relationship added related to 0002070"
none is appears IN
"- Relationships" (above Uploaded File)
only privileged operater can see it?


2004-10-11 15:46

administrator   ~0007960

Correct, I'm using another private bugid for this item (for 3.2.3).
Unfortunately mantis hides the relationship stuff in one place, but shows it in another ;).


2005-11-11 02:31

reporter   ~0010692

Erm, I'd say this is done too?


2005-11-11 09:24

administrator   ~0010707

Last edited: 2005-11-11 09:24

let's just say we did :P.

Issue History

Date Modified Username Field Change
2004-10-08 04:02 syzop Relationship added related to 0002070
2004-10-10 22:44 syzop Relationship deleted related to 0002070
2004-10-10 22:45 syzop Relationship added related to 0002070
2004-10-11 01:10 Xuefer Note Added: 0007947
2004-10-11 15:46 syzop Note Added: 0007960
2004-10-11 15:46 syzop Priority high => normal
2004-10-11 15:46 syzop Status feedback => confirmed
2005-11-11 02:31 w00t Note Added: 0010692
2005-11-11 09:24 syzop Status confirmed => closed
2005-11-11 09:24 syzop Note Added: 0010707
2005-11-11 09:24 syzop Resolution open => duplicate