mirror of
https://github.com/pissnet/pissircd.git
synced 2025-08-16 07:01:35 +01:00
Put arabic-utf8 in the correct group and #if out the hard errror
when mixing UTF8 groups, make it a general warning again as it may or may not be an issue.
This commit is contained in:
parent
c51a3d96be
commit
3feac27c43
1 changed files with 13 additions and 3 deletions
|
@ -73,6 +73,7 @@ char langsinuse[4096];
|
|||
#define LANGAV_CYRILLIC_UTF8 0x008000 /* UTF8: cyrillic script */
|
||||
#define LANGAV_GREEK_UTF8 0x010000 /* UTF8: greek script */
|
||||
#define LANGAV_HEBREW_UTF8 0x020000 /* UTF8: hebrew script */
|
||||
#define LANGAV_ARABIC_UTF8 0x040000 /* UTF8: arabic script */
|
||||
typedef struct LangList LangList;
|
||||
struct LangList
|
||||
{
|
||||
|
@ -84,7 +85,7 @@ struct LangList
|
|||
/* MUST be alphabetized (first column) */
|
||||
static LangList langlist[] = {
|
||||
/* { "arabic", "ara", LANGAV_ASCII|LANGAV_ISO8859_6 }, -- TODO: check if this has issues first! */
|
||||
{ "arabic-utf8", "ara-utf8", LANGAV_ASCII|LANGAV_UTF8|LANGAV_LATIN_UTF8 },
|
||||
{ "arabic-utf8", "ara-utf8", LANGAV_ASCII|LANGAV_UTF8|LANGAV_ARABIC_UTF8 },
|
||||
{ "belarussian-utf8", "blr-utf8", LANGAV_ASCII|LANGAV_UTF8|LANGAV_CYRILLIC_UTF8 },
|
||||
{ "belarussian-w1251", "blr", LANGAV_ASCII|LANGAV_W1251 },
|
||||
{ "catalan", "cat", LANGAV_ASCII|LANGAV_LATIN1 },
|
||||
|
@ -314,6 +315,8 @@ int charsys_config_posttest(int *errs)
|
|||
x++;
|
||||
if (x > 1)
|
||||
{
|
||||
#if 0
|
||||
// I don't think this should be hard error, right? Some combinations may be problematic, but not all.
|
||||
if (langav & LANGAV_LATIN_UTF8)
|
||||
{
|
||||
config_error("ERROR: set::allowed-nickchars: you cannot combine 'latin-utf8' with any other character set");
|
||||
|
@ -334,8 +337,13 @@ int charsys_config_posttest(int *errs)
|
|||
config_error("ERROR: set::allowed-nickchars: you cannot combine 'hebrew-utf8' with any other character set");
|
||||
errors++;
|
||||
}
|
||||
config_status("WARNING: set::allowed-nickchars: "
|
||||
"Mixing of charsets (eg: latin1+latin2) can cause display problems");
|
||||
if (langav & LANGAV_ARABIC_UTF8)
|
||||
{
|
||||
config_error("ERROR: set::allowed-nickchars: you cannot combine 'arabic-utf8' with any other character set");
|
||||
errors++;
|
||||
}
|
||||
#endif
|
||||
config_status("WARNING: set::allowed-nickchars: Mixing of charsets (eg: latin1+latin2) may cause display problems");
|
||||
}
|
||||
|
||||
*errs = errors;
|
||||
|
@ -1264,6 +1272,8 @@ char *charsys_group(int v)
|
|||
return "Greek script";
|
||||
if (v & LANGAV_HEBREW_UTF8)
|
||||
return "Hebrew script";
|
||||
if (v & LANGAV_ARABIC_UTF8)
|
||||
return "Arabic script";
|
||||
|
||||
return "Other";
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue