would this work?
Code: Select all
# check for netsplit rejoin then reset topic after 30 minutes
bind rejn - * netsplit:topicpop
proc netsplit:topicpop {nick host handle channel} {
if { $channel == "#moonunittesting"} {
puthelp "PRIVMSG MoonUnit : netsplit rejoin triggered"
timer 30 { set TOTF "./TOTopicfile.txt"
set TOfile [open $TOTF "r"]
fconfigure $TOfile -encoding binary
set oldtopic [read -nonewline $TOfile]
if {[botisop #moonunittesting]} {
putserv "TOPIC #moonunittesting :Resyncing topic.."
putserv "TOPIC #moonunittesting :$oldtopic"
}
close $TOfile
}}}