irctk

libircclient binding for scripts
git clone https://a3nm.net/git/irctk/
Log | Files | Refs | README

commit 2454ccf17bdd03f232468bdbbdf415eed9acd92f
parent 895e3f5f6b5c8197bcf5a5768f955f47c826181d
Author: Antoine Amarilli <a3nm@a3nm.net>
Date:   Thu,  6 Aug 2015 23:46:32 +0200

more permissive usernames (RFC)

Diffstat:
irctk.c | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/irctk.c b/irctk.c @@ -279,9 +279,9 @@ void initialize_args() void set_username(struct arguments *arguments, char *name) { int opos = 0, ipos = 0; while (name[ipos]) { - if ( (name[ipos] >= 'a' && name[ipos] <= 'z') || - (name[ipos] >= 'A' && name[ipos] <= 'Z') || - (name[ipos] >= '0' && name[ipos] <= '9') ) + // section 2.3.1 of RFC 2812, definition of "user" + if (name[ipos] != 0x0A && name[ipos] != 0x0D + && name[ipos] != 0x20 && name[ipos] != 0x40) arguments->username[opos++] = name[ipos]; ipos++; }