mIRC Home    About    Download    Register    News    Help

Print Thread
#139455 14/01/06 10:04 PM
Joined: Feb 2005
Posts: 344
B
Fjord artisan
OP Offline
Fjord artisan
B
Joined: Feb 2005
Posts: 344
I have this away system.
But I want it to put me on away on multiple servers.
so somewhere /scid -a should be put down in the script.
Here you see the part that I beleave is for putting in away.
the total script is very bi but if you need more i'll put in here.
thanks for helping me because of all the code and my experience I have no idea where /scid -a should be at.

Code:
  alias awaymode {
  if (Away isin %asawaymode) { asecho Je staat al in afwezig mode }
  else {
    if ($1 == $null) { asecho Gebruik: /awaymode [-sp] <message/preset> | return }
    else {
     if (-p == $1) || (-s == $1) || (-sp == $1) || (-ps == $1) {
      if ($1 == -s) { 
        if ($2) { set %asawaymsg $left($2-,100) }
        else { set %asawaymsg Afwezig }
        set %asawaymode StealthAfwezig
      }
      else {
        if (p isin $1) {
          if ($2 == $null) {
            var %presets = 1
            var %totalpresets $ini($mircdirSysteem\data\awaysys.ini,Presets,0)
            asecho $iif(%totalpresets,Lijst laden....,Er zijn geen voorkeuren ingesteld.) 
            while (%presets <= %totalpresets) {
              var %presetnick = $readini -n $mircdirSysteem\data\awaysys.ini PresetNicks $ini($mircdirSysteem\data\awaysys.ini,Presets,%presets)
              echo -a 04 %presets $+ . $replace($ini($mircdirSysteem\data\awaysys.ini,Presets,%presets),±,$chr(32)) $+ : $ascolorget($asprini(%presets)) $iif(%presetnick,-- 12AfwezigNick:) %presetnick
              inc %presets
            }
            linesep
            return
          }
          if ($asprini($2) == $null) || ($2 !isnum)  { asecho Instelling bestaat niet of is ongeldig! | return }
          set %asawaymsg $ascolorget($asprini($2))
          set %asawaymode $iif(s isin $1,Stealth) $+ Away
        }
       }
       }
        else {
          set %asawaymsg $left($1-,100)
          set %asawaymode Away
        }
      }
      awaystatus.set
      writeawaymsg %asawaymsg
      if ($asrini(awaynick)) { aswini oldnick2 $asrini(awaynick) }
      var %presetnick = $readini -n $mircdirSysteem\data\awaysys.ini PresetNicks $ini($mircdirSysteem\data\awaysys.ini,Presets,$2)
      if (%presetnick) { aswini awaynick $replace(%presetnick,@me,$me) }
      assetaway
      if ($server == $null) { asecho Gezet naar Offline %asawaymode mode (4 $+ %asawaymsg $+ ) - Pager: $awaypager $+ , Log: $awaylogging $+ . Je wordt gezet naar Online %asawaymode als je weer connect. }
    }
  }
