Multiple people have been mistaking the ~add and ~del syntax to
include a keyword "TRACK" which results in creating an actual track
by that name. Add chevrons around required parameters in the syntax
documentation in order to make it clear those are parameter names
and not literal keywords.
Change-Id: I69d5b79d8d894f94919724c0f94225dbf959b20e
Bullseye has been out for a bit now and buster has a shelf life. Update
to bullseye to keep up with debian's releases.
Change-Id: I5845a8cf5c7a0c6383e9c2863146df28c7e40a4f
PTGBot was relying on a number of Freenode things and requires a
few changes to run on OFTC:
- Manually identify to NickServ instead of using SASL
- No longer use identify-msg capability
- Messages received are no longer prefixed by '+'
Change-Id: Ib014f58475c1eee89d34e718ee5988800602586b
Recent change to introduce a "clear" alias for the "clean" commands
missed one case (~clear TRACK).
Change-Id: I60334ce80fee07edca335c1a75a295d90d6c39c5
To make it friendlier to non-openstack projects, use the opendev
instance of etherpad instead of the openstack one.
Change-Id: I30385d0ca0145994d21832769510a3a9b627e40d
PTGbot airbag deploys on empty messages (messages containing only
spaces, or /me actions). Fix this crash to avoid airbag deployment.
Change-Id: I4def945894419536fd3d340e3850007210adf17f
The first parameter would be ignored when running ~add, ~del or
~clean commands. Fix the issue and add a test to make sure we
do not regress again.
Change-Id: If2c239e8d04ca2ea86283861617c89d77d3917ee
Channel for PTG discussion was moved to #openinfra-events, and
the bot was renames "openinfraptg" to match the extended scope
of the event.
Depends-On: https://review.opendev.org/c/opendev/system-config/+/774862
Change-Id: I5f1cc7867273c82a836ab238e5c2b2352bbf02ff
Separate the processing of track commands and admin commands
into separate files, and normalize handling of messages.
Adjust test cases so that they match the new normalized messages.
Change-Id: I26e3683bbf3b7daab68407cd9928ee3d7f5c50dc
User commands in PTGbot can be called from privmsg or pubmsg.
Create a usercommands.py file to separate their processing.
This introduces a new '+' prefix for user commands, while preserving
the old '#' calls (which should really only be used for track
commands) for people that got used to them.
Change-Id: Ifab12fa27c6147ba9e9ff51f2b7f9e30a8ed0076
Add tests for most commands in PTGbot, checking that they result in
the desired outcome.
With this patch all track commands are tested, as well as most admin
commands.
Change-Id: I0a9907da6946db224a9efd2c740f275dfad0f00e
In order to be able to easily mock voice and oper checks, create
specific functions that implement those checks.
Change-Id: I6250c0d181085ff39d6ff0dae95c700dbeb931a3
The base.json file was missing some entries, preventing us from
using it as a valid base for tests.
Change-Id: Iee9d1ea8052d8faaf1a2056b9769ed2a816c92d7
A long-wanted feature! Since the MOTD can only be controlled by an
admin, the risk of abuse is very limited.
Change-Id: Iff6263059d76c9b75ae26e029e3063992ab7cb76
Revamp the ~motd command so that it supports the following subcommands
on the newly-introduced array of MOTD messages:
~motd add... (equivalent to old ~motd): adds a message
~motd clean (equivalent to old ~cleanmotd
~motd del n (to suppress message #n)
~motd reorder x y z (to reorder/remove messages)
Change-Id: I2f98c724c716ca4fd2e8fef34d4ca5af457b39e8
The message of the day used to be a single message with an importance
level. It's actually useful to be able to have several distinct
messages and add/remove them separately.
In preparation for that change, turn the motd entry in the json DB into
an array of messages. Gracefully migrate previous format DB into the
new one. Commands stay unchanged for now and just manipulate the first
entry.
Change-Id: Id98281dba0c6b3cffe1a359d6e0c250b99084bb1
Catch all previously-uncaught exceptions from on_pubmsg() and
on_privmsg() calls, to prevent the bot from crashing when people
start getting creative in their commands.
This should of course never happen, but if it does, better continue
running than crash.
Change-Id: Ic5eeec23652170061cbd2ce3606a3aee22463529
The code handling the "etherpad" command had the same issue as the
code handling the "url" command: if "auto" was passed to reset an
etherpad to default BUT no etherpad was set, the bot would crash.
This fixes it by doing nothing in that corner case.
Change-Id: I7a63c0b5ce95cf795964e637313a7b19e238964d
If a "none" URL is passed for a track but that track did not
have a customized URL in the first place, the bot would crash.
This fixes it by not doing anything in that case.
Change-Id: I9ab45ad7d07700efe5af208eb4c5b1285fd9deeb
The location code was created to allow for emergency relocation of
meetings, however in a virtual setting that is tracked using the "url"
feature. When location and urls differ it can create a lot of confusion.
It's better to stop displaying location for virtual PTGs. As an
emergency fix, let's stop displaying the location.
Change-Id: Ibb9d96e1fa7f686e31cc8d9b51e3826af8c4b015
Using the "location" command to point to an unknown location
would cause the Javascript displaying the schedule to crash.
It's a bit useless to use that command in a virtual PTG with
meeting URLs, however the page should handle that case and fail
more gracefully.
Change-Id: I271e2ead0094d407274cbb22e499d7b2c49631b4
When a meeting URL is provided, use the tooltip to explain that you
can click to join the meeting, rather than confusingly mention that
no one is checked in.
Change-Id: Id0dacd065ce28ed817fd142105cb728392d0efe4
Add a grey background on cells matching the current time, to make
it clearer where we are in the day.
Change-Id: Id2d13ae59f63c7059bba8abdf762b25e6339720e
Make it clearer that certain badges are meant to be clicked on.
Also replace the darkblue badge color that was too close to the
hover color.
Change-Id: I84617dbd442cfd557155400a65bd87679fe2825a
There is a corner case (/dcc chat) where a privmsg can have no content.
Ignore such corner cases instead of crashing.
Change-Id: Ia07c76c4a2342bb4e7bc9c37a4944d4b9f18efd8
The new track badge logic (which builds in a link to the
videoconference room if one is specified) is failing in case
the track is not scheduled in any location today.
Fix it so that we do not display any link in this precise case.
Change-Id: Ib6d93336e7c5d7c3494d442f95295442a8169a4d
If real time equivalents for the time slots are provided, add
a link to timeanddate.com corresponding to the time, and display
browser local time equivalent for the time displayed.
Also make sure that the day tab corresponds to the UTC day (until
01 UTC the next day) whatever your timezone is.
Change-Id: I7847e0ac68fc6fcd176d40cc94d4e21c3c6e03e0
Allow to associate a URL to a room, for example a link to a video
conference room. Tracks assigned to this room will automatically inherit
the link. The link for a given track can be overridden using the "url"
command.
This allows organizers to provide video links for each room, while still
enabling teams to link to whatever they end up really using.
Change-Id: I633eb83c579e4093ae769bcd053e4d2ec2fe4bc3
PTGbot needs to be bootstrapped using base data, but it was unclear
what that base data should contain. Rather than just providing a
pastebin link, add an example base data file.
Change-Id: I675717fee4f5c1eb48dc94aeb26d63a85c004fb1
The repo is Python 3 now, so update hacking to version 3.0 which
supports Python 3.
Fix problems found.
Change-Id: I5d2ab99725e97437b8dc3dc805c79b4a14610d6c
Now that we have a page for etherpads, navigation between the various
page is a bit awkward. This change introduces a common navbar across
all pages, and makes sure the MOTD displays on all of them.
This makes some of the links redundant, so we remove them.
Change-Id: I57d02c505ced355d53bc79e0d8240ea63737eae3
It is unclear that the etherpads page is driven by the ptgbot.
Add instructions on the page pointing to the ptgbot doc.
Change-Id: I42eee55d01da20a6e6bdc17081b99473ceb44c41
With this change, the ptgbot will generate links for each track
etherpad, display them on a specific page (etherpads.html) and
allow track moderators to override the autogenerated link using
the #track etherpad command.
It requires the database to contain an 'eventid' key which serves
as a unique etherpads prefix.
Change-Id: Iaa524530e9f2506369f180588a2b6f98f4cad3d1
It is sometimes useful to mark certain rooms as having specific
capabilities like videoprojection. This change adds the possibility
to assign a glyphicon (cap_icon) and a mouseover description
(cap_desc) for the rooms in the schedule dictionary.
Change-Id: I343c28acc3ad6015d3382d526511f153bf38a0e6