Posted to tcl by rmax at Mon Jul 03 11:00:23 GMT 2023view raw
- --- ijbridge.tcl.orig 2023-07-03 12:57:35.205115845 +0200
- +++ ijbridge.tcl 2023-07-03 12:58:37.493083892 +0200
- @@ -1112,7 +1112,13 @@
- $cn registerevent 433 {
- # ERR_NICKNAMEINUSE
- if { [lindex [additional] 0] == $::client::nick } {
- - cmd-send "NICK [string trimright $::client::nick 0123456789][string range [expr rand()] end-2 end]"
- + set nick_base [string trimright $::client::nick 0123456789]
- + if {$nick_base == $::client::nick} {
- + cmd-send "NICK $nick_base[string range [expr rand()] end-2 end]"
- + after 5000 [list cmd-send "NICK $nick_base"]
- + } else {
- + cmd-send "NICK $nick_base"
- + }
- }
- }