Skip to content

Instantly share code, notes, and snippets.

@xatlas
Created November 12, 2017 19:48
Show Gist options
  • Save xatlas/483b198fe99b1b4153173c3b1660a4a9 to your computer and use it in GitHub Desktop.
Save xatlas/483b198fe99b1b4153173c3b1660a4a9 to your computer and use it in GitHub Desktop.
Script para Eggdrop que envía un mensaje aleatorio a un canal determinado
# Cron.tcl v2.1
# Tareas automatizadas
# Atlas, ene 14 - Twitter: @xatlas
set main_chan "#canal"
bind cron - {0 * * * *} cron:publi
proc cron:publi {minute hour day month weekday} {
global main_chan
puthelp "PRIVMSG $main_chan :\002Info:\002 [publi_msg]"
}
proc publi_msg {} {
set cron_randmsg [list \
"Si necesitas ayuda referente al chat visita http://www.chathispano.com/ayuda" \
"Recuerda que esta sala no es de sexo ni tampoco es un tablon de anuncios. Revisa nuestras normas en nuestra web" \
"Aqui va otro mensaje" \
]
return [lindex $cron_randmsg [rand [llength $cron_randmsg]]]
}
putlog "Cargado script de tareas automatizadas (cron)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment