napa182 commented on a Page, ChannelList  -  Jan 21, 2010

well if you still want to use a while loop then make it abit better
to show the channels the bot is in

on $*:TEXT:/^!chanlist$/iS:#: {
  var %a = $chan(0)
  while (%a) {
    var %m $addtok(%m,$chan(%a),32)
    dec %a
  }
  msg # I'm in: %m
}

and $comchan so it would show the channels which both you and the bot are on.

on $*:TEXT:/^!chanlist$/iS:#: {
  var %a = $comchan($nick,0)
  while (%a) {
    var %m $addtok(%m,$comchan($nick,%a),32)
    dec %a
  }
  msg # Me and $nick are in these same channels: %m
}

but i would still go the $regsubex way as i stated before

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.