+Voice/-Voice Timer

By DonCorleone on May 08, 2015

This script for a chatbot give chatters a +voice when they type, as they say 15 minutes nothing the +voice get removed automatic.

on *:TEXT:*:#: { 
    if ($me ison $chan)  { 
    if ($regex($nick(#,$nick).pnick,/(!|~|&|@|%)/)) { halt }
    if ( power isin $1- ) || (Nickname isin $nick) { halt }
    else {
    set %devoicechan $chan
    mode # +v $nick
    timerdevoice. [ $+ [ $nick ] ] $+ . [ $+ [ $chan ] ] 1 900 mode # -v %devoice. $+ $nick | unset %devoice. $+ $nick
    }
  }
}

on *:nick: { if $me ison %devoicechan && $newnick isvoice $v2 {
    timerdevoice. [ $+ [ $v1 ] ] 1 900 .mode $v2 -v $v1
  }
}

on *:ACTION:*:#:  { 
    if ($me ison $chan)  { 
    if ($regex($nick(#,$nick).pnick,/(!|~|&|@|%)/)) { halt }
    if ( power isin $1- ) { halt }
    else {
    set %devoicechan $chan
    mode # +v $nick
    timerdevoice. [ $+ [ $nick ] ] $+ . [ $+ [ $chan ] ] 1 900 mode # -v %devoice. $+ $nick | unset %devoice. $+ $nick
    }
  }
}

Comments

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.