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
}
}