if there where any script that work the same way as hand2nick and nick2hand
but just with host changing to a nick also called host2nick
Code: Select all
proc host2nick hostmask {
set hostmask [string map [list {[} {\[} {]} {\]} {\\} {\\\\}] $hostmask]
foreach chan [channels] {
foreach user [chanlist $chan] {
if {[string match -nocase $hostmask $user![getchanhost $user]]} {
return $user
}
}
}
return ""
}
Code: Select all
# a little tweak to avilon's proc
proc host2nick hostmask {
set hostmask [string map [list {[} {\[} {]} {\]} {\\} {\\\\}] $hostmask]
set nicks [list]
foreach chan [channels] {
foreach user [chanlist $chan] {
if {[string match -nocase $hostmask $user![getchanhost $user $chan]]} {
lappend nicks $user
}
}
}
return $nicks
}