alias -l awaypager { if ($asrini(awaypager)) { return aan }
else { return uit } }
alias -l awaylogging { if ($asrini(awaylogging)) { return aan }
else { return uit } }
alias -l awaynotices { if ($asrini(awaynotices)) { return aan }
else { return uit } }
alias -l ascheckini { 
  if ($exists($mircdirSysteem\data\awaysys.ini)) && (%asawaymode) { return $true }
  else { return $false }
}
alias -l asecho { echo $colour(info) -ae *** AwaySystem - $1- }
alias -l asrini { return $readini -n $mircdirSysteem\data\awaysys.ini AwaySystem $1- }
alias -l aswini { writeini -n $mircdirSysteem\data\awaysys.ini AwaySystem $1- | flushini $mircdirSysteem\data\awaysys.ini }
alias -l asrmini { remini $mircdirSysteem\data\awaysys.ini AwaySystem $1- }
alias -l assite { return http://www.geocities.com/mmircs/ }
alias -l ascalc.dev { return $calc($1 / 60) }
alias -l beginasidlechck { if ($asrini(idleaway)) && ($server) { resetidle | .timerIdleAway 0 10 ascheckidle } }
alias -l ascheckidle {  if (%asawaymode == Terug) { if ($idle > $asrini(idleaway)) { .timeridleaway off | asidleawaybox } } }
alias -l asidleawaybox { if ($asrini(disableidledlg)) { asdoidleaway }
else { set %astimeremaining 10 | .timerascountdown 10 1 showastime | dialog -m asidleaway asidleaway } }
alias -l showastime {
  dec %astimeremaining
  if (%astimeremaining == 0) { dialog -x asidleaway | unset %astimeremaining | asdoidleaway | return }
  did -a asidleaway 3 AwaySysteem zal IdleAfwezig mode activeren in %astimeremaining seconden.
}
alias -l asdoidleaway { %asawaymsg = Autoafwezig na $ascalc.dev($asrini(idleaway)) minuten inactiviteit | awaystatus.set | if ($asrini(awaynick)) { aswini oldnick2 $asrini(awaynick) } | set %asawaymode IdleAway | assetaway }
alias -l assetaway.disp { if ($chan(0) > 0) && (%asawaymode != StealthAway) && ($server) { $asgetawaymsg } }
alias -l assetTerug.disp { if ($chan(0) > 0) && (%asawaymode != StealthAway) && ($server) { $asgetTerugmsg } }
alias -l assetaway { 
  .timerIdleAway off
  if ($asrini(awaysystem.log) == 1) { writeaslog  $+ $colour(action) $+ *** Gezet naar %asawaymode Mode @ $astimestamp (4 $+ %asawaymsg $+  $+ $colour(action) $+ ) }
  %asawaytime = $ctime
  if ($server) { away %asawaymsg }
  %asawayclock = $time(HH:nn:ss)
  assetaway.disp
  if (%asawaymode != StealthAway) && ($asrini(awaynick)) { %asoldnick = $me | nick $asnickini }
  doastimer
  if (%asawaymode == StealthAway) && ($server) { asecho  Gezet naar StealthAfwezig Mode (04 $+ %asawaymsg $+ ) AwayPager: $awaypager $+ , AwayLog: $awaylogging }
  if ($asrini(savetbar)) && ($titlebar) && ($asrini(awaytbar)) { aswini savedawaytbar $titlebar }
  if ($timer(Tbar) == $null) && ($asrini(awaytbar)) { .timerTbar -o 0 1 tbar }
  tbar
  asdodeop
  if ($dialog(asconf)) { did -a asconf 304 Je bent nu in afwezig Mode, sommige opties zullen niet worden opgeslagen. | did -b asconf 9,10,14,15,16,17,18,19,36,37,38,39,52,53,46,47,11,48,49,84,54,55,50,51 }
}

#139456 14/01/06 10:52 PM
Joined: Feb 2003
Posts: 3,432
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
use:

/scid -a away away message

same with if you anounce your set away..

/scid -a me is away: reason

That code working for me, all i need is to set me away with:

/scid -a away awayreason

same with back:

/scid -a away

look in your status window, there it says ur away on both server if you use /scid -a smile

Last edited by sparta; 14/01/06 10:54 PM.

if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
#139457 14/01/06 10:55 PM
Joined: Feb 2005
Posts: 344
B
Fjord artisan
OP Offline
Fjord artisan
B
Joined: Feb 2005
Posts: 344
That I know sparta .
Tha thing is that there is so much code I have no idea where to put it.
Call it lack of experience crazy

#139458 14/01/06 11:30 PM
Joined: Mar 2005
Posts: 212
N
Fjord artisan
Offline
Fjord artisan
N
Joined: Mar 2005
Posts: 212
where is in front of whatever u want to be perfromed on all
servers

you wrote this so im gonna figure you have a better idea what does what than i would

Last edited by NeUtRoN_StaR; 14/01/06 11:43 PM.
#139459 15/01/06 12:00 AM
Joined: Feb 2005
Posts: 344
B
Fjord artisan
OP Offline
Fjord artisan
B
Joined: Feb 2005
Posts: 344
3 major headaches and a whole pharmacy but i got it.
The red part is what I had to change.
Code:
   %asawaytime = $ctime
  if ($server) {  [color:red]/scid -a [/color]away %asawaymsg }
  %asawayclock = $time(HH:nn:ss)
  assetaway.disp
  if (%asawaymode != StealthAway) && ($asrini(awaynick)) { %asoldnick = $me | nick $asnickini }
  doastimer
  if (%asawaymode == StealthAway) && ($server) { asecho  Gezet naar StealthAfwezig Mode (04 $+ %asawaymsg $+ ) AwayPager: $awaypager $+ , AwayLog: $awaylogging }
  if ($asrini(savetbar)) && ($titlebar) && ($asrini(awaytbar)) { aswini savedawaytbar $titlebar }
  if ($timer(Tbar) == $null) && ($asrini(awaytbar)) { .timerTbar -o 0 1 tbar }
  tbar
  asdodeop
  if ($dialog(asconf)) { did -a asconf 304 Je bent nu in afwezig Mode, sommige opties zullen niet worden opgeslagen. | did -b asconf 9,10,14,15,16,17,18,19,36,37,38,39,52,53,46,47,11,48,49,84,54,55,50,51 }
}
alias -l assetTerug { 
  %asawayTerug = $ctime
  if ($server == $null) || (%asawaymode == StealthAway) { asecho Gezet Terug Mode - tijd afwezig: $awayduration }   
  if (%asoldnick) && (%asawaymode != StealthAway) { nick %asoldnick }
  if ($timer(Away)) { .timerAway off }
  if ($server) { [color:red]  /scid -a [/color]away | assetTerug.disp }
  set %asawaymode Terug
  awaystatus.compare
 


And neutron no i did not wrote this .... i'm not that good ......yet smile
The credit goes to mudpuddle he or she wrote this in 2000 but it is a very nice script and you can do anything you can think off for a away script.
Welll ......... almost everything.
I'll post the whole script so you can tell what you like or dislike about the code.
Here is the whole script: click

No need to post someone else's very very lengthy script, just makes the page unreadable

Last edited by Mentality; 15/01/06 09:44 AM.
#139460 15/01/06 01:04 AM
Joined: Mar 2005
Posts: 212
N
Fjord artisan
Offline
Fjord artisan
N
Joined: Mar 2005
Posts: 212
who requested that?

#139461 15/01/06 02:44 AM
Joined: Feb 2003
Posts: 3,432
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
LOL.. not even my whole script use as much code as that.. crazy and that much code for a away system? whohoho, i guess i never want to see the rest of that script wink would be like 100 meg to DL? :tongue: wink grin


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
#139462 15/01/06 04:21 AM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
As a little note regarding the original request, If you're going to use /scid -a or /scon -a, I would recommend you also include the t1 switch, which will prevent your script from trying to mark you as away on any servers that you have a status window for, but aren't actually connected.


Link Copied to Clipboard