eggheads / eggdrop

The Eggdrop IRC Bot
GNU General Public License v2.0
510 stars 84 forks source link

Feature add: List bots on partyline in Alpha order when doing .bots or .botinfo #743

Open d3vils opened 6 years ago

d3vils commented 6 years ago

This would be nice to have the ability to list the bots on the party line in order.

IE .bots Bots: 1zark, Cras, Ewalk, Nope

instead of .bots Ewalk, 1zark, Nope, Cras

vanosg commented 6 years ago

Hi d3vils,

Could you provide a use case for this? How do you intend to use this? Thanks

d3vils commented 6 years ago

Hi vanosg,

This would make it a lot easier to know when/which bot(s) are missing/and not currently linked in order to troubleshoot what happened to the missing.

Thanks

michaelortmann commented 5 years ago

We could use posix qsort for .bots and .botinfo or we could make the bot->next list a sorted list.

d3vils commented 5 years ago

Whatever would be easiest.

thommey commented 4 years ago

Add this at the end of your configuration file and see if it works:


unbind dcc - bots *dcc:bots
bind dcc - bots sortedbots
proc sortedbots {hand idx param} {
  putidx $idx [join [lsort [split [*dcc:bots $hand $idx $param]]]]
}
`
michaelortmann commented 3 years ago

I like this sort feature and would like to see it in our scripts directory and loaded by default in eggdrop.conf.