mIRC Home    About    Download    Register    News    Help

Print Thread
Replacement Channels List #249837 19/12/14 12:40 AM
Joined: Nov 2014
Posts: 32
P
Panda Offline OP
Ameglian cow
OP Offline
Ameglian cow
P
Joined: Nov 2014
Posts: 32
Ok, so since 7.38, the 'Channels List' is no longer showing room modes and this is something that I utilize a lot.

So I got some help from a couple of board members here at the mIRC forum and ended up with the following as a replacement for the 'Channels List'

Code:
alias list {
  if ($window(@Channel.List)) { window -c @Channel.List }
  window -bk0sSzl -t27,34,50 +slx @Channel.List Segoe UI -10
  .enable #list
  !list $1-
}

;list off
raw *:*: {
  if ($window(@Channel.List)) {
    if ($numeric == 321) { close -l | halt }
    if ($numeric == 322) { .aline @Channel.List $2 $chr(9) $3 $chr(9) $4 $chr(9) $5- | halt }
    if ($numeric == 323) {
      close -l
      window -ab +x @Channel.List
      filter -cteuww 2 9 @Channel.List @Channel.List
      .disable #list
      halt
    }
  }
}
;list end

menu @Channel.List {
  dclick: {
    tokenize 32 $line(@Channel.List,$1)
    join $1
  }
  Join Channel: join $1
  Show Users: names $1
}

It does everything I need it to, except I absolutely cannot make it sort the list on the number of users in channel, something that the regular /list does.

This is the line that *should* be sorting my list:

Code:
filter -cteuww 2 9 @Channel.List @Channel.List

But it seems to be reading the entire line as one word, and so is sorting on channel name, regardless of the specified token position.

I know that the next version of mIRC will have reverted the change that has necessitated my having this script. But I would still like to know how to make it sort as I feel it would be helpful to me when writing other custom windows.

Please, can someone help me? I'm not sure if I should even be using /filter.

Thanks in advance

Panda

Re: Replacement Channels List [Re: Panda] #249865 20/12/14 03:16 PM
Joined: Oct 2009
Posts: 24
Scakk Offline
Ameglian cow
Offline
Ameglian cow
Joined: Oct 2009
Posts: 24
The "sS" in the starting alias "list" causes a sort which seems to override the /filter call.

Re: Replacement Channels List [Re: Scakk] #249866 20/12/14 03:44 PM
Joined: Nov 2014
Posts: 32
P
Panda Offline OP
Ameglian cow
OP Offline
Ameglian cow
P
Joined: Nov 2014
Posts: 32
Thanks, I tried taking it out but it didn't appear to make a difference, that I could tell. It still wasn't sorting the list by amount of users.

I've been messing with the /filter command all day and I've still not managed to make it work, so I'm wondering if there should be a better way to do it? It really seems as though no one knows how to do this smirk

<tears out what little hair is left>

Panda