Code: Select all
proc whois { nick uhost hand chan arg }
global color1 color2 bd_user bd_pass bd_host bd_dbase bd_table
set bd [::mysql::connect -host $bd_host -user $bd_user -password $bd_pass]
if { $login_ok == 1 } {
set sd [::mysql::whois $db "SELECT username, level FROM $db_table" -list]
foreach wl $sd {
if { $wl != "" } {
set wl_split [split $wl]
set user_name [lindex $wl_split 0]
set user_level [lindex $wl_split 2]
putquick "privmsg $chan :$color1 $n $color2$color1 Info level $user_level $color2"
}
if { $login_ok == 0 } {
putquick "privmsg $chan :$color1 dont cry. $color2"
Code: Select all
[12:02] wrong # args: should be "proc name args body"
while executing
"proc whois { nick uhost hand arg }"
(file "scripts/test.tcl" line 12)