mIRC Homepage
Posted By: bwr30060 modify away script for multiple servers - 20/05/08 01:21 PM
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.
Posted By: RusselB Re: modify away script for multiple servers - 20/05/08 11:30 PM
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
Posted By: bwr30060 Re: modify away script for multiple servers - 22/05/08 02:17 AM
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.
Posted By: RusselB Re: modify away script for multiple servers - 22/05/08 03:24 AM
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.
Posted By: bwr30060 Re: modify away script for multiple servers - 22/05/08 06:15 PM
Thanks. That works.
© mIRC Discussion Forums