To be honest I thought this would only be a couple of lines of code and was hoping to get away with out having to learn TCl (at least leave it till I get some time), so I have been scanning scripts and these forums for correct syntax. Below is what i have come up with so far;
Code: Select all
# Get list of current online usernames
set my_chan "#accounts"
set my_nick "Sikes"
# Need this to be a timer every 3(?) minutes
# timer 180 [puts $my_file [chanlist $my_chan]]
# Try a bind to get imediate output
bind pubm - !writelist pubm:write_chanlist
# Open,write to, and close file
proc pubm:write_chanlist {my_chan my_nick} {
set my_file [open onchan.chanlist w]
puts $my_file [chanlist $my_chan]
putserv "PRIVMSG $my_nick :Done"
# try to get output from chanlist
putserv "PRIVMSG $my_nick :$chanlist"
close $my_file
}
Code: Select all
set my_file onchan.chanlist
open $my_file w
puts $my_file [chanlist $my_chan]
close $my_file
Thanks