if (is_member || is_visible) {
if (str[strlen(str) - 1] != ':')
strlcat(str, " ", sizeof(str));
- if (Client_Cap(cl) & CLIENT_CAP_MULTI_PREFIX) {
- if (strchr(Channel_UserModes(Chan, cl), 'o') &&
- strchr(Channel_UserModes(Chan, cl), 'v'))
- strlcat(str, "@+", sizeof(str));
+ if (Client_Cap(Client) & CLIENT_CAP_MULTI_PREFIX &&
+ strchr(Channel_UserModes(Chan, cl), 'o') &&
+ strchr(Channel_UserModes(Chan, cl), 'v')) {
+ strlcat(str, "@+", sizeof(str));
} else {
if (strchr(Channel_UserModes(Chan, cl), 'o'))
strlcat(str, "@", sizeof(str));
Client_ID(Client),
Req->command);
- /* User name: only alphanumeric characters are allowed! */
+ /* User name: only alphanumeric characters and limited
+ punctuation is allowed.*/
ptr = Req->argv[0];
while (*ptr) {
if ((*ptr < '0' || *ptr > '9') &&
(*ptr < 'A' || *ptr > 'Z') &&
- (*ptr < 'a' || *ptr > 'z')) {
+ (*ptr < 'a' || *ptr > 'z') &&
+ (*ptr != '+') && (*ptr != '-') &&
+ (*ptr != '.') && (*ptr != '_')) {
Conn_Close(Client_Conn(Client), NULL,
"Invalid user name", true);
return DISCONNECTED;