List Joined Channels

By Mi9 on Sep 04, 2016

Update: 2016.09.10


  • channels with mode set to +p or +s are hidden from list.
    If message is sent in a channel with mode +p or +s, then that channel is listed.
  • choose the type of sending
    • Echo (local, list all channels)
    • Message
    • Notice
    • Describe

/ljc <echo|msg|notice|describe>

;a   List Joined Channel - [by Mi9]
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;

menu channel,query {
  List Joined Channels
  .Echo:ljc echo
  .-
  .Message:ljc msg
  .Notice:ljc notice
  .Describe:ljc describe
}

alias ljc {
  if ($1 !isin "echo msg notice describe") { echo 5 -a :.: Syntax: /ljc <echo | msg | notice | describe> | halt }
  var %t.ch $chan(0)
  while (%t.ch > 0) {
    if ($1 !isin echo) {
      if (p isin $chan(%t.ch).mode) || (s isin $chan(%t.ch).mode) && ($chan(%t.ch) != $active) {
        inc %s.ch | goto skip
      }
    }
    if ($me isreg $chan(%t.ch)) unset %my.ch.mode
    if ($me isvoice $chan(%t.ch)) var %my.ch.mode [+]
    if ($me ishop $chan(%t.ch)) var %my.ch.mode [%]
    if ($me isop $chan(%t.ch)) var %my.ch.mode [@]
    var %p.chlist $chan(%t.ch) $+ %my.ch.mode %p.chlist
    :skip
    dec %t.ch
    if (%t.ch == 0) {
      if ($chan(0) > 1) var %ltr s
      if (%t.ch > 1) var %wrd are | else var %wrd is
      if (%s.ch > 0) var %sp.ch :( $+ %s.ch of them %wrd secret or private $+ ).
      $1 $active :.: I am on $chan(0) Channel $+ %ltr $+ : %p.chlist %sp.ch
      unset %s.ch
    }
  }
}

;z

Comments

Sign in to comment.
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.