This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Add on and off trigger to script

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
D
DeFirence
Voice
Posts: 8
Joined: Tue Oct 31, 2006 2:58 am

Add on and off trigger to script

Post by DeFirence »

Hi,

I need to add !msgon and !msgoff triggers to this script so that halfops and above can use it. I hav looked on your forums and around other eggdrop sites. please could you help.

Code: Select all

### SETTINGS ###

# Channels where the msg is sent to.
# If you want to use several channels put a space between them
set channels "#chan1 #chan2"

# How often do you want the msg to be displayed (in minutes)
set minutes 15

# Set your msgs here
# \002 bold
# \003 colour (ex: \0030,12 textcolor=0 white; backgroundcolor=12 blue)
# \022 reverse
# \037 underline
# Write several lines for several msgs
set msgs {
"\002Line1"
"\037Line2"
}


### YOU ARE DONE NOW. YOU DON'T NEED TO EDIT ANYTHING ELSE FROM HERE ###

if {![info exists sendtext_running]} {
 timer $minutes sendtext
 set sendtext_running 1
}
   
proc sendtext {} {
 global channels minutes msgs
 foreach channel $channels {
  foreach msg $msgs {
   putserv "PRIVMSG $channel :$msg" 
  }
 }
 timer $minutes sendtext
 return 1  
}
Thanks alot

DeFirence
GT-Radio Staff
http://www.gt-radio.co.za
Post Reply