Announcement [use .timer]

By Froggaard on Feb 18, 2014

Very simple announcement script =]

Enjoy =]

on *:text:!add*:#: {
  if ($nick isop #) {
    set %timer_id $2
    set %timer_time. $+ $2 $3
    set %timer_chan. $+ $2 $4
    set %timer_msg. $+ $2 $5-
    notice $nick Just added announcement ID: $2
    notice $nick Time run: $3 secounds
    notice $nick In channel / To nick: $4
    notice $nick Message: $5-
    .timer $+ $2 0 %timer_time. $+ $3 msg %timer_chan. $+ $4 %timer_msg. $+ $5-
  }
}
on *:text:!del*:#: {
  if ($nick isop #) {
    .timer $+ $2 off
    unset %timer_id $2
    unset %timer_time. $+ $2
    unset %timer_chan. $+ $2
    unset %timer_msg. $+ $2
    notice $nick Announcement ID $2 is unset!
  }
}

on *:text:!list*:#: {
  if ($nick isop #) {
    if (%timer_msg.1) { msg $nick Announcement 1 is set! }
    if (%timer_msg.2) { msg $nick Announcement 2 is set! }
    if (%timer_msg.3) { msg $nick Announcement 3 is set! }
    if (%timer_msg.4) { msg $nick Announcement 4 is set! }
  }
}

on *:join:#YOUR_CHANNEL_HERE: {
  if (%timer_msg.1) {
    .timer1 0 %timer_time.1 msg %timer_chan.1 %timer_msg.1
  }
  if (%timer_msg.2) {
    .timer2 0 %timer_time.2 msg %timer_chan.2 %timer_msg.2
  }
  if (%timer_msg.3) {
    .timer3 0 %timer_time.3 msg %timer_chan.3 %timer_msg.3
  }
  if (%timer_msg.4) {
    .timer4 0 %timer_time.4 msg %timer_chan.4 %timer_msg.4  
  }
}

This is to your PopUps =]

Announcment
.Add:/msg # !add $$?="ID" $$?="Seconds(10800=3Hours)" $$?="Channel" $$?="Message"
.Del:/msg # !del $$?="ID"
.List:/msg # !list

Comments

Sign in to comment.
KryptonCnR   -  Feb 18, 2014

I like this script is there any way that when you do !list that it shows the news that you've added?

Froggaard  -  Feb 18, 2014

Try change
if (%timer_msg.1) { msg $nick Announcement 1 is set! }
to
if (%timer_msg.1) { msg $nick Announcement 1 is set! (Message: %timer_msg.1 $+ ) }

It should do it =]

bravo1432  -  Aug 17, 2016

i want the tcl which one announce after 10 minutes each.

Sign in to comment

Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.