View Single Post
Old 06-24-2003, 08:06 PM  
Superblue
Member
 
Join Date: May 2003
Posts: 78
Default

alright there is a problem with using the cd part.. at the end of the command you have to cd back to the sitebot directory or it loses track of all its msg files and stuff because it stays localized in the system directory.... here is the complete proc

(remember that the final cd command which is sitebot for me may be different for you)

it wraps funny but you get the idea..

################################################## ###############################
# POST UNDUPE #
################################################## ###############################
proc proc_undupe { nick uhost hand chan arg } {
global binary disable location
if { $disable(UNDUPE) == 0 } {
cd "../system"
set result [exec $binary(UNDUPE) $arg]
set result [split $result \n]
set result [lreplace $result 0 1]
set result [lreplace $result end-1 end]
foreach line [split $result "\n"] {
if { [lindex $line 1] == "" } {
putserv "PRIVMSG $chan :\[ \002UNDUPE\002 \] $arg - Not Found DupeDB."
} else {
putserv "PRIVMSG $chan :\[ \002UNDUPE\002 \] [lindex $line 1]" }
}
cd "../sitebot"}
}
Superblue is offline   Reply With Quote