Code: Select all
set usern [lindex [split $t] 0]
set userh [nick2hand $usern]
if {([matchattr $userh |f $channel]) || ([matchattr $usern |f $channel])} {
is that || not used correctly?
Code: Select all
set usern [lindex [split $t] 0]
set userh [nick2hand $usern]
if {([matchattr $userh |f $channel]) || ([matchattr $usern |f $channel])} {
Code: Select all
set userh [nick2hand [lindex [split $t] 0]]
if {([matchattr $userh |f $channel]) {
# user is in the userlist as friend
} else {
# ain't
}
Code: Select all
bind pub - ${pubtrig}whois whois:pub
proc whois:pub {n u h c t} {
global channel
set userh [nick2hand [lindex [split $t] 0]]
if {[matchattr $userh |f $channel]} {
puthelp "PRIVMSG $c :\002$userh is\002 \037\002Console\037\002: [getuser $userh XTRA console] \002\037Username\037\002: [getuser $userh XTRA username] \002\037Instruments:\037\002 Guitar-[getuser $userh XTRA Guitar] , Bass-[getuser $userh XTRA Bass] , VoX-[getuser $userh XTRA VoX] , Drums-[getuser $userh XTRA Drums]"
}
}
Code: Select all
bind pub - ${pubtrig}whois whois:pub
proc whois:pub {n u h c t} {
global channel
if {![validuser [lindex [split $t] 0]]} {
set userh [nick2hand [lindex [split $t] 0]]
} else {
set userh [lindex [split $t] 0]
}
if {[matchattr $userh |f $channel]} {
puthelp "PRIVMSG $c :\002$userh is\002 \037\002Console\037\002: [getuser $userh XTRA console] \002\037Username\037\002: [getuser $userh XTRA username] \002\037Instruments:\037\002 Guitar-[getuser $userh XTRA Guitar] , Bass-[getuser $userh XTRA Bass] , VoX-[getuser $userh XTRA VoX] , Drums-[getuser $userh XTRA Drums]"
} else {
puthelp "PRIVMSG $c :Who? ... Never heard of 'em."
}
}