Code:
/*
You can use "on start" if you chat only on efnet, or never will be on another network's channel "#netradio".
"On connect" would be your choice if you chat at different networks (with similar channel names) simultaneously,
because you can run "online timers" (which start on connect, automatically end on disconnect, and
they trigger on their respective connection only)
*/

on *:start: { 
  ; if the variable %botd_switch is "on", run the botd alias on startup
  if (%botd_switch == on) { botd }
}


/*
Assuming that you chat on efnet only, there's no need for a $network check, and you can use "offline" timers (the -o switch).
Because you call an alias for the messages anyway, the "ison"-check can go to this alias.
Instead of setting a variable, you can pass the "type" of message as parameter to the alias.
You could pass the network, channel name etc as another parameters as well (to allow a setup for different channels / networks).
Atm you don't need this, for all messages go to #netradio
I named the timers to be more uniform, so you can kill them all at once in the menu
*/

alias botd {

  ; MGS daily (call the alias "botd_msg" with the parameter "live")
  if (!$istok(saturday.sunday.friday,$day,46)) { .timer_botd_live -o 20:00 1 1 botd_msg live }

  ; kmgx.com All request (call the alias "botd_msg" with the parameter "kmgx_fri_request")
  if ($day == Friday) { .timer_botd_kmgx_fri_request -o 14:00 1 1 botd_msg kmgx_fri_request }

  ; MGS friday (...)
  if ($day == Friday) { .timer_botd_live_crappy -o 20:00 1 1 botd_msg live_crappy }

  ; Daily Refresh
  ; you can use 05:00 too... just make sure the time you put here is before the time of the "most early" message
  if (!$1) { .timer_botd_refresh -o 05:00 1 60 botd refresh $chr(124) .timer_botd_refresh -o 05:00 1 0 botd }
}


alias botd_msg {
  var %botd_chan = #netradio

  if ($me ison %botd_chan) {

    ; $1 is the first parameter passed to the alias. $2 would be the second parameter and so on
    if ($1 == live) {
      msg %botd_chan <<<< Michael Groff Show starts Now! >>>>
    }
    elseif ($1 == kmgx_fri_request) {
      msg %botd_chan -------- $time(h:nntt) --------
      msg %botd_chan The All Request Zone starts NOW
      msg %botd_chan request a song by typing !request + song
      msg %botd_chan ------------------------
    }
    elseif ($1 == live_crappy) {
      msg %botd_chan <<<< Michael Groff Show starts Now! Ft Crappy Covers tonight >>>
    }
  }
}


/*
this menu definition will switch the variable "%botd_switch".
if you switch to "off", it will kill all timers called "_botd_*"
if you switch to "on", it will run the "botd" alias to start the timers
*/

menu status,menubar {
  -
  Botd Timer $+($chr(91),$iif((%botd_switch == on),enabled,disabled),$chr(93))
  .$iif((%botd_switch == on),$style(1)) enable : { 
    set %botd_switch on
    botd
  }
  .$iif((%botd_switch != on),$style(1)) disable : { 
    set %botd_switch off
    .timer_botd_* off
  }
}

; clean up :)
on *:unload: { 
  .timer_botd_* off
  unset %botd_switch
}
...untested - hope it works at all smile

Last edited by Horstl; 16/05/09 12:15 AM.