It actually works, I want it to ignore users whose nicknames are the same as ident. It works as long as user has enbled ident, when ident is disabled "~" is placed in a front of it and it doesn't work. I thought string map {~ ""} $user would fix it but it doesn't. Example when, nickname!nickname@host joins bots does nothing, and it should do nothing when nickname!~nickname@host as well. I don't know if string map {~ ""} is correct. I also wonder how could I make bot also do nothing if some part of nick is in ident, exmple
nickname!nicknam@host
...
# it gets IRC ident
set user [lindex [split $uhost "@"] 0]
# if ~ is in ident it should be removed
string map {~ ""} $user
# checking is string is in nick and in ident
if {([string tolower $nick] == [string tolower $user]) || (![regexp "^\[a-zA-Z~\]{[string length $user]}" $user])} { return 0 }
foreach rnn $randomnicks {
if {([string match $rnn $nick]) || ([string match $rnn $user])} {
...
Thanks for any help