BotBotMe / botbot-web

Web interface for BotBot.me
https://lincolnloop.com/blog/saying-goodbye-botbotme/
Other
152 stars 32 forks source link

Ensure that use of a particular bot nick doesn't exceed network policy #110

Open unbracketed opened 10 years ago

unbracketed commented 10 years ago

We had a few channels stop being logged because one of the nicks was over freenode's allowed channel capacity:

https://lincolnloop.slack.com/archives/general/p1416255944000424

mtrythall commented 10 years ago

I believe we have code in place that should handle balancing. It looks like it might be broken, or needs to have its threshold changed (i.e. don't go up to 100%, only go to 85%).

yml commented 10 years ago

We have a notion of capacity on each ChatBot:

In [11]: [(cb.nick, cb.server_identifier, cb.max_channels) for cb in ChatBot.objects.filter(is_active=True)]
Out[11]: 
[(u'[d__d]', u'irc-freenode-net-6697.d__d', 200),
 (u'[o__o]', u'irc-synirc-net-6697.o__o', 200),
 (u'[o__o]', u'irc-coldfront-net-7778.o__o', 200),
 (u'[o__o]', u'irc-mozilla-org-6697.o__o', 200),
 (u'[0__0]', u'weber-freenode-net-6697.0__0', 200),
 (u'[o__o]', u'chat-freenode-net-6697.o__o', 145)]

As we see a bot reaching the max channels limit we need to bring chatbot.max_channels limit down to make sure that we avoid this situation.

unbracketed commented 10 years ago

Awesome. I think a next step to finish this would be integrating into the admin to remove bots from the selection list when they are at the max.