mIRC Home    About    Download    Register    News    Help

Print Thread
#192497 02/01/08 07:10 PM
Joined: Jun 2003
Posts: 994
C
Hoopy frood
OP Offline
Hoopy frood
C
Joined: Jun 2003
Posts: 994
I'd like to see a sort button (or a switch for /auser and /guser) to order the userlist numerically instead of being forced to go through it manually.

Anyone have a script that can be used instead?


I refuse to engage in a battle of wits with an unarmed person. wink
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Why not just /filter users.ini every now and then?


Invision Support
#Invision on irc.irchighway.net
Joined: Oct 2003
Posts: 3,918
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
Consider your userlist like a .config file. the /auser and /guser commands are just helpful script automations to add lines to your userlist config file. I actually have plenty of comments and stuff in my userlist config file (comments are indeed allowed in the userlist), which wouldn't make sense for mIRC to sort, so I don't know about this one.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Joined: Jun 2003
Posts: 994
C
Hoopy frood
OP Offline
Hoopy frood
C
Joined: Jun 2003
Posts: 994
the userlist is in remote.ini under [users] and .ini files are already numerically sorted by number.

how do I sort what's after the number (n0=(sort by this):more data here)?

preferably just in the [users] section and not include the [variables] section as well

Last edited by CtrlAltDel; 03/01/08 03:03 PM.
Joined: Oct 2003
Posts: 3,918
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
You don't need to use a .ini file for your users list. Save the file as "users.mrc" or something and it will lose the n= prefixes making it easier to process.

Otherwise, you have to use /writeini manually for each line, or manually re-arrange the n= values when /write'ing, which also means manually sorting without /filter, probably.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
The filename varies depending on how you have it set up. As mentioned, you can save it as anything. In my case, the users list is in Users.ini, separate from the variables and whatnot.

You would be better off separating it from the variables into a new file, then use /filter as mentioned. You can sort using any token, so sort it by what is after the = if you're using .ini or else just use .mrc as mentioned to make it even easier.


Invision Support
#Invision on irc.irchighway.net

Link Copied to Clipboard