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
This commit is contained in:
parent
cf7dd084a6
commit
dea7fb4dd9
46
README.rst
46
README.rst
|
@ -3,14 +3,25 @@ OpenStack PTG Bot
|
||||||
=================
|
=================
|
||||||
|
|
||||||
ptgbot is the bot that PTG room moderators use to surface what's
|
ptgbot is the bot that PTG room moderators use to surface what's
|
||||||
currently happening at the event. Commands follow the following format::
|
currently happening at the event. Room operators send messages to
|
||||||
|
the bot, like::
|
||||||
|
|
||||||
|
#swift now discussing ring balancing
|
||||||
|
|
||||||
|
and from that information the bot builds a static webpage with discussion
|
||||||
|
topics currently discussed ("now") and an indicative set of discussion
|
||||||
|
topics coming up next ("next"). It also merges information from the
|
||||||
|
reservable rooms ethercalc in order to produce a single, static,
|
||||||
|
mobile-friendly page.
|
||||||
|
|
||||||
|
Room operators commands
|
||||||
|
=======================
|
||||||
|
|
||||||
|
You have to have voice in the channel (+v) to send commands to the ptgbot.
|
||||||
|
Commands follow the following format::
|
||||||
|
|
||||||
#ROOMNAME [now|next] TOPIC
|
#ROOMNAME [now|next] TOPIC
|
||||||
|
|
||||||
From that information the bot builds a static webpage with discussion
|
|
||||||
topics currently discussed ("now") and an indicative set of discussion
|
|
||||||
topics coming up next ("next").
|
|
||||||
|
|
||||||
Please note that:
|
Please note that:
|
||||||
|
|
||||||
* There can only be one "now" topic at a time. If multiple topics are
|
* There can only be one "now" topic at a time. If multiple topics are
|
||||||
|
@ -31,8 +42,29 @@ Example::
|
||||||
#swift next at 3pm we plan to cover cold storage features
|
#swift next at 3pm we plan to cover cold storage features
|
||||||
|
|
||||||
|
|
||||||
Testing
|
Admin commands
|
||||||
=======
|
==============
|
||||||
|
|
||||||
|
You have to ve a channel operator (+o) to use admin commands.
|
||||||
|
|
||||||
|
~list
|
||||||
|
List available room names
|
||||||
|
|
||||||
|
~add ROOM [ROOM..]
|
||||||
|
Add new room name(s)
|
||||||
|
|
||||||
|
~del ROOM [ROOM..]
|
||||||
|
Deletes room name(s)
|
||||||
|
|
||||||
|
~clean ROOM [ROOM..]
|
||||||
|
Removes active entries for specified room(s)
|
||||||
|
|
||||||
|
~wipe
|
||||||
|
Resets the database entirely (removes all defined rooms and entries)
|
||||||
|
|
||||||
|
|
||||||
|
Local testing
|
||||||
|
=============
|
||||||
|
|
||||||
Copy config.json.sample to config.json::
|
Copy config.json.sample to config.json::
|
||||||
|
|
||||||
|
|
|
@ -137,7 +137,7 @@ class PTGBot(irc.bot.SingleServerIRCBot):
|
||||||
return
|
return
|
||||||
self.send(chan, "%s: ack" % (nick,))
|
self.send(chan, "%s: ack" % (nick,))
|
||||||
|
|
||||||
if msg.startswith('!'):
|
if msg.startswith('~'):
|
||||||
if not self.channels[chan].is_oper(nick):
|
if not self.channels[chan].is_oper(nick):
|
||||||
self.send(chan, "%s: Need op for admin commands" % (nick,))
|
self.send(chan, "%s: Need op for admin commands" % (nick,))
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue