]> PatchyGit - patchyircd.git/commitdiff
switch to ascii casemapping
authorEgor <egor@patchysicp.xyz>
Wed, 11 May 2022 14:37:20 +0000 (17:37 +0300)
committerEgor <egor@patchysicp.xyz>
Wed, 11 May 2022 14:37:20 +0000 (17:37 +0300)
ircfmt.c
util.c

index 2bb239b..ebf4a0a 100644 (file)
--- a/ircfmt.c
+++ b/ircfmt.c
@@ -104,7 +104,7 @@ void rpl_myinfo(struct client_data *client) // 004
 }
 void rpl_isupport(struct client_data *client) // 005
 {
-       copy_strf(&databuf, ":%s 005 %s CASEMAPPING=rfc1459 NICKLEN=%u EXCEPTS=e INVEX=I MAXTARGETS=1 CHANMODES=beI,k,l,Pimnst CHANTYPES=#& PREFIX=(ov)@+ STATUSMSG=@+ :are supported by this server\n", hostname, client->nick, MAX_NICKLEN-1);
+       copy_strf(&databuf, ":%s 005 %s CASEMAPPING=ascii NICKLEN=%u EXCEPTS=e INVEX=I MAXTARGETS=1 CHANMODES=beI,k,l,Pimnst CHANTYPES=#& PREFIX=(ov)@+ STATUSMSG=@+ :are supported by this server\n", hostname, client->nick, MAX_NICKLEN-1);
 
 }
 #if 0
diff --git a/util.c b/util.c
index c293b24..2f9de8b 100644 (file)
--- a/util.c
+++ b/util.c
@@ -63,14 +63,14 @@ void append_strf(struct dynarr *d, const char *s, ...){
 }
 void stringupper(char *s) {
        while (*s) {
-               if (*s >= 'a' && *s <= '~')
+               if (*s >= 'a' && *s <= 'z')
                        *s &= ~0x20;
                s++;
        }
 }
 void stringlower(char *s) {
        while (*s) {
-               if (*s >= 'A' && *s <= '^')
+               if (*s >= 'A' && *s <= 'Z')
                        *s |= 0x20;
                s++;
        }