mIRC Home    About    Download    Register    News    Help

Print Thread
#32961 29/06/03 04:16 PM
Joined: Feb 2003
Posts: 143
N
naki Offline OP
Vogon poet
OP Offline
Vogon poet
N
Joined: Feb 2003
Posts: 143
Code:
alias ischan { 
  var %chan_num 1
  while (%chan_num <= $chan(0)) {
    if ($chan(%chan_num) == $1) { return %chan_num | halt }
    else { inc %chan_num 1 }
  }
  return 0
}


Yes I made this so it could help me making scripts in the future. But it isnt complete. I want it to be able to return all channel numbers if I might be in the same channel on other servers. I looked through the scid and scon commands but still dont know how to make it.


We don't just write the scripts, we put them to the test! (ScriptBusters)
#32962 29/06/03 06:15 PM
Joined: Dec 2002
Posts: 774
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Dec 2002
Posts: 774
Code:
alias ischan {
  var %scon = 1, %scons = $scon(0)
  while ( %scon <= %scons ) {

  var %chan_num = 1, %channels = $chan(0)
  while (%chan_num <= %channels) {
    if ($chan(%chan_num) == $1) { return %chan_num %scon | halt }
    else { inc %chan_num 1 }
  }

  inc %scon
  }
  return 0
}



but wtf do you do with this?


Code:
//if ( khaled isgod ) echo yes | else echo no
#32963 30/06/03 03:09 AM
Joined: Feb 2003
Posts: 2,812
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,812
Sorry if this seems a little obvious, but you are aware of the ischan operator, correct?

/help ischan

- Raccoon


Well. At least I won lunch.
Good philosophy, see good in bad, I like!

Link Copied to Clipboard