Allow ordering channels [$15] #48

Closed
opened 2026-10-05 03:55:46 +02:00 by adam · 32 comments
Owner

A few people have requested/complained that ZNC doesn't order channels how they wish.

Previously ZNC written its configs differently so that channels were saved in order they were added, I changed it to use CConfig to write the config. This doesn't store them in the same order.

We could implement some kind of index on the channels in the config. This will allow us to read them and place them in the same order as before.

/msg *status movechan #channel <new-index>

The webadmin could also be updated to allow moving channels up/down.

I have created an issue so we can discuss this further and decide if we should implement this, and how.

Related: #89

--- There is a **[$15 open bounty](https://www.bountysource.com/issues/696-allow-ordering-channels?utm_campaign=plugin&utm_content=tracker%2F1759&utm_medium=issues&utm_source=github)** on this issue. Add to the bounty at [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F1759&utm_medium=issues&utm_source=github).
A few people have requested/complained that ZNC doesn't order channels how they wish. Previously ZNC written its configs differently so that channels were saved in order they were added, I changed it to use CConfig to write the config. This doesn't store them in the same order. We could implement some kind of index on the channels in the config. This will allow us to read them and place them in the same order as before. ``` /msg *status movechan #channel <new-index> ``` The webadmin could also be updated to allow moving channels up/down. I have created an issue so we can discuss this further and decide if we should implement this, and how. Related: #89 ## <bountysource-plugin> --- There is a **[$15 open bounty](https://www.bountysource.com/issues/696-allow-ordering-channels?utm_campaign=plugin&utm_content=tracker%2F1759&utm_medium=issues&utm_source=github)** on this issue. Add to the bounty at [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F1759&utm_medium=issues&utm_source=github). </bountysource-plugin> <!-- github-sync-id:2851528 -->
adam closed this issue 2026-10-05 03:55:46 +02:00
Author
Owner

+1

I get a lot of questions about this - This would really be a nice thing to get implemented.

+1 I get a lot of questions about this - This would really be a nice thing to get implemented. <!-- github-comment-id:4452167 -->
Author
Owner

I would love to see this feature implemented.

I would love to see this feature implemented. <!-- github-comment-id:5136808 -->
Author
Owner

+1 for this

+1 for this <!-- github-comment-id:5651081 -->
Author
Owner

+1

sometimes the channels are just put in some random order... would be nice to have a fixed channel order.

+1 sometimes the channels are just put in some random order... would be nice to have a fixed channel order. <!-- github-comment-id:7983812 -->
Author
Owner

It would be nice to have then ordered in order of activity so idle ones at the bottom and busy ones at the top.

It would be nice to have then ordered in order of activity so idle ones at the bottom and busy ones at the top. <!-- github-comment-id:8022654 -->
Author
Owner

+1 for a fixed channel order (perhaps also a way to on-demand sort them by an algorithm, such as a-Z ascending, from /msg *status and/or through the webadmin).

+1 for a fixed channel order (perhaps also a way to on-demand sort them by an algorithm, such as a-Z ascending, from `/msg *status` and/or through the webadmin). <!-- github-comment-id:9408964 -->
Author
Owner

+1 to a-z sorting

+1 to a-z sorting <!-- github-comment-id:9417548 -->
Author
Owner

You guys are all using mirc, right? Or which other clients cant reorder channels?

You guys are all using mirc, right? Or which other clients cant reorder channels? <!-- github-comment-id:9417720 -->
Author
Owner

No, I'm using Konversation.

I can manually reorder channel in Konvi if I want to. But I do have a certain order I want my channels listed in. So I have in Konvi the join order accordingly. However, if I'm already logged in with ZNC, then the join order of Konvi is being ignored and channels are handed down from ZNC (or something like that) and then the order is sometimes messed up.

So I disconnect from Konvi, go into ZNC and remove all channels there again becuase of the wrong order, and fire up Konvi again. Then is all well for a while.

No, I'm using Konversation. I can manually reorder channel in Konvi if I want to. But I do have a certain order I want my channels listed in. So I have in Konvi the join order accordingly. However, if I'm already logged in with ZNC, then the join order of Konvi is being ignored and channels are handed down from ZNC (or something like that) and then the order is sometimes messed up. So I disconnect from Konvi, go into ZNC and remove all channels there again becuase of the wrong order, and fire up Konvi again. Then is all well for a while. <!-- github-comment-id:9417742 -->
Author
Owner

With kvirc ordering is ok. But mobile irc clients using znc ordering.

With kvirc ordering is ok. But mobile irc clients using znc ordering. <!-- github-comment-id:9417763 -->
Author
Owner

@psychon I'm using LimeChat (Mac). See also psychs/limechat#127.

@psychon I'm using LimeChat (Mac). See also psychs/limechat#127. <!-- github-comment-id:9426683 -->
Author
Owner

+1

Still would love to see this implemented, I upgraded my installation earlier and I can't edit the config to to set any kind of ordering in 1.0

+1 Still would love to see this implemented, I upgraded my installation earlier and I can't edit the config to to set any kind of ordering in 1.0 <!-- github-comment-id:11805766 -->
Author
Owner

+1! Using multiple clients, mainly mirc though. Ordering would be nice.

+1! Using multiple clients, mainly mirc though. Ordering would be nice. <!-- github-comment-id:12335263 -->
Author
Owner

In mirc you can`t order channels? o_0 Kvirc does that.

In mirc you can`t order channels? o_0 Kvirc does that. <!-- github-comment-id:12357284 -->
Author
Owner

In mIRC, you have three options...

1, Join the channels in the order you want them...
2, Windows -> Order -> Add channel names -> Move them up/down in the order you want.
; This will sort everything (channels and queries) in A-B-C Order...
3, Tools -> Options -> Display -> [check] Sort buttons -> OK

In mIRC, you have three options... 1, Join the channels in the order you want them... 2, Windows -> Order -> Add channel names -> Move them up/down in the order you want. ; This will sort everything (channels and queries) in A-B-C Order... 3, Tools -> Options -> Display -> [check] Sort buttons -> OK <!-- github-comment-id:12367809 -->
Author
Owner

Xchat doesn't let me reorder the list. It is a pain the list changes on each load. Please fix.

Xchat doesn't let me reorder the list. It is a pain the list changes on each load. Please fix. <!-- github-comment-id:21261749 -->
Author
Owner

Bounty here: https://www.catincan.com/bounty/allow-ordering-channels-issue-104-znc-znc-github

Crowdfund issue & get merged into main branch to collect.

Bounty here: https://www.catincan.com/bounty/allow-ordering-channels-issue-104-znc-znc-github Crowdfund issue & get merged into main branch to collect. <!-- github-comment-id:22091187 -->
Author
Owner

rmiddle,

Of course you can reorder the list with Xchat.
Open Keyboard Shortcuts in the Settings menu and look for "Move tab family right/left" check what shortcut is assigned to it. In my case it is control+shift+page up/down

But the reordering is not saved, and I hate it too

rmiddle, Of course you can reorder the list with Xchat. Open Keyboard Shortcuts in the Settings menu and look for "Move tab family right/left" check what shortcut is assigned to it. In my case it is control+shift+page up/down But the reordering is not saved, and I hate it too <!-- github-comment-id:32705105 -->
Author
Owner

@mikolino @rmiddle uncheck prefs > channel switcher > Sort tabs in alphabetical order. Then the order in [he]xchat is set by join order, which is what this issue is about.

@mikolino @rmiddle uncheck prefs > channel switcher > Sort tabs in alphabetical order. Then the order in [he]xchat is set by join order, which is what this issue is about. <!-- github-comment-id:32718774 -->
Author
Owner

+1

I don't want alphabetical order but the order in which I joined the channels.

+1 I don't want alphabetical order but the order in which I joined the channels. <!-- github-comment-id:61385803 -->
Author
Owner

If the fix m0vie did works, please merge it. This is a particularly important problem for anyone who uses a lot of channels; we need to be able to find the channels we actually care about instead of losing them in a sea of lurking and log output and the like.

It was bad enough before with no sane way before to order them persistently, with only leaving and rejoining every channel in order as an option, but now we have no options at all.

If the fix m0vie did works, please merge it. This is a particularly important problem for anyone who uses a lot of channels; we need to be able to find the channels we actually care about instead of losing them in a sea of lurking and log output and the like. It was bad enough before with no sane way before to order them persistently, with only leaving and rejoining every channel in order as an option, but now we have no options at all. <!-- github-comment-id:66183428 -->
Author
Owner

+1 for my own particular order (and not just alphabetical, which does me no good). Just a cursory examination of m0vie's commit looks like it gets the job done. Is there a particular reason this hasn't been merged yet? Sorting channels is an annoying task, and the referenced commit makes it look like this is also an unnecessary task.

+1 for my own particular order (and not just alphabetical, which does me no good). Just a cursory examination of m0vie's [commit](https://github.com/m0vie/znc/commit/a697fa2e5394cd26de8d5dc4426b15a252be0c5b) looks like it gets the job done. Is there a particular reason this hasn't been merged yet? Sorting channels is an annoying task, and the referenced commit makes it look like this is also an unnecessary task. <!-- github-comment-id:70715821 -->
Author
Owner

@curtisz that commit adds a new setting to znc.conf with the order. But znc.conf already contains channels in some order, why a new setting?
Also see comments in #238

@curtisz that commit adds a new setting to znc.conf with the order. But znc.conf already contains channels in some order, why a new setting? Also see comments in #238 <!-- github-comment-id:70727441 -->
Author
Owner

Down at the bottom (starting src/IRCNetwork.cpp:797) it appears to sort the channels according to the order they were given. As it stands, ZNC does not pay attention to channel ordering, regardless of how they're ordered in znc.conf. Also, I don't care if a connected client has the ability to sort channels. I want ZNC to sort the channels. I have many users connecting with different clients, so it's important that ZNC does this, so I don't have to keep track of a bunch of different instructions for individual user clients. At the moment, the only way to get channels in a particular desired order in ZNC is to part the channels and then join them in the order you want them in, which is kludgy, I think.

Down at the bottom (starting src/IRCNetwork.cpp:797) it appears to sort the channels according to the order they were given. As it stands, ZNC does not pay attention to channel ordering, regardless of how they're ordered in znc.conf. Also, I don't care if a connected client has the ability to sort channels. I want ZNC to sort the channels. I have many users connecting with different clients, so it's important that ZNC does this, so I don't have to keep track of a bunch of different instructions for individual user clients. At the moment, the only way to get channels in a particular desired order in ZNC is to part the channels and then join them in the order you want them in, which is kludgy, I think. <!-- github-comment-id:70731674 -->
Author
Owner

As it stands, ZNC does not pay attention to channel ordering, regardless of how they're ordered in znc.conf

And that needs to be fixed, instead of introducing a new setting.

> As it stands, ZNC does not pay attention to channel ordering, regardless of how they're ordered in znc.conf And that needs to be fixed, instead of introducing a new setting. <!-- github-comment-id:70732912 -->
Author
Owner

My perspective is that I don't see the order in znc.conf as innately specifying a particular order as much as just being a set of channels. Preferring the explicit over implicit, I think an explicit setting here would be nice. Also, I would think it's probably easier to get ZNC to exhibit the desired behavior with an explicit setting, though I have no idea how ZNC handles the channel set internally. It's a new setting, sure, but there isn't really an existing one.

My perspective is that I don't see the order in znc.conf as innately specifying a particular order as much as just being a set of channels. Preferring the explicit over implicit, I think an explicit setting here would be nice. Also, I would think it's probably easier to get ZNC to exhibit the desired behavior with an explicit setting, though I have no idea how ZNC handles the channel set internally. It's a new setting, sure, but there isn't really an existing one. <!-- github-comment-id:70734213 -->
Author
Owner

@DarthGandalf
TBH, I don't really care how it's done... if existing settings can be (ab)used or new setting needs to be introduced... I'd just love if it gets the ability to have defined channel order list...

@DarthGandalf TBH, I don't really care how it's done... if existing settings can be (ab)used or new setting needs to be introduced... I'd just love if it gets the ability to have defined channel order list... <!-- github-comment-id:70734637 -->
Author
Owner

And at the end of the day, philosophy about new settings aside, the code right there in m0vie's commit looks like it gives ZNC the desired behavior.

And at the end of the day, philosophy about new settings aside, the code right there in m0vie's commit looks like it gives ZNC the desired behavior. <!-- github-comment-id:70740614 -->
Author
Owner

I upped the bounty with 15$, so there is a 30$ bounty for whoever fixes this know (And adds the functionality to the web interface to change the order)

I upped the bounty with 15$, so there is a 30$ bounty for whoever fixes this know (And adds the functionality to the web interface to change the order) <!-- github-comment-id:288206229 -->
Author
Owner

Might want to update the title, it's now $45, as well as editing the link: https://www.bountysource.com/issues/696-allow-ordering-channels @kylef

Might want to update the title, it's now $45, as well as editing the link: [https://www.bountysource.com/issues/696-allow-ordering-channels](https://www.bountysource.com/issues/696-allow-ordering-channels) @kylef <!-- github-comment-id:554105332 -->
Author
Owner

@DarthGandalf Could you explain what changes are needed for #238 to be merged?

As it stands, ZNC does not pay attention to channel ordering, regardless of how they're ordered in znc.conf

And that needs to be fixed, instead of introducing a new setting.

Config entries appear to be sorted lexicographically by design. Are you saying that the config system should instead respect the order in znc.conf for all entries?

@DarthGandalf Could you explain what changes are needed for #238 to be merged? > > As it stands, ZNC does not pay attention to channel ordering, regardless of how they're ordered in znc.conf > > And that needs to be fixed, instead of introducing a new setting. Config entries appear to be sorted lexicographically by design. Are you saying that the config system should instead respect the order in znc.conf for all entries? <!-- github-comment-id:654517338 -->
Author
Owner

sorted lexicographically by design

By what design?

Are you saying that the config system should instead respect the order in znc.conf for all entries?

Yep. It only matters for channels though.

> sorted lexicographically by design By what design? > Are you saying that the config system should instead respect the order in znc.conf for all entries? Yep. It only matters for channels though. <!-- github-comment-id:655021041 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/znc#48