mIRC Home    About    Download    Register    News    Help

Print Thread
Page 2 of 2 1 2
Joined: Nov 2006
Posts: 1,559
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559
You may modify the update delay, it's the 60 (60 seconds) in this line (chose a multiple of 60, like 180 (=3mins)):
Code:
.timer.awaywithtime 0 60 away $(%awaywithtime.msg,0) - duration: $!awaywithtime.duration

In the screenshot above you're on MindForge, which should allow more than one away reason per minute.

To hide the additional/repetitive display of your away status in your status window: if you only get the default message "You have been marked as being away" add this line to the script:
Code:
raw 306:*: if (%awaywithtime.msg) { haltdef }

If it's another message you see (for example part of your theme), you have to find and modify the respecitve "raw 306" line in your script.

Last edited by Horstl; 17/01/09 04:13 PM.
Joined: Jan 2009
Posts: 15
I
Pikka bird
OP Offline
Pikka bird
I
Joined: Jan 2009
Posts: 15
copy paste the code of Horstl above, that what i have and a clean mirc 6.35

Joined: Nov 2006
Posts: 1,559
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559
If a bigger update interval does not solve the "flood" issue, you're short of luck - networks limiting the number of away reasons render this script useless.

Joined: Jun 2007
Posts: 933
5
Hoopy frood
Offline
Hoopy frood
5
Joined: Jun 2007
Posts: 933
Originally Posted By: MTec007
can you copy all your code for this script here, something is not working right

It's working perfectly normal, since his away message is updated every minute to show his away duration. See the /timer in Horstl's script.
Apparently that network doesn't like people setting a new /away message that often, so it will have to be changed to update less often.

Joined: Jan 2009
Posts: 15
I
Pikka bird
OP Offline
Pikka bird
I
Joined: Jan 2009
Posts: 15
yes, now work fine, big thanks to Horstl you improve my simple away even more better than before, you did the right what i'm looking for duration on whois, i was without a hope. Plus i want to thank every one that posted code, idea, suggestion on this thread god bliss you all.

Horstl, i'm doing intervals every 10min is more constant then every one or three minutes.

thanks a lot!

Last edited by idealife; 17/01/09 04:32 PM.
Joined: Jan 2009
Posts: 15
I
Pikka bird
OP Offline
Pikka bird
I
Joined: Jan 2009
Posts: 15
Horstl i'm using your code as away system, but what i saw it have problems with multiservers, can you make it to work for multiservers please?

thank you, and sorry to bump again.

Joined: Nov 2006
Posts: 1,559
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559
I'll have a look at it later.

Joined: Nov 2006
Posts: 1,559
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559
You can now set/remove/change your away status per network (more precisely: per server connection) or at all connections at once. You can choose for each option from "silently" (/echo only) or "with message" (/ame text).
Aways not initiated by the script (hence without the "duration" part added/updated) are taken into account in the popups menu (current away status/-time/-message) and in the channel messages. If you "change" the away reason of such an away, it will become an "away with time".

I did run some tests (non-evaliaton of away reasons in the /scon and /timer commands) - hope I didn't miss something... smile

Code:
; --- "Away with Time" (multiserver version) ---

; ••• MENU •••
menu status,channel,query {
  $iif(($awt.cons),Away with Time $iif($awt.count,$+([,away $iif(($awt.cons > 1),at $awt.count of $awt.cons),])))
  .$iif($away,Turn Back,Go Away) on this network $+([,$network,$iif($away,$chr(44) gone $iif($awt.duration,$v1,$duration($awaytime,2))),]))
  ..$iif($away,back,away) with message : $iif($away,awt.back,awt.away)
  ..$iif($away,back,away) silently : $iif($away,awt.back,awt.away) silent
  .$iif($away,Change Away Reason on this network $+([,$network,$chr(44) $iif($awt.reason,$strip($v1),$strip($awaymsg)),]))
  ..change with message : awt.change
  ..change silently : awt.change silent
  .-
  .$iif(($awt.count < $awt.cons),Go Away on all networks $+([away at $v1 of $awt.cons,]))
  ..away with message : awt.away.all
  ..away silently : awt.away.all silent
  .$iif(($awt.count),Turn Back on all networks $+([away at $v1 of $awt.cons,]))
  ..back with message : awt.back.all
  ..back silently : awt.back.all silent
  .$iif($away && ($awt.count > 1),Change Away Reason on all networks $+([away at $v1 of $awt.cons,])))
  ..change with message : awt.change.all
  ..change silently : awt.change.all silent
}

