Bot Away Script V4.5.0 by Roy911
This is a script from my very own bot, RoyServ, Except the fact that I have taken out the dynamic prefix function. Therefore, besides editing the current prefix, (&), notify me before making any changes.
Usage:
This Script MUST be on a bot mIRC. I recommend you stick this into a .mrc file of it's own.
Type &away [Reason here] to change to being away.
Type anything afterwards to change to a back normal status.
/*
Bot Away Script V4.5.0 by Roy911
irc.abxy.org:#Roy911
This is a script from my very own bot, RoyServ, Except the fact that I have taken out the dynamic prefix function. Therefore, besides editing the current prefix, (&), notify me before making any changes.
Usage:
This Script MUST be on a bot mIRC. I recommend you stick this into a .mrc file of it's own.
Type &away [Reason here] to change to being away.
Type anything afterwards to change to a back normal status.
*/
on *:TEXT:*:#: {
var %1 = $strip($1)
var %2 = $strip($2)
var %3 = $strip($3)
if (%away. [ $+ [ $network ] $+ ] . [ $+ [ $nick ] $+ ] .reason) {
var %time = $chr(45) $+ Gone for $duration($calc($ctime - %away. [ $+ [ $network ] $+ ] . [ $+ [ $nick ] $+ ] .time),3)
var %dash = $chr(45)
amsg $nick is 3Back from $qt([ %away. [ $+ [ $network ] $+ ] . [ $+ [ $nick ] $+ ] .reason ]) %time [ $+ [ %dash ] ]
unset %away. [ $+ [ $network ] $+ ] . [ $+ [ $nick ] $+ ] .reason
unset %away. [ $+ [ $network ] $+ ] . [ $+ [ $nick ] $+ ] .time
}
if ($strip($1) == &Away) {
var %reason = Away
if ($2) { var %reason = $2- }
set -e %away. [ $+ [ $network ] $+ ] . [ $+ [ $nick ] $+ ] .reason %reason
set -e %away. [ $+ [ $network ] $+ ] . [ $+ [ $nick ] $+ ] .time $ctime
amsg $nick is 4Away. $chr(40) $+ %reason $+ $chr(41)
}
halt
:error
msg $chan $error
}
on *:NICK: {
if (%away. [ $+ [ $network ] $+ ] . [ $+ [ $nick ] $+ ] .reason) {
set -e %away. [ $+ [ $network ] $+ ] . [ $+ [ $newnick ] $+ ] .reason [ %away. [ $+ [ $network ] $+ ] . [ $+ [ $nick ] $+ ] .reason ]
set -e %away. [ $+ [ $network ] $+ ] . [ $+ [ $newnick ] $+ ] .time [ %away. [ $+ [ $network ] $+ ] . [ $+ [ $nick ] $+ ] .time ]
unset %away. [ $+ [ $network ] $+ ] . [ $+ [ $nick ] $+ ] .reason
unset %away. [ $+ [ $network ] $+ ] . [ $+ [ $nick ] $+ ] .time
}
}
on *:QUIT: {
if (%away. [ $+ [ $network ] $+ ] . [ $+ [ $nick ] $+ ] .reason) {
unset %away. [ $+ [ $network ] $+ ] . [ $+ [ $nick ] $+ ] .reason
unset %away. [ $+ [ $network ] $+ ] . [ $+ [ $nick ] $+ ] .time
}
}
on *:PART: {
if ((%away. [ $+ [ $network ] $+ ] . [ $+ [ $nick ] $+ ] .reason) && ($comchan($nick,0) == 0)) {
unset %away. [ $+ [ $network ] $+ ] . [ $+ [ $nick ] $+ ] .reason
unset %away. [ $+ [ $network ] $+ ] . [ $+ [ $nick ] $+ ] .time
}
}