Commit Graph

43 Commits

Author SHA1 Message Date
Tony Breeds 05ccf45dca [docs] Small fix for running http.server
Change-Id: I88821858122c3f2370ad44a3d0b8eca1bdab14fc
2023-09-25 10:21:12 +10:00
Jeremy Stanley 7b6b8293a8 Clarify required parameter names in readme
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
2022-09-16 11:46:02 +00:00
Thierry Carrez ab85e55d74 Adapt PTGBot to OFTC
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
2021-05-31 15:38:52 +02:00
Thierry Carrez 2f8c18d9c1 Refactor processing of user commands
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
2020-12-08 14:35:48 +01:00
Thierry Carrez a0d3fbab41 Add new MOTD handling commands
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
2020-11-13 18:14:52 +01:00
Thierry Carrez 7ae6c6cc55 Fix issue in case unknown location is provided
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
2020-10-27 16:24:14 +01:00
Thierry Carrez 5538127768 Support for room and track URLs
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
2020-05-05 12:17:51 +02:00
Thierry Carrez d2d7d21e98 Add base.json as example base data
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
2020-05-04 14:03:30 +02:00
Thierry Carrez c360e15043 Generate etherpad links automatically
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
2019-08-23 17:21:04 +02:00
Thierry Carrez 7e1f5c3715 Display room capabilities
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
2019-08-05 16:51:10 +02:00
Thierry Carrez 18dbbc69f4 Clean up stale data presence on a #newday command
Data presence was not reset on a new day cleanup, while it
is almost certainly stale at this point. Hopefully.

Change-Id: Ifc4cdedf6c365f92e5ff001d1485c8fee21b396f
2019-07-12 16:56:58 +02:00
Adam Spiers e8f88b2ee1 Add subscribe command for automatic notifications of topics
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
2019-04-30 13:06:58 -06:00
Zuul 9cb30c28a9 Merge "Add presence tracking commands" 2019-04-28 20:03:21 +00:00
Zuul b34f265f24 Merge "Change OpenStack to Open Infrastructure in README.rst title" 2019-04-27 21:11:29 +00:00
Adam Spiers 946d69b140 Add presence tracking commands
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
2019-04-26 19:07:07 +01:00
Adam Spiers f07cbb0bee Switch example IRC port to 6697
6667 doesn't work since SASL was introduced.

Change-Id: I3758ad5e8059e51b493066a32d8ac4e6b65e2a0e
2019-04-26 18:27:19 +01:00
Adam Spiers a2b6ec1f2d Change OpenStack to Open Infrastructure in README.rst title
390f1de3 already removed most human-readable references to OpenStack,
but this one remained.

Change-Id: I7b3afb16f456c0cc9552a8476c2e4776fa45dbe2
2019-04-26 18:27:07 +01:00
Thierry Carrez cb0e38cd12 Generate PTGbot index page dynamically
Current system (where the index page is specified in the
puppet-ptgbot module) requires that (some) links on the page
are updated in puppet-ptgbot at the start of every event.

That page should be dynamically generated from JSON data.
That way the list of links can be provided in the JSON database
and dynamically imported and updated using the ~fetchdb command.

Change-Id: I7d82b38cba495e5837ba54fbe7a9b7e9c8e14259
2018-12-21 15:35:30 +01:00
Thierry Carrez 3b59f982f8 Add emergency messages (~motd and ~cleanmotd)
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
2018-11-26 14:34:31 +01:00
Thierry Carrez 57d849493b Make 'unbook' available for all
The ability to unbook rooms should be accessible to all users.

Change-Id: If747141f9cfc1cd74b542071a798cf94ff1db309
2018-11-26 14:05:08 +01:00
Thierry Carrez 894c8672e8 Rename ~reload to ~emptydb
Reload now effectively empties the database completely,
so rename the function for clarity.

Change-Id: I5c30a89213e462dd3777052d6a6c2714039bbb76
2018-11-26 13:40:19 +01:00
Thierry Carrez 42451c744b Load base schedule dynamically
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
2018-11-26 13:38:26 +01:00
Thierry Carrez 23c688f041 Allow everyone to issue track moderator commands
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
2018-02-13 16:49:55 +01:00
Thierry Carrez 492c8bd8b7 Add 'unbook' admin command
Allows admins to clean up a booked slot.

