Skip to content
forked from fastmail/Synergy

a little annoying bot that annoys me a little

Notifications You must be signed in to change notification settings

Tamarou/Synergy

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Synergy

Synergy is an IRC bot mostly for interacting with LiquidPlanner. Her primary purpose is to remind a user that they haven't got a timer running. During business hours, she will pester her user if a timer isn't running, escalating from IRC to SMS. She can be called off on IRC. Synergy also responds to commands via SMS.

Caveats

This code is a mess. I banged it out mostly in one night, and with very poor command of POE. It uses synchronous libraries for stuff where it should clearly not. It probably has some stupid race conditions. It assumes that you can trust nicknames never to be spoofed, which might be true on your work IRC, but certainly not on public servers.

If you use this, and something bad happens, don't say you weren't warned!

Installation and Usage

Install all the prereqs. This is mostly easily done with Carton.

$ carton install

You need to set up a configuration file in YAML format. Look at the example file to see what config options are expected, because they're not documented yet. Run the program like this, more or less:

$ SYNERGY_CONFIG=/path/to/config carton exec perl synergy

Commands

Most commands can only be run by Synergy's "master". In the future, it would be nice to make Synergy handle LP status for more users, but LiquidPlanner doesn't offer any way to delegate rights to a third-party app other than password sharing.

Commands for Everyone

page USER: This will send an SMS to the user, who must be the master user. Anyone can use this command.

page USER: MESSAGE: This will send the message as an SMS to the user, who must be the master user. Anyone can use this command.

task for USER: DESC: This will create a new task for the named user and report the URL. Anyone can use this command. Because of the LiquidPlanner auth system, one LP user is used to make every task, meaning that the "created by" field becomes less reliable. The user who asked for the command is noted in the task's initial description.

remind USER [ at TIME | in DURATION ] [with page]?: REMINDER: This command schedules a message to be send to the given user on the current channel. It doesn't check that the user is present now or later. It can be told to send a page, too.

alerts: This lists all active alerts in Circonus.

ack ALERTID for TIME: This acks the identified alert for a while.

oncall: This lists who is on call in Circonus.

oncall add USER [ USER... ]: Add users to the list of on call users.

oncall remove USER [ USER... ]: Remove users from the list of on call users.

oncall set USER [ USER... ]: Totally replace the contents of the on call group.

Commands for the Master User

Because LiquidPlanner doesn't for a token that can manipulate aspects of other users' timers, these commands only work for the user whose credentials are used for LiquidPlanner. In the future, this could be tweaked to allow many sets of credentials to be stored.

status: Synergy will tell you whether you've got a timer running.

commit: MESSAGE: Synergy will commit your current timer's time and add a comment given in your message. If it ends with "DONE", that will be removed and the task will be marked complete. Otherwise, time timer will start running again from zero.

stop timer: Synergy will stop your timer, leaving its time in place.

abort timer: Synergy will stop your timer and clear your timer.

chill [ for DURATION | until TIME ]: This tells Synergy not to nag you until later.

showtime: This tells Synergy to cancel any grace period. In the future, this will be used to start nagging outside of normal business hours.

show's over: This tells Synergy that you're done for the day, and not to nag you until the next business day.

About

a little annoying bot that annoys me a little

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Perl 100.0%