You can try this version. I didnt test the script but it has no errors in the code. Yet if you encouter some problems you can reply here and ill modify the code and test it.
bind pub m !xadd x:add
bind notc - * x:notc
proc x:add {nick uhost hand chan arg} {
global temp
set temp(chan) $chan
set temp(user) [lindex [split $arg] 0]
set temp(level) [lindex [split $arg] 1]
if {($temp(user) == "") || ($temp(level) == "")} {putserv "PRIVMSG $chan :4XADD:2 Comanda de folosire este 7» 4!xadd <nick> <nivel> 7«"; return}
putserv "PRIVMSG X :adduser $chan =$temp(user) $temp(level)"
utimer 5 [list x:say $chan $temp(user) $temp(level)]
}
proc x:say {chan user level} {
global temp
if {![info exists temp(stop)]} {
putserv "PRIVMSG $chan :4XADD:2 L-am adaugat pe 7» 04$user 7«2 pe canalul 7» 04$chan 7«2 cu access la X de nivel 7» 04$level 7« "
unset -nocomplain temp(stop)
}
}
proc x:notc {nick uhost hand arg dest} {
global temp
switch -exact -- $nick {
"X" {
if {[string match -nocase "*is already added*" $arg]} {
putserv "PRIVMSG $temp(chan) :\002$temp(user)\002 is already added with X access on \00312$temp(chan)"
set temp(stop) da
}
}
}
}