Posted to tcl by rmax at Mon Jul 03 11:26:07 GMT 2023view raw

  1. $cn registerevent 433 {
  2. # ERR_NICKNAMEINUSE
  3. set nick_base [string trimright $::client::nick 0123456789]
  4. if { [lindex [additional] 0] == $::client::nick } {
  5. cmd-send "NICK $nick_base[string range [expr rand()] end-2 end]"
  6. }
  7. if {$nick_base != $::client::nick} {
  8. after 20000 [list cmd-send "NICK $nick_base"]
  9. }
  10. }
  11.