Use the leaky bucket algorithm to rate limit irc messages.
The default values were suggested by an operator of freenode.
We don't rate limit the login process, nor parts and quits. However, if you
paste a bunch of text and then part a channel, you will be spammed with a
bunch of "no such nick/channel" error dialogs. I tried to work around this,
but the alternative just makes irc unresponsive until all the pasted messages
are sent. That said, other messages are still delayed while these errors
dialogs are slowly popping up.
#!/bin/bash -eu
# This uses bash for the <() syntax.
# TODO: Is there a way we can ignore files with only fuzzy-string changes?
# These are the languages which are maintained in Transifex.
transifex_languages=$(ls*.po|cut-d.-f1|xargsecho)
if!whichtx>/dev/null
then
cat>&2<< EOF
You must install the Transifex command-line client:
http://docs.transifex.com/client/setup/
EOF
exit1
fi
cat<< EOF
This script assumes your working tree is clean, at least in the po directory.
It pulls the translations from Transifex, works out what has changed, and
COMMITS intltool-update changes without prompting. It then leaves the
remaining changes for manual review and committing.