Jump to content

auto-away


Rhys

Recommended Posts

is there a way for mirc to do something a certain file is opened? like on *:join but for when a certain file is opened?

i want to make a script that will put me as away automatically when i open up counter strike. this possible?

 

also, how do auto away scripts work? the ones where they put you away after 30 minutes of idling? would it be something to do with the $mouse.x and $mouse.y identifiers?

Link to comment
Share on other sites

yeah here you go :)

alias away.set { set %afktag $$?=\"Away Tag?\" }

alias away {
set %no.ame
if (%afktag == $null) {
  set %afktag $$?=\"Away Tag?\"
}
if (%idle == 0) || (%idle == $null) {
  if (!$away) {
    set %nnick $me
    set %bla 1
    set %reason. [ $+ [ $server ] ] $$?=\"Reason?\"
    .away %reason. [ $+ [ $server ] ]
    set %x $chan(0)
    while (%x) {
      if ($istok(%no.ame,$chan(%x),44) == $false) {
        describe $chan(%x) is Away: %reason. [ $+ [ $server ] ]
      }
      dec %x
    }
  }
  else {
    .remove away.ini
    .away
    set %bla 0
    set %x $chan(0)
    while (%x) {
      if ($istok(%no.ame,$chan(%x),44) == $false) {
        describe $chan(%x) was away for: $duration($awaytime), $me is back from: %reason. [ $+ [ $server ] ]
      }
      dec %x
    }
  }
}
else { away %reason. [ $+ [ $server ] ] }
}

alias idle {
if (!$away) {
  set %idle 1
  set %nnick $me
  set %reason. [ $+ [ $server ] ] Auto-Away after 30 mins idle
  away %reason
  set %x $chan(0)
  while (%x) {
    if ($istok(%no.ame,$chan(%x),44) == $false) {
      describe $chan(%x) is Away: %reason. [ $+ [ $server ] ]
    }
    dec %x
  }
  set %idle 0
}
}

ON *:INPUT:*: { .timeridle off | .timeridle 1 1800 { idle } }

 

This is a advanced away system...

Edited by Pugzy
Link to comment
Share on other sites

that will put you as idle if your sitting there doing stuff to mirc, or doing some webdesign and keep checking mirc. thats not very advanced. mouse co-ordinates would be better, because your away if your not using the mouse, right?

 

and anyone have ideas about the opening a certain file it puts me away?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...