I would like to delete a specific file when my bot leaves the channel or get disconnected.
Find below the script i made for it:
Code: Select all
bind evnt - disconnect-server delfile
bind part - * part
bind kick - * kick
bind sign - * signoff
proc part {nick uhost hand chan arg} {
if {![string match -nocase "$chan" "#channel"]} { return 0 }
if {[string equal -nocase $nick "mybotname"] || [string match -nocase "*@hisuhost.com" $uhost]} {
file delete /usr/home/account/eggdrop/logs/help.txt
}
}
proc kick {nick uhost hand chan arg} {
if {![string match -nocase "$chan" "#channel"]} { return 0 }
if {[string equal -nocase $nick "mybotname"] || [string match -nocase "*@hisuhost.com" $uhost]} {
file delete /usr/home/account/eggdrop/logs/help.txt
}
}
proc signoff {nick uhost hand chan arg} {
if {![string match -nocase "$chan" "#channel"]} { return 0 }
if {[string equal -nocase $nick "mybotname"] || [string match -nocase "*@hisuhost.com" $uhost]} {
file delete /usr/home/account/eggdrop/logs/help.txt
}
}
proc delfile disconnect-server {
file delete /usr/home/sparqy/eggdrop/logs/ftpusers.txt
}
Thanks.
Rgds,
Buffy