matrix-org / matrix-appservice-irc

Node.js IRC bridge for Matrix
Apache License 2.0
460 stars 151 forks source link

Fix distribution of IrcServer.randomDomain() #1612

Closed jaller94 closed 1 year ago

jaller94 commented 1 year ago

Does the former method have any advantages?

The larger the array of domains, the more it will tend to pick an item with a low index. Extreme case: If the list has more than 1000 domains, only the first 1000 will be picked.