On Sep 3, 2014, at 12:11 PM, Alexander Barton alex@barton.de wrote:
Hi Marco!
Am 03.09.2014 um 10:11 schrieb Marco Schirrmeister marco@schirrmeister.net:
the username length is set to 20 in the source code. (defines.h CLIENT_USER_LEN) I need to use authentication on our irc server. But unfortunately our user id that we can use is the email address. There is no other shorter uid yet. The email addresses are of course longer then 20 for most of the users.
Do you see a problem of increasing this value to 50? Except that max messages length will be shorter. I mean if I would change it, do other parts of the code need to be changed? Or could there maybe strange problems in whatever cases? I tested it and it works in general, but I still wanted to ask.
ngIRCd uses the full username only for authentication, afterwards the "username" used in IRC is the part up to the "@" character. So I don't expect any problems, I even think that we should increase this limit by default.
If you can or would increase that by default, that would of course be nice. Or maybe configurable in the ngircd.conf.
Ah, and checking the RFCs, I don't see any limit specified there at all …
On the other hand, simply increasing CLIENT_USER_LEN is probably not the right thing to do, because this constant is used in a few other places (for example in the CLIENT structure), which always only see the part in front of the first "@" character and therefore would waste memory. It would be better to use two constants and only increase the new one, which would be used for the CLIENT.orig_user field in src/ngircd/client.h.
Thanks for that info. I will talk with our developers if they can modify and add this.
Thank you Marco