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
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
The #unsubscribe command was setting the person's subscription to None
which obviously can't be compiled to a regex. This caused a crash on
the first now/next update after someone did #unsubscribe. Fix this
simply by skipping any subscription where the regex is set to None.
Change-Id: I11d42bcb1a0e3bc2e4105d6c2afa39f3a37af278
Previously we blindly accepted any string as a regex, but then
it could fail to compile at search-time when a track topic got
updated, which would cause the bot to crash.
So do a precautionary compile of the regex in order to ensure
we only accept valid regexen.
Change-Id: Id347b88adfc7150ff26550cf9170071e7ac33227
Add a new 'subscribe' command which allows people to subscribe for
automatic notifications via direct message of topics which match the
subscription regex they provide. With no regex argument it shows the
user's current subscription (if any). Also add a new 'unsubscribe'
command for clearing the regex.
Example use cases:
1. I know that nova is planning to discuss $TOPIC some time tomorrow
but they don't know exactly when, and I want to spend most of the
day in another room whilst ensuring I don't miss that particular
discussion on $TOPIC => "/msg ptgbot subscribe $TOPIC" will give me
notifications when the PTL types "#nova next $TOPIC" and "#nova now
$TOPIC".
2. I'm interested in *all* discussion on Python 3. I don't know which
projects are planning to discuss it, let alone when, but that
doesn't matter, because I can type "/msg ptgbot subscribe python ?3"
and get notified of all Python 3 discussions.
As with the presence tracking commands, these commands can be used in
public channels by preceding them with a '#' character.
Change-Id: I3f51acc318ecf31d435768640cef6c46d8ca136c
As discussed in I0d88a540ad7a333841c208dd7f2a7247897eb238, there are
good reasons for someone asking where they themself were last seen,
e.g. to verify that their current status is correct, or just for
testing the bot. So remove the joke. Perhaps we can find
another (funnier) Easter egg to add instead.
Change-Id: Ib27c72a20e71f0835e103e306b145d41a089131c
Since the in / #in command allows free-form check-ins when the
location is not prefixed with '#', this would allow people to
check into locations like 'nova' which would not be recognised
as an official track location. As a result their attendance
would not show up in the tooltips on the schedule web page.
So automatically detect when the user is checking into a track
but forgot to use the '#' prefix, and add it automatically for
them. This DWIM behaviour should avoid some confusion.
Also when matching / matched against known tracks, the lower-cased
version will be used. This assumes that all registered tracks are
lower-case.
Change-Id: Ic88ba926ba9e3187da6046972344bc2b31e3c4f1
Add in/out/seen commands to let people voluntarily check in and out of
tracks and other arbitrary locations, to make it easy for others to
find them. Of course this is entirely optional.
It's designed to cope gracefully with people forgetting to check out
of locations they previously checked into.
Change-Id: I0d88a540ad7a333841c208dd7f2a7247897eb238
PTGbot used to reject now/next (and location) commands for
tracks that do not have a room scheduled on the same day.
However, it is sometimes useful for teams to indicate such
a message (double-booked rooms, team photo time, etc), so
PTGbot will now issue a warning rather than reject command.
Change-Id: Ib04fbf860b22a3b2e99b106f4f83ae702dd215d8
The most common error interacting with the bot is omitting
the "now" command. This change makes ptgbot issue a helpful
suggestion, and clarifies a couple more error messages.
It also provides usage help in case anyone asks for #help.
Change-Id: Ifbee88ab15dbf0ed8c9f858072852381b9da168f
Add admin command to add (and clean) a message of the day (motd)
to the rendered page. Can be used for emergency messages (using
level 'danger') or more general information.
Change-Id: Ie84d1a826c2f84a7ccdafd08176eef9aa2c5a3f1
The base schedule was specified in the bot configuration file,
which made it a bit painful to do last-minute configuration.
The bot shall load a basic minimal database and support being
configured online instead, using commands and json imports.
This change removes the schedule loading from configuration,
and replaces it with a function to update the database using
a provided JSON URL (the ~fetchdb admin command).
Change-Id: I4e7a79baf88cce8d827eb66b1b0c26584c62c8d7
We suppressed channel feedback for most actions, to keep
it quiet. However for the book action, it's good to show
that the command worked.
Change-Id: I4777ecbc854c3f00a3edf69ad30660ec636d3d37
In the recent SSL/SASL introduction, we removed the
on_welcome() and on_cap() functions which were thought
to be taken care of by the introduced mixins.
Turns out it was not the case and the bot needs the
identify-msg cap in order to function, so we should restore
that code.
Change-Id: I11f94ddc2be7e3ff6592dd2c2e5fbfb43f6309f7
Identify through SASL using the convenient ib3 mixins, and
get rid of a bunch of special-case code in the process.
Change-Id: Ia1dfedec7a69a59773759e072acfe442e3976f99
The package for this installs an entrypoint wrapper, so there's
little point in declaring an interpreter in individual modules.
Further, the existing shebangs misleadingly ran python when we only
intend to support python3. Just remove them to avoid confusion.
Change-Id: I62e761719dbf6c357d5b1564ff21b5722b99722c
Using maxplit in the slot code splitting made it resistant to
more than one hyphen, but still failed in case there were no
hyphens at all. Switch to .partition() to avoid all the
corner cases.
Change-Id: I763ff301b8e8b2af947d9c51a34259965dc95f9f
Use textwrap to they are split on word boundaries. 400 characters
is used as an approximation of a safe line length without dealing
with the complexity of determining the exact value for specific
conditions. In practice, we've seen lines truncated at 435 chars.
We sleep between issuing chunks, however, we sleep less than the
normal flood protection interval so the bot still appears responsive.
Change-Id: I87d26228f0e025d911b29a1662a069a2b6d0e497
Split room code only once so that if (wrong) slot codes with
more than one hyphen are entered, it won't crash the bot.
Change-Id: Iaa75da497f026e0d0e601c54d9ddcd52f0028367
By default, allow anyone in channel to issue track moderation
commands (as that greatly simplifies administration). Add
two admin commands to allow toggling that behavior on and off.
Change-Id: I5dc95a1ea14b49c1882bd715b8fbdc3344867b64
Wiping the database was no longer very useful. Replace this
with a ~reload action that reload base data from configuration.
Change-Id: Iaa55a2060053f77dd2ab1072e59b21a28812f213
Separate the dataloading from the database class init,
so that it can be reused to reload base data on the fly.
Change-Id: I3c591c71e77fd04e3d4dcf4fcb8378eb66a7acfb
Rewrite the PTGbot documentation so that it's more
user-friendly, and point users to it in case of errors.
Change-Id: I1ebe6fcc106c6e22ab004e27d38c81265d413603
The ~newday admin command cleans up now/next/location to
get to a fresh start at the beginning of a new day / end of
previous day.
Change-Id: I0a274164939a37e4a3aa9f734d4aebdc4cd82bf3
Available room slots can be booked for any track through
the ptgbot new #book command, referencing the slot code.
Change-Id: I0c661e448568c7f2f26fb296e3f2506ba1ed44ba
Allow to configure a schedule for scheduled rooms and
a number of available time slots in additional rooms.
Change-Id: Ibb4650cc73c08dc5c4328a8a844ed54fac991f84
In order to be able to specify topic/room assignments, we need
a map of the available time slots. Specify that at the config
level.
Change-Id: I58e3d13e169a66c10e74ec9faa97243a40f14ee0
Since a given theme/team may meet in several different
locations during the week, let's call that a "track"
rather than a "room" (which was a confusing concept
since we had "location" as well).
Change-Id: I0978f4c8b33954f53698d8a058b9a802556e56c1
In preparation for the fully IRC-driven system,
remove the code getting extra info from ethercalc.
Change-Id: I1a7092803630a790290205f0b202bc347c3f18c0
One of the things that's hard about using the ptg page is that you
don't know where things are located. This allows you to set the
location on a room, which is displayed in a 3rd column, and will be
persistent after a new set of now (thus not requiring everyone to
remember to include it in their updates).
Change-Id: I12bac56e29cc5974d5c925f23eb94945e6e36421
Allow room managers to set the colors of rooms.
Change-Id: I252d52db0cdf6c25e7c9be95c0debb49bd983cbd
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
As we are getting more confident that the ptgbot is actually
working, maybe it doesn't need to actively ack every command
it receives.
Change-Id: I34414c72e5da449cd8e750396da58e5bcddf1e47
Due to an unfortunate bot command character collision,
move admin commands from ! to ~.
Take the opportunity to properly document them.
Change-Id: Ida77e6262e6da9dade64e6ff9ebca1e41b291b30
Move config to a JSON file in order to allow for complex
configuration of the ethercalc data model.
Change-Id: I0d18bc6aa3fd8ea1739c64a3d488145435bebb4f
While ptgbot's bot.py didn't start out as a straight statusbot
fork, it ended up borrowing most of its connection code, so
original attribution should be preserved.
Change-Id: I154e809a3f4155d14eccd3d8063f92821d6965d9
Rooms must match a defined set of active rooms.
Add !add !del !list commands in order to manage the room list.
Also add a !clean command to remove session entries from a given
set of rooms. All commands take a list of rooms as argument.
Change-Id: I4130c49cc2a3985c440d5b9205f1900daaf46d3d
Limit access to the bot to voiced or oped users in the target
channel. This lets us use ChanServ to autovoice users but also
give temprary access to anyone on-channel as necessary.