Top

Simple Away Script


mIRC Code
+ 0 likes
Please Register to submit score.
Bookmark and Share
Average Score  0.0 (of 0 scores)
Date Added  Jan 20, 2009
Last Updated  Jan 21, 2009
Tags  away  back  coding  gone  highlight  mirc  one  response  script  simple  time 

Introduction

Hence the word SIMPLE. That means if you're gonna rape me, be gentle. :p Has a one-time-response to highlight and etc. No logging or dialogs cause I r 2 st00pid 4 tht. Rate and comment pls.

Grab the Code

alias gone {
  if ($away == $true) { echo You're away already stupid l0l | halt }
  set %awaytime $ctime
  set %awaynick $me $+ `Away
  set %backnick $me
  amsg 10[4Away10] 10[7I am now away.10] 10[14Reason:3 $1- 10] 10[5Left at:12 $time $+ 10]
  away $1-
  nick %awaynick 
  if (!$1) {
    set %awaytime $ctime
    set %awaynick $me $+ `Away
    set %backnick $me
    amsg 10[4Away10] 10[7I am now away. 14Reason:3 Dunno l0l10]  10[5Left at:12 $time $+ 10]
    away $1-
    /nick %awaynick
  }
}
alias back {
  if ($away == $false) { echo You're not away stupid... | halt }
  else { amsg 10[4Away10] 10[7I am now back. 10[14Reason for being gone:3 $awaymsg 10] 10[I was gone for $duration($calc($ctime - %awaytime)) $+ 10]
    nick %backnick
    away
    unset %awaytime
    unset %awaynick
    unset %backnick
  }
}
on *:text:$($+(*,$me,*)):#: {
  if ($away == $false) { halt }
  else { notice $nick Sorry $nick $+ , but I'm away at the moment, because of $awaymsg $+ . I've been gone $duration($calc($ctime - %awaytime)) $+ . Please try again later. Thanks.
  }
}
on *:action:$($+(*,$me,*)):#: {
  if ($away == $false) { halt }
  else { notice $nick Sorry $nick $+ , but I'm away at the moment, because of $awaymsg $+ . I've been gone $duration($calc($ctime - %awaytime)) $+ . Please try again later. Thanks.
  }
}
on *:text:*:?: {
  if ($away == $false) { halt } 
  else { msg $nick Sorry $nick $+ , but I'm away at the moment, because of $awaymsg $+ . I've been gone $duration($calc($ctime - %awaytime)) $+ . Please try again later. Thanks. 
  }
}
on *:action:*:?: {
  if ($away == $false) { halt } 
  else { msg $nick Sorry $nick $+ , but I'm away at the moment, because of $awaymsg $+ . I've been gone $duration($calc($ctime - %awaytime)) $+ . Please try again later. Thanks. 
  }
}

Comments

  (4)  RSS
Kirby
Comments: 473
 
mIRC Snippet:  Simple Away Script
Posted on Jan 21, 2009 12:33 am
Not going to criticize you on much but:
Code:
if ($away == $true)
can also be
Code:
if ($away)

same with
Code:
if ($away == $false)
and
Code:
if (!$away)

Code:
    unset %awaytime
    unset %awaynick
    unset %backnick
can be shortened:
Code:
unset %awaytime %awaynick %backnick


There's some unnecessary halts and the script insults you if you make a mistake being afk or not.
Trev
Comments: 12
 
mIRC Snippet:  Simple Away Script
Posted on Jul 4, 2009 1:54 pm
Quote:

Code:

    unset %awaytime
    unset %awaynick
    unset %backnick

can be shortened:
Code:

unset %awaytime %awaynick %backnick



Can be shorter if you set it

Code:

set %away.time
set %away.nick
set %back.nick


and unset it like so:
Code:

unset %away.* %back.*
Jethro_
Comments: 405
 
mIRC Snippet:  Simple Away Script
Posted on Jul 4, 2009 2:34 pm
Trev, wouldn't this be better:
Quote:
set %away.time
set %away.nick
set %away.back


Quote:
unset %away*

Trev
Comments: 12
 
mIRC Snippet:  Simple Away Script
Posted on Jul 4, 2009 6:35 pm
He has more than one back* alias, so I didn't want to change everything.

But, yeah, that would be the idea.

Commenting Options

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

  
Bottom