Jethro commented on a Page, Multi-user Away System  -  Jan 25, 2011

Nonborn, there is no # in the quit event. You can combine all the text events into one:

on 1:quit:delete
on 1:part:#:delete
alias -l delete {
  if ($read(awaynames.txt,s,$nick) != $null) {
    write -ds $+ $nick awaynames.txt
  }
}
on *:text:*:#:{
  tokenize 32 $strip($1-)
  if ($regex($1,/^!?\b(brb|amsg)\b/i)) {
    if ($regml(1) = brb) {
      var %check = $read(awaynames.txt, s, $nick)
      if ($null != %check) notice $nick You're already recorded as being away.
      elseif ($2- = $null) {
        write awaynames.txt $nick - None.
        notice $nick You have been marked as away.
      }
      else {  
        write awaynames.txt $nick - $2-
        notice $nick You have been marked as away.
      }
    }
    else {
      var %check = $read(awaynames.txt,s,$$2)
      if ($$2 ison $chan) {
        if ($null != %check) notice $nick  $+ $$2 $+  $+ : %check
        else notice $nick  $+ $$2 isn't recorded as being away
      }
      else notice $nick That person is not in this room.
    }
  }
  else {
    var %check = $read(awaynames.txt,s,$nick)
    if ($null < %check) {   
      msg #  $+ $nick $+  is back from: %check
      write -ds $nick awaynames.txt
    }
  }
}
 Respond  
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.