rendered paste bodyon $*:text:/^[@!](brb|bbl)/Si:#:{
if (%away [ $+ [ $nick ] ] == $null) {
if ($2 == $null) {
set %away [ $+ [ $nick ] ] 1
set %time [ $+ [ $nick ] ] $ctime
msg $chan $+ $nick will be right back. Left at $time $+ .
}
elseif ($2 != $null) {
set %away [ $+ [ $nick ] ] $nick
set %time [ $+ [ $nick ] ] $ctime
set %reason [ $+ [ $nick ] ] $2-
msg $chan $+ $nick will be right back. Left at $time $+ . Reason: $2-
}
}
}
on *:TEXT:*:#: {
if (%away [ $+ [ $nick ] ] == $nick) {
if (%reason [ $+ [ $nick ] ] == $null) {
msg $chan $+ $nick has returned. Gone for: $duration($calc($ctime - %time [ $+ [ $nick ] ]))
}
elseif (%reason [ $+ [ $nick ] ] != $null) {
msg $chan $+ $nick has returned. Gone for: $duration($calc($ctime - %time [ $+ [ $nick ] ])) $+ . Reason: %reason [ $+ [ $nick ] ]
unset %reason [ $+ [ $Nick ] ]
}
unset %time [ $+ [ $Nick ] ]
unset %away [ $+ [ $Nick ] ]
}
}