Change-Id: I3984530b38a725b537f1457ed3e64224845a170e
2018-02-13 16:26:57 +01:00
Thierry Carrez 6b408c46de Replace ~wipe by more selective ~reload
Wiping the database was no longer very useful. Replace this
with a ~reload action that reload base data from configuration.

Change-Id: Iaa55a2060053f77dd2ab1072e59b21a28812f213
2018-02-13 16:07:29 +01:00
Thierry Carrez 648d1bf395 Rewrite documentation in more user-friendly way
Rewrite the PTGbot documentation so that it's more
user-friendly, and point users to it in case of errors.

Change-Id: I1ebe6fcc106c6e22ab004e27d38c81265d413603
2017-12-22 17:27:10 +01:00
Thierry Carrez 96d1a8421b Add command to clean up at start of day
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
2017-12-22 16:08:30 +01:00
Thierry Carrez c637840754 Add ability to book a room
Available room slots can be booked for any track through
the ptgbot new #book command, referencing the slot code.

Change-Id: I0c661e448568c7f2f26fb296e3f2506ba1ed44ba
2017-12-21 14:55:29 +01:00
Thierry Carrez 3b87290132 Rooms are now called Tracks
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
2017-12-04 16:43:56 +01:00
Thierry Carrez 0ff1a65f6c Remove ethercalc support
In preparation for the fully IRC-driven system,
remove the code getting extra info from ethercalc.

Change-Id: I1a7092803630a790290205f0b202bc347c3f18c0
2017-12-04 13:08:51 +01:00
Jenkins b9ba78d793 Merge "Add readme info for location command" 2017-09-12 20:34:37 +00:00
Sean Dague 8ca7898ebc Add readme info for location command
Change-Id: Idc9c7ed8c766dc3357ceef6931abba6b774531b6
2017-09-12 09:41:16 -06:00
Lance Bragstad a4aaec4d24 Fixup minor miss-spelling in README.md
Change-Id: I8f2c62ff0df4ab50efcc48c1e436828e8e7da12e
2017-09-08 13:22:10 +00:00
Doug Hellmann 9dc9d866ac add color command
Allow room managers to set the colors of rooms.

Change-Id: I252d52db0cdf6c25e7c9be95c0debb49bd983cbd
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2017-08-31 10:20:20 -04:00
Thierry Carrez 6a223d31fe Let room operators clean up themselves
Add a '#ROOM clean' command at room operator level.

Change-Id: I81c08c9430df14615f2e4ec490f6b850335337be
2017-08-18 16:25:31 +02:00
Thierry Carrez dea7fb4dd9 Move admin commands from ! to ~
Due to an unfortunate bot command character collision,
move admin commands from ! to ~.

Take the opportunity to properly document them.

Change-Id: Ida77e6262e6da9dade64e6ff9ebca1e41b291b30
2017-08-04 15:53:45 +02:00
Thierry Carrez 39e17d012c Move config to a JSON file
Move config to a JSON file in order to allow for complex
configuration of the ethercalc data model.

Change-Id: I0d18bc6aa3fd8ea1739c64a3d488145435bebb4f
2017-06-29 16:45:56 +02:00
Thierry Carrez b9790b685f Make ethercalc support optional
Do not require ethercalc URL and cells.
2017-05-29 17:21:43 +02:00
Thierry Carrez 8f2f63bdfe Bot uses '#' for commands
The bot now uses # for commands (so that they double as
hashtags), so update documentation to match.
2017-05-22 15:08:13 +02:00
Thierry Carrez 7284607c6c Fix up documentation
Fix a few RST snafus so that the README renders properly.
2017-05-22 15:05:39 +02:00
Thierry Carrez 465f277ccb Implement simpler API
Move from at/until to now/next API for the bot, which is
simpler to explain. Adapt rendering so that it supports
multiple "next" entries.
2017-05-22 14:59:54 +02:00
Thierry Carrez 42339394d5 Add testing instructions 2017-04-20 18:23:42 +02:00
Thierry Carrez 2de3521d32 Initial commit
Basic bot skeleton, no functionality yet.
2017-04-18 14:21:26 +02:00