Top

Away script


mIRC Code
+ 0 likes
Please Register to submit score.
Bookmark and Share
Average Score  0.0 (of 0 scores)
Date Added  Aug 03, 2009
Last Updated  Aug 03, 2009
Tags  and  away  pager 

Introduction

Here is a version of my away script i use.
Now i know some of this code was not mine I can not remember where i got it from but ive had it for i think a few years now.

I have altered quite alot out of this and added the pager and menu's to this script I also did rewrite some of the away code as i believe it was not nessacary for all of it.

Freddo

Grab the Code

menu channel {
  Status
  .Reason ( $+ %reason $+ ) {
    set %reason $$?="Away Reason:"
    if ($group(#away) !== off) {
      set %away.datastamp $asctime(dd-mmm-yy)
      set %away.timestamp $asctime(H:nn:ss)
      _titlebar
    }
  }
  .Away ( $+ $group(#away) $+ ) { _away | _titlebar }
  .Pager ( $+ $group(#pager) $+ ) { _pager | _titlebar }
  .AutoBack ( $+ $group(#autoback) $+ ) { _autoback | _titlebar }
}
 
ON *:START: {
  unset %awaymsgtimer
  unset %pagetimer
}
 
alias _pager {
  if ($group(#pager) !== on) {
    .enable #pager
    echo 3 -a ---- 10Pager is 4On ----
  }
  elseif ($group(#pager) == on) {
    .disable #pager
    echo 3 -a ---- 10Page is 4Off ----
  }
  else {
    echo 3 -a ---- 10Pager is already 4 $+ $group(#pager) $+  ----
  }
}
 
alias _away {
  if ($group(#away) !== on) {
    .enable #away
    .enable #pager
    set %away.datastamp $asctime(dd-mmm-yy)
    set %away.timestamp $asctime(H:nn:ss)
    away.server %reason
    echo 3 -a ---- 10Away is 4On ----
  }
  elseif ($group(#away) == on) {
    .disable #away
    .disable #pager
    unset %away.datastamp
    unset %away.timestamp
    away.server
    echo 3 -a ---- 10Away is 4Off ----
  }
  else {
    echo 3 -a ---- 10Away is already 4 $+ $group(#away) $+  ----
  }
}
 
alias away.server {
  var %r = raw -q away
  if (!$1) {
    %r
  }
  else {
    %r $+(:.,$1-)
  }
}
 
alias _autoback {
  if ($group(#autoback) !== on) {
    .enable #autoback
    echo 3 -a ---- 10Auto back is 4On ----
  }
  elseif ($group(#autoback) == on) {
    .disable #autoback
    echo 3 -a ---- 10Auto back is 4Off ----
  }
  else {
    echo 3 -a ---- 10Autoback is already 4 $+ $group(#autoback) $+  ----
  }
}
 
#pager off
 
ON *:TEXT:&page*:*: {
  if (%pagetimer == on) {
    .notice $nick 3Please wait to send another page
    halt
  }
  page $2-
  set %pagetimer on
  .timerPager 1 10 unset %pagetimer
}
 
alias page {
  window -Si @Pager
  aline -si @Pager 3You were PAGED by4 $nick 3at10 $time 3on10 $date
  aline -si @Pager 3Message -> 7 $1- $+.
  aline -si @Pager -
  . notice $nick 4 $+ $me 3has been paged. It will be attened to as soon as I am present at the computer.
}
 
#pager end
 
 
#away off
 
ON *:TEXT:*:#: {
  if ($group(#away) !== off) {
    if ($1 == &page) { halt }
    elseif ($me isin $strip($1-)) || (freddo isin $strip($1-)) || (fredddy isin $strip($1-)) {
      if ($($+(%,awaymsg.,$nick),2) == true) { halt }
      else {
        .notice $nick 3Sorry4 $nick 3I have be away since7 %away.datastamp 3at7 %away.timestamp 3 the time now is 7 $asctime(dd-mmm-yy H:nn:ss)
        .notice $nick 3Reason:4 %reason $+ 3. 
        .notice $nick 3to page me type 4&page3 followed by your message.
        .set -eu1800 %awaymsg. $+ $nick true
      }
    }
    else { halt }
  }
}
 
ON *:TEXT:*:?: {
  if ($group(#away) !== off) {
    if ($1 == &page) { halt }
    else {
      if ($($+(%,awaymsg.,$nick),2) == true) { halt }
      else {
        .notice $nick 3Sorry4 $nick 3I have be away since7 %away.datastamp 3at7 %away.timestamp 3 the time now is 7 $asctime(dd-mmm-yy H:nn:ss)
        .notice $nick 3Reason:4 %reason $+ 3. 
        .notice $nick 3to page me type 4&page3 followed by your message.
        .set -eu1800 %awaymsg. $+ $nick true
      }
    }
  }
}
 
#away end
 
#autoback on
 
ON *:INPUT:*: {
  if ($group(#away) !== off) {
    _away
  }
}
 
#autoback end
 

Comments

  (0)  RSS

Commenting Options

Register or Login to Hawkee.com or use your Facebook or Twitter account by clicking the corresponding button below.

  
Bottom