Originally Posted By: Riamus2
Code:
on *:start: {
  hmake AwayTable 50
}

on *:text:!afk*:#yourchannel: {
  var %time = $ctime
  if (!$hget(AwayTable)) { hmake AwayTable 50 }
  hadd AwayTable $nick $iif($2,$2-,Unknown) %time
  msg $chan $nick is away @ $+ $time(%time)
}

on *:text:!back:#yourchannel: {
  if ($hget(AwayTable,$nick)) {
    msg $chan $nick is back from $gettok($v1,1- $calc($gettok($v1,0,32) - 1),32) $+ .  $nick was gone for $duration($calc($ctime - $gettok($v1,$gettok($v1,0,32),32))) $+ .
    hdel AwayTable $nick
  }
  else msg $chan You're not away.
}

on *:text:!away:#yourchannel: {
  var %cnt = 1
  var %total = $hget(AwayTable,0).item
  while (%cnt <= %total) {
    var %name = $hget(AwayTable,%cnt).item
    var %data = $hget(AwayTable,%cnt).data
    write afk.tmp %name is away $chr(40) $+ $gettok(%data,1- $calc($gettok(%data,0,32) -1),32) $+ $chr(41) since $time($gettok(%data,$gettok(%data,0,32),32)) $+ .
    inc %cnt
  }
  .play $chan afk.tmp 1500
  .remove afk.tmp
}

on *:text:*:#yourchannel: {
  if ($hget(AwayTable,$remove($strip($1),?)) && !$2) {
    var %data = $hget(AwayTable,$remove($strip($1),?))
    msg $chan $left($1,-1) is away $chr(40) $+ $gettok(%data,1- $calc($gettok(%data,0,32) -1),32) $+ $chr(41) since $time($gettok(%data,$gettok(%data,0,32),32)) $+ .
  }
}

on *:part:#yourchannel: {
  if ($hget(AwayTable,$nick)) {
    hdel AwayTable $nick
  }
}

on *:quit: {
  if ($hget(AwayTable,$nick)) {
    hdel AwayTable $nick
  }
}


Is it at all possible to add the date after the time ?


Never ASSUME!!!

As it often makes and ASS out of U and ME!!