mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: May 2005
Posts: 449
Fjord artisan
OP Offline
Fjord artisan
Joined: May 2005
Posts: 449
I've been out of the loop for awhile with mIRC scripting, so I'm not sure how to do this. I have this away script:
Code:
Alias Away {
  If (!%away.anick) {
    set %away.anick $$?"What Nick do you want to change into when you go away?"
    echo $input(Ok. Now type /awayness again,o,Away)
  }
  If ($away == $true) {
    away
    ame is Back from : ( $+ %away.msg $+ ) Gone For : ( $+ $duration($awaytime) $+ )
    nick %away.bnick
  }
  Else {
    set %away.bnick $me
    set %away.msg $$?"What is your away reason?"
    ame is Away. Reason : ( $+ %away.msg $+ )
    away %away.msg
    nick %away.anick
  }
}


I'd like this to set me away on all servers that I'm connected to. I know that /scon can be tricky and that you need to be careful with how you use it. What would be the best way to make this work on all servers? Thanks.

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Do you want the same information to be used for all networks, or do you want to be able to specify what information is used on a network by network basis?
Do you want the ability to only use it on one network rather than all networks?
You might also want to take a peek at my Simple Away System for Multiple Networks

Joined: May 2005
Posts: 449
Fjord artisan
OP Offline
Fjord artisan
Joined: May 2005
Posts: 449
Thanks. I'll have a closer look at your script to see what it does. I just need something basic. I don't need it to choose one network. Same message to all networks would be fine.

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Code:
Alias Away {
  if $1 == back {
    away
    ame is Back from : ( $+ %away.msg $+ ) Gone For : ( $+ $duration($awaytime) $+ )
    nick %away.bnick
  }
  elseif $1 == away {
    set %away.bnick $me
    ame is Away. Reason : ( $+ %away.msg $+ )
    away %away.msg
    nick %away.anick
  }
  elseif (!%away.anick) || !%away.msg {
    set %away.anick $$?"What Nick do you want to change into when you go away?"
    set %away.msg $$?"What is your away reason?"
  }
  elseif ($away == $true) {    .scon -at1 away back  }
  else {    .scon -at1 away away  }
}


Untested, but based on your initial code.

Joined: May 2005
Posts: 449
Fjord artisan
OP Offline
Fjord artisan
Joined: May 2005
Posts: 449
Thanks. That works.


Link Copied to Clipboard