Away System

By anthalus on Nov 26, 2005

This away system logs all mentions of your nick, all queries, in an @window. It provides your away message for queries and ctcps. Fairly basic stuff, but it works for me.

;=================;
; Logging Scripts ;
;   By Anthalus   ;
;=================;

;===Away Message Logger===;

on *:OPEN:?: {
  if ($away) {
    if ( %log.onoff == OFF ) {
      .msg $nick $color(Notice) AWAY $awaymsg $awaytime
      .close -m $nick
      return
    }
    else {
      if (!$window(@AwayLOG)) { 
        .window -axz +et @AwayLOG -1 -1 500 100 
      }
      .aline -hp @AwayLOG 7 $fulldate14  $nick15 $strip($1-) 
      .msg $nick $color(Notice) AWAY $awaymsg $awaytime
      .close -m $nick  
      goto end 
    }
  }
  else {
    return
  }
  :end
}

ctcp *:*:*: {
  if ($away) {
    if ( %log.onoff == OFF ) {
      return
    }
    else {
      if (!$window(@AwayLOG)) { 
        .window -axz +et @AwayLOG -1 -1 500 100 
      }
      .aline -hp @AwayLOG 7 $fulldate14 $nick4 CTCP15 $strip($1-)   
    }
  }
  else {
    return
  }
}

on *:TEXT:*:*: {
  if (!$away) { 
    return 
  }
  elseif ( %log.onoff == OFF ) {
    return
  }
  else {
    if ( $me isin $1- ) {
      am.awayment $nick $chan $1-
    }
  }
}

on *:ACTION:*:*: {
  if (!$away) { 
    return
  }
  elseif ( %log.onoff == OFF ) {
    return
  }
  else {
    if ( $me isin $1- ) {
      am.awayment $nick $chan $1-
    }
  }
}

alias awaylog.clear {
  if (!$window(@AwayLOG)) {
    .echo 8 -a No Messages to Clear
    return
  }
  else {
    .clear @AwayLOG
    .echo 8 -a Messages Cleared!
    .window -c @AwayLOG
  }
}

alias away.control {
  if ( %away.onoff == ON ) {
    if (!$window(@AwayLOG)) { 
      .window -axz +et @AwayLOG -1 -1 500 100 
    }
    return ON : MSG or CTCP $me  
  }
  else {
    return OFF
  }
}

alias am.awayment {
  var %nick = $1
  var %chan = $2
  var %else = $strip($3-)
  if (!$window(@AwayLOG)) {
    .window -axz +et @AwayLOG -1 -1 500 100 
  }
  .aline -hp @AwayLOG 7 $fulldate 14 Mentioned by %nick in %chan :: %else   
}

menu * {
  -
  Messages ( $+ $line(@AwayLOG,0,0) $+ )
  -
  Away Logger
  .On:/set %log.onoff ON
  .Off:/set %log.onoff OFF
  .Clear Log:$away.logclear
  -
}

Comments

Sign in to comment.
Lindrian   -  Oct 04, 2007

Its not really multi server.
using if ($away) will not determine the server he was pmed on, but the active one.
if ($scid($cid).away) {
would be more correct
/help Multi-Server

 Respond  
Cloudsie   -  Oct 04, 2007

I like the fact it\'s multi server.

 Respond  
Cloudsie   -  Oct 04, 2007

A usful script. :)

 Respond  
anthalus   -  Nov 30, 2005

Thanks Corne! I knew that something did not look right when I posted it, but I could not see it.

Updated

 Respond  
Corne   -  Nov 27, 2005

And in the alias am.awayment you setted wrong the %nick and %chan variables, you should switch them :P

 Respond  
Corne   -  Nov 27, 2005

It should be be: on :text::: and on :action::: instead of on :text:: and on :action::

 Respond  
RoninWarrior   -  Nov 27, 2005

scruffy you would have to still use your away snippet with this unless you planned on useing the standard mIRC away and back popups this is just a away message logger not an away system

 Respond  
RoninWarrior   -  Nov 27, 2005

this is a nice away logger it would be even better if it had its own away msg and auto away options also nice work anthalus

 Respond  
Scruffy   -  Nov 26, 2005

Hey its very useful! I like it and i wont be using my away snippet anymore...

 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.