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.
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! Alex