Changes in nick.c [3a27896:9c7ef22]
Legend:
- Unmodified
- Added
- Removed
-
nick.c
r3a27896 r9c7ef22 94 94 95 95 nick_strip(irc, nick); 96 if (set_getbool(&bu->bee->set, " lcnicks")) {96 if (set_getbool(&bu->bee->set, "nick_lowercase")) { 97 97 nick_lc(irc, nick); 98 98 } … … 215 215 if (ok && rets && *rets) { 216 216 nick_strip(irc, rets); 217 218 if (set_getbool(&bu->bee->set, "nick_lowercase")) { 219 nick_lc(irc, rets); 220 } 221 217 222 truncate_utf8(rets, MAX_NICK_LENGTH); 218 223 return rets; … … 288 293 { 289 294 int len = 0; 295 gboolean nick_underscores = irc ? set_getbool(&irc->b->set, "nick_underscores") : FALSE; 290 296 291 297 if (irc && (irc->status & IRC_UTF8_NICKS)) { … … 297 303 n = g_utf8_find_next_char(p, NULL); 298 304 299 if ((c < 0x7f && !(strchr(nick_lc_chars, c) || 300 strchr(nick_uc_chars, c))) || 305 if (nick_underscores && c == ' ') { 306 *p = '_'; 307 p = n; 308 } else if ((c < 0x7f && !(strchr(nick_lc_chars, c) || 309 strchr(nick_uc_chars, c))) || 301 310 !g_unichar_isgraph(c)) { 302 311 strcpy(tmp, n); … … 313 322 314 323 for (i = len = 0; nick[i] && len < MAX_NICK_LENGTH; i++) { 315 if (strchr(nick_lc_chars, nick[i]) || 324 if (nick_underscores && nick[i] == ' ') { 325 nick[len] = '_'; 326 len++; 327 } else if (strchr(nick_lc_chars, nick[i]) || 316 328 strchr(nick_uc_chars, nick[i])) { 317 329 nick[len] = nick[i];
Note: See TracChangeset
for help on using the changeset viewer.