Changeset 90254d0
- Timestamp:
- 2016-12-26T00:18:55Z (8 years ago)
- Branches:
- master
- Children:
- df291a6
- Parents:
- 0483e1e
- git-author:
- dequis <dx@…> (24-12-16 04:56:45)
- git-committer:
- dequis <dx@…> (26-12-16 00:18:55)
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/user-guide/commands.xml
r0483e1e r90254d0 1037 1037 </bitlbee-setting> 1038 1038 1039 <bitlbee-setting name="lcnicks" type="boolean" scope="global">1040 <default>true</default>1041 1042 <description>1043 <para>1044 Hereby you can change whether you want all lower case nick names or leave the case as it intended by your peer.1045 </para>1046 </description>1047 1048 </bitlbee-setting>1049 1050 1039 <bitlbee-setting name="local_display_name" type="boolean" scope="account"> 1051 1040 <default>false</default> … … 1212 1201 </para> 1213 1202 </description> 1203 </bitlbee-setting> 1204 1205 <bitlbee-setting name="nick_lowercase" type="boolean" scope="global"> 1206 <default>true</default> 1207 1208 <description> 1209 <para> 1210 If enabled, all nicknames are turned into lower case. 1211 </para> 1212 1213 <para> 1214 See also the <emphasis>nick_underscores</emphasis> setting. This setting was previously known as <emphasis>lcnicks</emphasis>. 1215 </para> 1216 </description> 1217 1218 </bitlbee-setting> 1219 1220 <bitlbee-setting name="nick_underscores" type="boolean" scope="global"> 1221 <default>true</default> 1222 1223 <description> 1224 <para> 1225 If enabled, spaces in nicknames are turned into underscores instead of being stripped. 1226 </para> 1227 1228 <para> 1229 See also the <emphasis>nick_lowercase</emphasis> setting. 1230 </para> 1231 </description> 1232 1214 1233 </bitlbee-setting> 1215 1234 -
irc.c
r0483e1e r90254d0 113 113 s = set_add(&b->set, "last_version", "0", NULL, irc); 114 114 s->flags |= SET_HIDDEN; 115 s = set_add(&b->set, "lcnicks", "true", set_eval_bool, irc);116 115 s = set_add(&b->set, "nick_format", "%-@nick", NULL, irc); 116 s = set_add(&b->set, "nick_lowercase", "false", set_eval_bool, irc); 117 s = set_add(&b->set, "nick_underscores", "false", set_eval_bool, irc); 117 118 s = set_add(&b->set, "offline_user_quits", "true", set_eval_bool, irc); 118 119 s = set_add(&b->set, "ops", "both", set_eval_irc_channel_ops, irc); -
irc_channel.c
r0483e1e r90254d0 638 638 irc_channel_name_strip(name); 639 639 640 if (set_getbool(&irc->b->set, " lcnicks")) {640 if (set_getbool(&irc->b->set, "nick_lowercase")) { 641 641 nick_lc(irc, name + 1); 642 642 } -
nick.c
r0483e1e r90254d0 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 = set_getbool(&irc->b->set, "nick_underscores"); 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.