Top

auto away message v2.0


mIRC Code
+ 0 likes
Please Register to submit score.
Bookmark and Share
Average Score  1.0 (of 1 scores)
Date Added  Aug 17, 2009
Last Updated  Aug 17, 2009
Tags  alias  channel  message  on  set  text  time  unset  variable 

Introduction

type /gone <message> to turn on script
type /here to turn off script

enjoy simple and effective.

Grab the Code

alias gone {
  set %away 1
  set %time $ctime
  set %reason $1-
  set %nick $me
  /nick $me $+ `afk
  /ame 9Has gone afk Reason: $1-
  /away $1-
}
alias here {
  set %away 2
  /nick %nick
  /ame 9Is Back left: $duration($calc($ctime - %time )) Reason: %reason
  /away 
}
on *:TEXT:*:#:{ if (%away = 1) && ($me isin $1-) { 
    set -u10 %h 1
    .msg # 9is currently away Reason: %reason Time: $duration($calc($ctime - %time ))
  }
  elseif (%away = 1) && (%nick isin $1-) { 
    .msg # 9is currently away Reason: %reason Time: $duration($calc($ctime - %time ))
  }
  elseif (%h !== $null) {
    halt
  }
}
 

Comments

  (6)  RSS
Jethro_
Comments: 438
 
mIRC Snippet:  auto away message v2.0
Posted on Aug 17, 2009 3:16 pm
Master-Of-Death, did you test your script's flood protection? By the look of it, you'll still get flooded. The reason being that the %h variable is set every time when your name is called, and your second elseif statement is redundant. If I were you, my approach would be:
Code:
on *:TEXT:*:#:{ if (%h) { halt }
  elseif ($me isin $1-) && (%away = 1) {
    inc -u10 %h
    .msg # 9is currently away Reason: %reason Time: $duration($calc($ctime - %time ))
  }
}
gooshie
Comments: 67
 
mIRC Snippet:  auto away message v2.0
Posted on Aug 17, 2009 6:55 pm
Code:
alias gone {
  if ($right($me,4) != `afk) { tnick $me $+ `afk }
  ame has gone afk Reason: $$1-
  away $1-
}
alias here {
  if ($away) {
    if ($right($me,4) == `afk) { tnick $left($me,-4) }
    ame is back after: $duration($awaytime) Reason: $awaymsg
    away
  }
}
on *:TEXT:*:#:{
  if (($me isin $1-) || ($mnick isin $1-)) && ($away) && (!%floodnot) {
    inc -u9 %floodnot
    describe # is currently away Reason: $awaymsg Time: $duration($awaytime)
  }
}
Jethro_
Comments: 438
 
mIRC Snippet:  auto away message v2.0
Posted on Aug 17, 2009 8:02 pm
Nice, gooshie. It literally crossed my mind about the use of /tnick command.
Master-Of-Death
Comments: 40
 
mIRC Snippet:  auto away message v2.0
Posted on Aug 18, 2009 3:18 am
what's /tnick ??
Jethro_
Comments: 438
 
mIRC Snippet:  auto away message v2.0
Posted on Aug 18, 2009 3:58 am
/tnick changes your nickname to a temporary nickname, without affecting your main or alternate nicknames.
Master-Of-Death
Comments: 40
 
mIRC Snippet:  auto away message v2.0
Posted on Aug 18, 2009 4:03 am
ooo ty Jethro_

Commenting Options

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

  
Bottom