I have an IRC chat bot that I developed using Node.js + JavaScript for a broadcaster on TwitchTV. I run this off my home computer and I know that IRC will globally ban an IP address if it's sending too many messages, or flooding.
I want to open the chat bot up to other broadcasters, but I fear I would get globally banned if the different bots (I have it set so that the broadcasters can make a new account for their bot so the name is tailored to their channel) are sending out messages from a single global IP.
What are some of the techniques I can use where each broadcaster will get their messages from the bot without getting a global ban?
Here's an example of a bot that is able to be in many channels at once, send out messages and not get banned:
I've asked that creator if they could give me some tips but they've pretty much said no.
Clones per IP/subnet
Most Networks limits the amount of concurrent connections from a single IP (sometimes, esp with IPv6 even entire subnets). This limit is different for each network, and the way how it is handled when this limit is exceed too. Some Networks create a g-line (global network ban of your IP), others just drop any new connections.
Channel Limit per connection
There is a limit of in how many channels you can be at the same time. This Limit is per connection, so adding an other connection multiplies the maximum channels you need clones then.
Rate Limit per connection Each connection only allows a certain amount of data send to the server in a given time. This can be easy from 5 commands/sec to complex where different commands add a different amount to the threshold.
Clones
The best way is to get an exception, a trust. How you can get one or if you even can get one depends on the network (policy).
Channel Limit
Some servers in the network may allow a higher amount of channels to be in. Some networks can allow certain users to get a higher limit. Again ask your IRCop or use Clones.
Rate Limit
Ask your IRCop or use clones. Implement a queue to avoid being disconnected for Excess Flood.
You should not use a single connection per channel. While this gives you the benefit to choose different names for each Channel this is considered as waste of resources on most networks.
Better use a neutral name and use it for several channels. Once you hit the Channel cap, use a clone.
To avoid being kicked for excess flood implement a queue to hold lines back (rate limit on your side).
Never connect more than the allowed amount of concurrent connections to the network.
This includes "Ghosts", connections that recently were dropped but are still "on the server".
(To prevent a g-line divide the limit either by 2 or wait 3 min (or more) before reconnecting)
After looking around on twitch it looks like that twitch does not use an IRC network, instead it uses several IRC servers. This makes it somewhat simpler and more complex: