De-Statusizing Away Script

By Siddhant on Dec 28, 2007

An away script which when going away, removes status from all the channels and sets +v.

Usage: /away for going away, and when away, /away to come back.

/*
De-Statusizing Away Script
Written by: Siddhant Sutar
Email: siddhantsutar@yahoo.com
IRC: irc.DuelZone.org/irc.netstable.net
*/

alias away {
  if (%away.status == on) {
    ns identify <password>
    msg $chan I'm now back. I was away for: $+($duration($calc($ctime - %away.time)),.) Reason: %away.reason
    unset %away.*
  }
  if (!%away.status) && ($1-) {
    set %away.status on
    set %away.time $ctime
    set %away.reason $1-
    away $1-
    destatus
    msg $chan I'm now away. Reason: %away.reason    
  }
}

alias destatus {
  var %ccx = 1, %s
  while $comchan($me,%ccx) {
    var %sv1 = $remove($ialchan($me,$v1,1).pnick,$me), %sv1c = $len(%sv1)
    if (%sv1) mode $comchan($me,%ccx) $+(+v,-,$replace(%sv1,~,q,&,a,@,o,%,h)) $str($+($me,$chr(32)),$calc(%sv1c + 1))
    inc %ccx
  }
}

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.