; ••• EVENTS •••
; "you're back"
raw 305:*: { awt.unset } 

; "you're now away" 
raw 306:*: if ($awt.reason) { haltdef }

on *:disconnect: { awt.unset }

; ••• ALIASES •••
; set the update delay here (N in seconds)
alias -l awt.delay { return 120 }

; go away on "current" network
alias -l awt.away {
  away $$input(Enter away reason:,qeg,Set Away $iif(($1 == silent),Silently) on $network)
  if ($1 == silent) { echo -agc info * You're now away. $+([,$!,$chr(15),]) } 
  else { ame ladies and gentlemen! have to go now... see you soon $+([,$!,$chr(15),]) }
  set -e $+(%,awt.msg.,$cid) $!
  set -e $+(%,awt.time.,$cid) $ctime
  $+(.timer.awt.,$cid) 0 $awt.delay away $!awt.reason $chr(15) $+ - duration: $!awt.duration
}

; go away on all networks (overriding previous aways)
alias -l awt.away.all {
  noop $$input(Enter away reasons:,qeg,Set Away $iif(($1 == silent),Silently) on all $awt.cons networks)
  scon -at1 away $($!,0) 
  if ($1 == silent) { echo -agc info * You're now away on all networks. $+([,$!,$chr(15),]) } 
  else { scon -at1 ame ladies and gentlemen! have to go now... see you soon $!+([,$!,$chr(15),]) }
  scon -at1 set -e $($+(%,awt.msg.,$cid),0) $($!,0)
  scon -at1 set -e $($+(%,awt.time.,$cid),0) $ctime
  scon -at1 $!+(.timer.awt.,$cid) 0 $!awt.delay away $!!awt.reason $chr(15) $+ - duration: $!!awt.duration
}

; turn back on "current" network
alias -l awt.back {
  away
  if ($1 == silent) { echo -agc info * You're now back. $+([,$awaymsg,$chr(15),]) }
  else { ame is back from away $+([,$awaymsg,$chr(15),]) }
  awt.unset
}

; turn back on all (away) networks
alias -l awt.back.all {
  if ($1 == silent) { echo -agc info * You're now back on all networks. }
  else { scon -at1 if ($away) ame is back from away $!+([,$awaymsg,$chr(15),]) }
  scon -at1 if ($away) awt.unset
  scon -at1 if ($away) away 
}

; change away reason of "current" network
alias -l awt.change {
  away $$input(Enter new away reason:,qeg,Change Away Reason $iif(($1 == silent),Silently) on $network,$awt.reason) $&
    $iif(($awt.duration),$chr(15) $+ - duration: $awt.duration)
  if ($1 == silent) { echo -agc info * Away reason changed. $+([,$!,$chr(15),]) }
  else { ame is away: $+([,$!,$chr(15),]) }
  set -e $+(%,awt.msg.,$cid) $!
  if (!$timer($+(.awt.,$cid))) { 
    set -e $+(%,awt.time.,$cid) $ctime
    $+(.timer.awt.,$cid) 0 $awt.delay away $!awt.reason $chr(15) $+ - duration: $!awt.duration
  }
}

; change away reason of all away networks (overriding previous aways)
alias -l awt.change.all {
  noop $$input(Enter new away reason:,qeg,Change Away Reasons $iif(($1 == silent),Silently) on $awt.count of $awt.cons networks)
  scon -at1 if ($away) away $($!,0) $!iif(($awt.duration),$chr(15) $!+ - duration: $!awt.duration)
  if ($1 == silent) { echo -agc info * Away resons changed on the $awt.count of $awt.cons networks you're away at. $+([,$!,$chr(15),]) }
  else { scon -at1 if ($away) ame is away: $!+([,$!,$chr(15),]) }
  scon -at1 set -e $($+(%,awt.msg.,$cid),0) $($!,0)
  scon -at1 if (!$timer($+(.awt.,$cid))) set -e $($+(%,awt.time.,$cid),0) $ctime
  scon -at1 if (!$timer($+(.awt.,$cid))) $!+(.timer.awt.,$cid) 0 $!awt.delay away $!!awt.reason $chr(15) $+ - duration: $!!awt.duration
}

; stop update and unset stored data (manual back/back via script/disconnect)
alias -l awt.unset { 
  $+(.timer.awt.,$cid) off
  unset $+(%,awt.*.,$cid)
}

; return away reason for "current" connection
alias -l awt.reason { return $($+(%,awt.msg.,$cid),2) }

; return away time for "current" connection (not resetting if changing away reason)
alias -l awt.duration {
  if $($+(%,awt.time.,$cid),2) { return $duration($calc($ctime - $v1),2) }
}

; return total connected connections 
alias -l awt.cons {
  var %n = 0 
  scon -at1 inc % $+ n
  return %n
}

; return total connections you're away at
alias -l awt.count { 
  var %n = 0
  scon -at1 if ($away) inc % $+ n
  return %n
}


Put the desired update interval at:
Code:
alias -l awt.delay { return 120 }

Joined: Nov 2008
Posts: 6
D
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
D
Joined: Nov 2008
Posts: 6
edit: was affraid so :p

Last edited by Def1ant; 21/01/09 06:07 PM.
Joined: Jun 2007
Posts: 933
5
Hoopy frood
Offline
Hoopy frood
5
Joined: Jun 2007
Posts: 933
Originally Posted By: Def1ant
Havent had the time to read this all, but this is client (= person who does the whois) side?

a simple
Code:
/whois $nick $nick
did the trick for me, everyone i whois now (Quakenet) shows their idle time to me.

You should really read what it's all about. :P
Idle time != away time

Joined: Jan 2009
Posts: 15
I
Pikka bird
OP Offline
Pikka bird
I
Joined: Jan 2009
Posts: 15
Horstl, thanks a million for all what you've done, now your code is too perfect for me, more good then this cannot be. I appreciate much and proud to use under your name, Wish you all the best mate.
cheers!

Joined: Jan 2009
Posts: 15
I
Pikka bird
OP Offline
Pikka bird
I
Joined: Jan 2009
Posts: 15
hello Horstl, one more time, i'm sorry again...
want to know what is "noop" because when i try to use both silent & ame away multi server, got this message error: NOOP invalid command away is set anyway, but noop error haven't idea why show error. i was thought it was the peak of good, so sorry to bump again for 2nd time.

Last edited by idealife; 23/01/09 09:14 PM.
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Make sure you're using the latest version of mIRC, as older versions don't have the noop command.
Regretfully I can't remember what version the noop command was added in, but that's the only reason I can think of for that error.

Joined: Jul 2006
Posts: 4,149
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,149
Noop command was added in mIRC 6.17, but it's not a problem of mirc version, rather a script one here.


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Jan 2009
Posts: 15
I
Pikka bird
OP Offline
Pikka bird
I
Joined: Jan 2009
Posts: 15
right, i was using mirc 6.16 that show noop error, i've just try on 6.35 and work fine.
so... ignore my last post. i'will use on latest mirc.

Joined: Jul 2006
Posts: 4,149
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,149
It's better to use the latest version, but note that /.echo -q is the same as /noop.


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Page 2 of 2 1 2

Link Copied to Clipboard