mIRC Home    About    Download    Register    News    Help

Print Thread
#105345 15/12/04 03:41 AM
Joined: Feb 2004
Posts: 119
D
da_hype Offline OP
Vogon poet
OP Offline
Vogon poet
D
Joined: Feb 2004
Posts: 119
Code:
away {
  var %i = 1 
  while ($scon(%i)) { 
    if ($server) scon %i away
    inc %i 
  }
}


what am i doing wrong here?

#105346 15/12/04 04:04 AM
Joined: Mar 2004
Posts: 540
A
Fjord artisan
Offline
Fjord artisan
A
Joined: Mar 2004
Posts: 540
Use scid %i away

#105347 15/12/04 04:32 AM
Joined: Feb 2004
Posts: 119
D
da_hype Offline OP
Vogon poet
OP Offline
Vogon poet
D
Joined: Feb 2004
Posts: 119
Code:
away { 
  var %i = 1
  while ($scon(%i)) { 
    if ($server) scid %i away $1-
    inc %i
  }
}


somehow it crashes my mirc frown

#105348 15/12/04 04:36 AM
Joined: Mar 2004
Posts: 540
A
Fjord artisan
Offline
Fjord artisan
A
Joined: Mar 2004
Posts: 540
/away {
%x = 1
%y = $scon(0)
while (%x <= %y) {
scid %x away
inc %x
}
}

#105349 15/12/04 04:43 AM
Joined: Mar 2004
Posts: 175
Vogon poet
Offline
Vogon poet
Joined: Mar 2004
Posts: 175
Code:
away {
var %i = 1
While ($Scon(%i)) {
If ($Scon(%i).$Status == connected) { scon %i /!away $1- }
inc %i
}
}


- Relinsquish
#105350 15/12/04 07:18 AM
Joined: Dec 2002
Posts: 788
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 788
If your trying to 'set yourself back' on all servers.

/scid -at1 /away

or to set away; /scid -at1 /away [color:red]message[/color].

Eamonn.

#105351 15/12/04 08:33 AM
Joined: Aug 2003
Posts: 1,831
I
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
The crash is from recursion. echo iteration of the loop is calling the same alias which again loops - over and over ....... You should use !away from within the loop for cases like so.

This is easier and quicker though.
  • alias gaway { scon -at1 away $1- }

/gaway "away msg" sets you away on all connected CIDs
/gaway on its own sets you back on all connected CIDs


Link Copied to Clipboard