package require http
bind pub - !mon*1 monday
bind pub - !tue*1 tuesday
bind pub - !wed*1 wednesday
bind pub - !thu*1 thursday
bind pub - !fri*1 friday
bind pub - !sat*1 saturday
bind pub - !sun*1 sunday
proc monday {n u h c t} {
set x [::http::geturl http://lynxfm.com/schedules/bottxt/mon.txt]
foreach e [split [::http::data $x] \n] {puthelp "privmsg $c :$e"}
::http::cleanup $x
}
proc tuesday {n u h c t} {
set x [::http::geturl http://lynxfm.com/schedules/bottxt/tue.txt]
foreach e [split [::http::data $x] \n] {puthelp "privmsg $c :$e"}
::http::cleanup $x
}
proc wednesday {n u h c t} {
set x [::http::geturl http://lynxfm.com/schedules/bottxt/wed.txt]
foreach e [split [::http::data $x] \n] {puthelp "privmsg $c :$e"}
::http::cleanup $x
}
proc thursday {n u h c t} {
set x [::http::geturl http://lynxfm.com/schedules/bottxt/thu.txt]
foreach e [split [::http::data $x] \n] {puthelp "privmsg $c :$e"}
::http::cleanup $x
}
proc friday {n u h c t} {
set x [::http::geturl http://lynxfm.com/schedules/bottxt/fri.txt]
foreach e [split [::http::data $x] \n] {puthelp "privmsg $c :$e"}
::http::cleanup $x
}
proc saturday {n u h c t} {
set x [::http::geturl http://lynxfm.com/schedules/bottxt/sat.txt]
foreach e [split [::http::data $x] \n] {puthelp "privmsg $c :$e"}
::http::cleanup $x
}
proc sunday {n u h c t} {
set x [::http::geturl http://lynxfm.com/schedules/bottxt/sun.txt]
foreach e [split [::http::data $x] \n] {puthelp "privmsg $c :$e"}
::http::cleanup $x
}
but what i also need this to do is know what day it is.. so if i just type !schedule it will know that today is Friday and get the correct txt file.
How would i do this please
Lynxfm wrote:but what i also need this to do is know what day it is.. so if i just type !schedule it will know that today is Friday and get the correct txt file.
How would i do this please