Hi Frollo,

Thanks for this great module, it has really been useful for crocodyl.org. For our site the users are encouraged to enter their full names as their usernames, so it is in the format of "Firstname Lastname". The space in the middle makes the lastname get dropped when the enter the cgiirc chat. Users like "John" will always be asked to create a newnick, because "John" is already taken in IRC.

Is there any way to change the code so that spaces are converted to underscores from the username? Sorry if I missed a previous post dealing with this question, I looked but didn't find the answer.

Thanks!

Comments

crocodyl’s picture

frollo’s picture

Status: Active » Closed (fixed)

i'm not sure how his could be done unless the users register with a name like John_smith, because of how the variables are stored. it might be doable but i am not sure how to do it at the moment. As i think about it i know you can pass a special character like that if you put a %20 in between the names, however it isn't setup to handle this at this time.

crocodyl’s picture

I know that when a user is logged in, their username becomes their chat name : "Username" becomes "Username_"

Could I add more characters after the "_" character so it would become something such as "Username_crocodyl"

This would be an OK workaround for now, and it is highly unlikely that any name with a "_crocodyl" will be reserved in IRC. The only problem I am having now is if a "John Smith" logs into the chat, the "Smith" gets cut off, then of course "John" will always be reserved. Would I edit the cgiirc.module file? I am not seeing where the underscore is added to the end of the username. My plan is to just add a "crocodyl" after the underscore. Would that work?