Skip to content
General IRCX

auto-away

A TG007 community discussion started by Rhys.

Discussion 4 posts
Page 1 of 1
Open
Topic #6381 · 4 published posts · 1,466 views

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?

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 Apr 17, 2006 1:23 PM by Pugzy

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?

bump :rolleyes: