Both of these classes have a function called log(), so making the
logger "log" is not what we want ... it leads to a debug log sending
out toots ...
Rename the logger variable
Change-Id: I00007daa4763bd05a8f600369d1c65726f3831a6
fe0 is the "variation selector", 0xf is "VS16" which ensures the
preceeding character is shown as a graphical emoji. The tick here had
a typo from I2746b291a0bc451f1a8dc3aec46adfddb10bb938.
Change-Id: I6c9146c84712e9bdd888babb23049059bb5f8fc8
Use the codepoints directly; also add the VS16 selector where required
which ensures we get the graphical version, which is what we want
here.
Change-Id: I2746b291a0bc451f1a8dc3aec46adfddb10bb938
- ⚠️ Alert
- 📌 Notice
- 🪵 Log
- ✅ OK
Although self explainitory, we can put this key in the description
page too.
Change-Id: Ieaafc625477e100029c9c7cd86cb4cf8cfa49963
We note interesting things we're doing a log level, so sending it to
twitter, where we have about 375 people who were engaged enough to
follow us, seems like a way to increase visibility with what is going
on in the project.
Change-Id: I59189d71fb6a3618b14947033d8cc0bf70d8d0b1
python-twitter has stopped working after Twitter upstream removed an
endpoint it was querying. Switch to the better maintained tweepy,
which is basically the same.
tweepy doesn't automatically split tweets, so implement that. Split
tweets will now be in reply to each other, which is a feature.
Change-Id: Id40af0e314ce8a6cb542f6138f5deaa8a587b260
This change replaces object inheritance with object composition to
enable adding backend other than WikiPage.
Change-Id: Id1a5453a1635f17c67594696d58e1d5c17b9566f
We're running statusbot under Python 3 now, and urllib.quote no
longer exists there. Use urllib.parse.quote instead.
Change-Id: If9b7eced5c65bc3a3e0a078c338da2a609af0fc2
Our servers have, in the two years since we last needed to change
statusbot, switched to installing packages with pip for Python 3.x
instead of 2.7. Instead of figuring out how to unfurl that, just
roll forward and embrace the glorious pastfuture.
Update the simplemediawiki version to pull in a prerelease, since
that's the only way to get a version which supports Py3K.
Change-Id: I24100ad2e9d87e20b7fd9ce90399346846529985
Some networks don't support SASL and we want to support those networks.
This adds non SASL auth back to this IRC bot.
Note that networks like OFTC don't support identity-msg cap extensions.
For this reason we also remove the cap checking for authenticated nicks
in this bot. Instead we will rely on nick enforcement by nickserv.
Change-Id: I81381398b4c100990c04f454191cee52568dbdfe
Identify through SASL using the convenient ib3 mixins, and
get rid of a bunch of special-case code in the process.
This helps when dealing with channels set to require identified
users, as otherwise channel joins will race NickServ's processing of
the identify message and some channels will end up not serviced by
the bot (an alternative would be to delay joining channels until the
identify success is confirmed, but the implementation for that looks
like it would be at least as complex).
Note this also effectively drops non-SSL IRC support. Given
passwords are sent over this connection, I don't see it as a loss.
Change-Id: I0aa15d81f0158fcf2b74825cdb3968d62356fa1d
Co-Authored-By: Thierry Carrez <thierry@openstack.org>
Depends-On: https://review.openstack.org/599061
In confirmation of giving a thanks or success post, this will output the
wiki url so the user knows where it got posted.
Change-Id: I06d637c00dccbee49ad8a60398ac21af4064034e
Recent Twitter messages show the characters \u2026 at the end of
messages needing continuation, rather than the corresponding
character (…), due to statusbot running under Python 2.
Use u\u2026 instead, si that it works in both Python 2 and Python 3.
Change-Id: I958be50bef1991edf0b3aeaf5aa1a32a48f03ef6
Twitter auto-converts urls to twitter shortened URLs. This can affect
the math for message splitting. The python-twitter library has this
implemented already, including all of the logic necessary ... so just
use it.
The character '\u2026' is the unicode horizontal ellipsis and is used
to indicate that the message is continued.
Change-Id: I5492a2792f5d11dccbe4a3454396262341449eab
Add simple unprivileged "#thanks" command that adds thanks snippets to
a celebration wiki page.
NB: this adds a couple of configuration options, but fails gracefully if
they are not present.
Change-Id: I995c3189f0f109df35c56b63b3e19427f60f3750
Update the sample config file to use _key as well for the
access_token_key - like all other entries.
Change-Id: I8e561a3827bed72601babcb021d12b0a8ec8cad0
statusbot failed to start with error that access_token did not exist.
The variable is called access_token_key, use it.
Change-Id: Ib45a1021046145ff5a65f5aaa2e276558762a2a9
Similar to replicating to github for the convenience of our
developer community, sending statuses ALSO to twitter seems
like a potentially low-impact way to communicate status on
an additional channel.
Change-Id: Ib4bdbb335e4bc12d75d5f0ec2a1b95c8a6b2e7d5
Add simple unprivileged "#success" command that adds small
success snippets to a celebration wiki page.
NB: this adds a couple of configuration options, but fails
gracefully if they are not present.
Change-Id: Ib113fa2b55e47759003a84850c0c85a2f883814e
Abstract common WikiPage functions to a parent class to make room
for SuccessPage operations. Make handle_commands specific to #status
commands.
Change-Id: I887ab9b81326bcf4543ff7d8cc6a03eb31691e34
If the bot has +v or +o, it bypasses target change rate limits.
Also, it stands out more in most clients.
Change-Id: I1dc7dcb4cbfc8ab6ce70d1e34720a2753cf36a96
2 seconds is the closest thing to a recommendation I can find.
With 1 second we were hitting errors about changing targets too
often.
Change-Id: Ieb36d3c156bc9e2e36bd8bb85a438cdfed661046
Get rid of threads and make all actions synchronous instead (to
make sure we are measuring our commands to the server so we don't
flood).
Don't explicitly ask for the topics to save. Instead, notice the
topics when joining and keep updating the local copy (except when
we are updating the topic) to speed up the process of changing
topics.
Move the setting of the topic and the broadcast closer together so
that channels don't wait a long time between the announcement
and the topic change.
Give the user confirmation of what's going on, since their channel
might not be near the beginning or end of the list.
Change-Id: I317062268bc591c5ed9db0cb1bbc6fe0e79bec5e
Write the current alert to a file on the file system. Later this
can be served by apache and included on other pages.
Change-Id: I71a88df993b16cecad7287c54361f8cd5ff78a05
Add kitchen (which is an unlisted dep of simplemediawiki).
Fix the logging.config import statement.
Change-Id: I9b82b64d4da2be5ab0f8d2a2e3b74631915b732f