From: Egor Date: Wed, 11 May 2022 14:37:20 +0000 (+0300) Subject: switch to ascii casemapping X-Git-Url: https://git.patchysicp.xyz/?a=commitdiff_plain;h=668315ec206d994572aece41115f79e2ec0f0799;p=patchyircd.git switch to ascii casemapping --- diff --git a/ircfmt.c b/ircfmt.c index 2bb239b..ebf4a0a 100644 --- 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 --- 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++; }