So how does the bot know WHO it is talking to if it is a number and how can I use that in a script to make a relay goto that window.(6:57pm) <Asustek> (idx) 12
(6:57pm) <Asustek> Dcc chat connection to 12 was completed
Code: Select all
proc asus_window {who what} {
if {$asus_open} {
putlog "$what"
putdcc $who "$what"
} else {!$asus_open} {
putlog "$what"
}
}
Code: Select all
bind MSG - $asus(cmd) asus_pub_menu
proc asus_pub_menu {nick uhost hand vasus} {
global asus
set asus_pass [lindex $vasus 0]
set asus_noth [string tolower [split lrange $vasus] 1 end]
if {![passwdok $nick $asus_pass]} {
return 0
}
if {![file exists $asus(setupfile)/setup.db]} {
set asus_file [open $asus(setupfile)/setup.db w]
puts $asus_file "0"
close $asus_file
}
set asus_open 1
putserv "PRIVMSG $nick :\001DCC CHAT chat [myip] $asus(port)\001"
}
Code: Select all
proc asus_menu_catch {idx asus_dcc} {
global asus botnick
if {[string tolower [lindex $asus_dcc 0]] == $asus(dcctrig)help} {
putdcc $idx "$asus(logo) Asustek Services v$asus(version) $asus(logo)"
putdcc $idx "-------------------------------------"
putdcc $idx "\002 Help Main \002"
putdcc $idx "$asus(non)"
putdcc $idx " All help files are listed in directors below"
putdcc $idx " Format: \002.help <topic>\002"
}
if {[string tolower [lindex $asus_dcc 0]] == $asus(dcctrig)set} {
if {[string tolower [lindex $asus_dcc 1]] == "info"} {
set asus_info_who [string tolower [lindex asus_dcc 3]]
if {$asus_info_who == ""} {
putdcc $idx "$asus(logo) Syntax: No nick entered for infomation.
}
set asus_file_info [open $asus(setupfile)/$asus_info_who.db r]
gets $asus_file_info asus_ircnick
gets $asus_file_info asus_name
close $asus_file_info
if {[string tolower [lindex $asus_dcc 2]] == "name"} {