mIRC Home    About    Download    Register    News    Help

Print Thread
#3792 28/12/02 08:47 PM
Joined: Dec 2002
Posts: 174
P
Vogon poet
OP Offline
Vogon poet
P
Joined: Dec 2002
Posts: 174
is there an easy way to have all of the contents in the hashtable go at once

like say

i have Autojoin1 #lobby
autojoin2 #silent
autojoin3 #train

is there a way to have all the channels open at once?
even if later added another autojoin channel?

Joined: Dec 2002
Posts: 46
Z
zac Offline
Ameglian cow
Offline
Ameglian cow
Z
Joined: Dec 2002
Posts: 46
Code:
var %i = 1, %chans
while ($hget(whatever, %i)) {
  %chans = $addtok(%chans, $ifmatch, 44)
  inc %i
}
join %chans


or if you have other entries

Code:
var %i = 1, %chans
while ($hget(whatever, $hfind(whatever, autojoin*, %i, w))) {
  %chans = $addtok(%chans, $ifmatch, 44)
  inc %i
}
join %chans

Last edited by zac; 28/12/02 10:14 PM.
Joined: Dec 2002
Posts: 174
P
Vogon poet
OP Offline
Vogon poet
P
Joined: Dec 2002
Posts: 174
and this would go into the alias?

how do i get it to auto join just do an on connect?

Joined: Dec 2002
Posts: 46
Z
zac Offline
Ameglian cow
Offline
Ameglian cow
Z
Joined: Dec 2002
Posts: 46
if all of them are autojoin*-ish

Code:
on *:connect:{
  var %i = 1, %chans
  while ($hget(whatever, %i)) {
    %chans = $addtok(%chans, $ifmatch, 44)
    inc %i
  }
  join %chans
}


or if you have autojoin* and oithers:

Code:
on *:connect:{
  var %i = 1, %chans
  while ($hget(whatever, $hfind(whatever, autojoin*, %i, w))) { 
    %chans = $addtok(%chans, $ifmatch, 44)
    inc %i
  }
  join %chans
}


you can throw in an if() checking the network, or just switch it around for an alias


Link Copied to Clipboard