erlbot.git
11 years agoirc application version 10.
Matt Mullins [Sun, 5 May 2013 07:04:46 +0000 (00:04 -0700)]
irc application version 10.

Upgrade includes:
  * new childspecs for all the irc application's supervisors
  * irc_amqp_listener will terminate its associated amqp_channel
  * irc_conn is [ab]used to recreate the irc_amqp_listener with a new
    childspec, since it's a transient process.

11 years agoUpgrade to irc_amqp_listener with new childspec.
Matt Mullins [Sun, 5 May 2013 07:00:20 +0000 (00:00 -0700)]
Upgrade to irc_amqp_listener with new childspec.

Bump the irc_conn state version and use the code_change capablities to recreate
the irc_amqp_listener process with the appropriate childspec upon up/downgrade.

11 years agoSplit out routing key creation into a new function
Matt Mullins [Sun, 5 May 2013 06:57:57 +0000 (23:57 -0700)]
Split out routing key creation into a new function

11 years agoClose Channel on irc_amqp_listener termination.
Matt Mullins [Sat, 4 May 2013 06:37:19 +0000 (23:37 -0700)]
Close Channel on irc_amqp_listener termination.

This fixes a bug wherein application:stop(irc) would leave a dangling Channel
that was consuming messages on a queue -- long after the process to which it
would deliver is dead.  That would cause the AMQP channel to exit with reason
unexpected_delivery_and_no_default_consumer, killing all of the rest of the
AMQP client and, by the transitive property of death, the irc application as
well.

The irc_amqp_listener must trap exits in order to receive a termination notice
from its supervisor.  I'm not actually sure if this has any implications for it
monitoring its AMQP Channel or not.

11 years agoCreate intermediate release. v9.5
Matt Mullins [Sun, 5 May 2013 07:23:56 +0000 (00:23 -0700)]
Create intermediate release.

This release only contains the changes needed to add a return value to
amqp_bot_listener:listen_for_events.  This must happen strictly /before/ the
changes that create/destroy new irc_amqp_listener processes, so that we can
forcibly keep the pattern matching in sync with the return value.

11 years agoBump amqp application version number.
Matt Mullins [Sun, 5 May 2013 06:50:31 +0000 (23:50 -0700)]
Bump amqp application version number.

amqp-2 contains the sole change that amqp_bot_listener:listen_for_events adds a
new value to the return tuple.

11 years agoBump irc_amqp_listener state version to 3.
Matt Mullins [Sat, 4 May 2013 06:56:59 +0000 (23:56 -0700)]
Bump irc_amqp_listener state version to 3.

Convert version 2 state to version 3 by hoping that the listener is only
monitoring one process.  Thankfully, amqp_bot_listener:listen_for_events
creates a monitor so that AMQP will kill IRC.

11 years agoReturn and save the AMQP Channel pid.
Matt Mullins [Sat, 4 May 2013 06:35:42 +0000 (23:35 -0700)]
Return and save the AMQP Channel pid.

11 years agoBump version number, add upgrade scripts v9
Matt Mullins [Tue, 22 Jan 2013 04:25:11 +0000 (20:25 -0800)]
Bump version number, add upgrade scripts

11 years agoSend !-commands to AMQP for other programs
Matt Mullins [Tue, 22 Jan 2013 04:00:16 +0000 (20:00 -0800)]
Send !-commands to AMQP for other programs

11 years agoUse erlang: prefix for integer conversion
Matt Mullins [Wed, 16 Jan 2013 06:01:35 +0000 (22:01 -0800)]
Use erlang: prefix for integer conversion

Apparently R14A doesn't see integer_to_list/2 and list_to_integer/2 without
the erlang: prefix.

11 years agoBump IRC app versions, disallow code_change. v8
Matt Mullins [Mon, 14 Jan 2013 06:47:16 +0000 (22:47 -0800)]
Bump IRC app versions, disallow code_change.

I am not planning to support upgrading/downgrading past this epoch.  It's
possible, but the existing IRC bot died for unrelated reasons, so there's no
real point in supporting it.  I'll just run with the new version.

11 years agoUse one AMQP listener with wildcard, per ircnet.
Matt Mullins [Mon, 14 Jan 2013 06:42:24 +0000 (22:42 -0800)]
Use one AMQP listener with wildcard, per ircnet.

11 years agoBump Erlang version numbers to Ubuntu precise
Matt Mullins [Mon, 14 Jan 2013 01:21:45 +0000 (17:21 -0800)]
Bump Erlang version numbers to Ubuntu precise

12 years agoBump release numbers. v7
Matt Mullins [Tue, 13 Dec 2011 06:47:10 +0000 (22:47 -0800)]
Bump release numbers.

12 years agoFix DoS where any IRC user can crash the bot.
Matt Mullins [Tue, 13 Dec 2011 06:33:13 +0000 (22:33 -0800)]
Fix DoS where any IRC user can crash the bot.

12 years agoLimit IRC reconnects to once every 30 seconds.
Matt Mullins [Tue, 13 Dec 2011 06:30:36 +0000 (22:30 -0800)]
Limit IRC reconnects to once every 30 seconds.

And I also fixed another bug that made reconnects fail anyway.

12 years agoAdded a !random command, and cut a new release. v6
Matt Mullins [Mon, 12 Dec 2011 07:09:53 +0000 (23:09 -0800)]
Added a !random command, and cut a new release.

Refactored IRC command handling, while I was at it.

13 years agoAdd an intermediate release 4.5, which allows clean downgrade from 5 to 4. v5
Matt Mullins [Sat, 3 Sep 2011 03:47:26 +0000 (22:47 -0500)]
Add an intermediate release 4.5, which allows clean downgrade from 5 to 4.

This is required because otherwise, the AMQP applications are destroyed before
the IRC application is downgraded, causing the whole thing to come crashing
down.

13 years agoProperly handle the instance name when upgraded from an old version
Matt Mullins [Sat, 3 Sep 2011 03:43:11 +0000 (22:43 -0500)]
Properly handle the instance name when upgraded from an old version

13 years agoHandle up/down-grade for the IRC application -- add/remove AMQP processes
Matt Mullins [Sat, 3 Sep 2011 03:39:53 +0000 (22:39 -0500)]
Handle up/down-grade for the IRC application -- add/remove AMQP processes

13 years agoAdd new modules to the IRC application
Matt Mullins [Thu, 1 Sep 2011 21:49:02 +0000 (16:49 -0500)]
Add new modules to the IRC application

13 years agoAdd AMQP client applications to release dependencies.
Matt Mullins [Thu, 1 Sep 2011 21:48:32 +0000 (16:48 -0500)]
Add AMQP client applications to release dependencies.

13 years agoUpdate ERTS version number to match Ubuntu maverick
Matt Mullins [Thu, 1 Sep 2011 21:48:17 +0000 (16:48 -0500)]
Update ERTS version number to match Ubuntu maverick

13 years agoAdd configuration support for AMQP username/password/vhost
Matt Mullins [Thu, 1 Sep 2011 20:33:21 +0000 (15:33 -0500)]
Add configuration support for AMQP username/password/vhost

13 years agoRefactored the way commands are sent from the AMQP listener to the irc_conn
Matt Mullins [Thu, 1 Sep 2011 20:31:49 +0000 (15:31 -0500)]
Refactored the way commands are sent from the AMQP listener to the irc_conn

13 years agoFix a bug to allow channels that do not have AMQP queues
Matt Mullins [Thu, 1 Sep 2011 19:42:22 +0000 (14:42 -0500)]
Fix a bug to allow channels that do not have AMQP queues

13 years agoUse the configuration file to determine AMQP routing key
Matt Mullins [Thu, 1 Sep 2011 19:07:29 +0000 (14:07 -0500)]
Use the configuration file to determine AMQP routing key

13 years agoFixed a bug caused by the Channel being killed out from under the AMQP module. RT...
Matt Mullins [Thu, 1 Sep 2011 05:23:32 +0000 (00:23 -0500)]
Fixed a bug caused by the Channel being killed out from under the AMQP module.  RT ticket #73.

13 years agoMove the irc_amqp_listener to be underneath the irc_object_sup
Matt Mullins [Thu, 1 Sep 2011 01:26:42 +0000 (20:26 -0500)]
Move the irc_amqp_listener to be underneath the irc_object_sup

13 years agoCreated the irc_object_supervisor, which is created by the irc_conn startup
Matt Mullins [Thu, 1 Sep 2011 01:25:18 +0000 (20:25 -0500)]
Created the irc_object_supervisor, which is created by the irc_conn startup

13 years agoAdd Supervisor, TableId, and the [future] irc_object_sup to the IRC connection state.
Matt Mullins [Thu, 1 Sep 2011 01:18:04 +0000 (20:18 -0500)]
Add Supervisor, TableId, and the [future] irc_object_sup to the IRC connection state.

13 years agoAdd the irc_conn PID to the ETS table
Matt Mullins [Thu, 1 Sep 2011 01:10:32 +0000 (20:10 -0500)]
Add the irc_conn PID to the ETS table

13 years agoRefactored the way configuration data is passed through the IRC application.
Matt Mullins [Tue, 30 Aug 2011 21:14:12 +0000 (16:14 -0500)]
Refactored the way configuration data is passed through the IRC application.

Instead of passing configuration data all the way from the irc_sup, all that is
passed is the instance name, and the irc_conn is responsible for getting the
configuration data from the config module.

13 years agoLink the AMQP channel to the process listening, so that it can correct server problems.
Matt Mullins [Sun, 28 Aug 2011 20:37:14 +0000 (15:37 -0500)]
Link the AMQP channel to the process listening, so that it can correct server problems.

13 years agoAdded registered process names to the AMQP application file
Matt Mullins [Sun, 28 Aug 2011 20:34:46 +0000 (15:34 -0500)]
Added registered process names to the AMQP application file

13 years agoUpdated version numbers for the release to match Ubuntu Maverick
Matt Mullins [Sun, 28 Aug 2011 20:34:15 +0000 (15:34 -0500)]
Updated version numbers for the release to match Ubuntu Maverick

13 years agoUpdated documentation on AMQP listener function.
Matt Mullins [Sun, 28 Aug 2011 20:00:30 +0000 (15:00 -0500)]
Updated documentation on AMQP listener function.

13 years agoVersion bump, added AMQP app to the release file
Matt Mullins [Sun, 28 Aug 2011 20:00:02 +0000 (15:00 -0500)]
Version bump, added AMQP app to the release file

13 years agoAdd irc application dependency on amqp application
Matt Mullins [Sun, 28 Aug 2011 19:53:01 +0000 (14:53 -0500)]
Add irc application dependency on amqp application

13 years agoAdded AMQP support to the irc application.
Matt Mullins [Fri, 26 Aug 2011 20:23:54 +0000 (15:23 -0500)]
Added AMQP support to the irc application.

13 years agoAMQP supports attaching a process to handle messages sent to an exchange.
Matt Mullins [Thu, 25 Aug 2011 05:02:26 +0000 (00:02 -0500)]
AMQP supports attaching a process to handle messages sent to an exchange.

13 years agoFix typo in names of irc_sup's children v4
Matt Mullins [Sun, 14 Aug 2011 20:34:50 +0000 (15:34 -0500)]
Fix typo in names of irc_sup's children

13 years agoRelease bump to upgrade the IRC app
Matt Mullins [Sun, 22 May 2011 06:31:07 +0000 (01:31 -0500)]
Release bump to upgrade the IRC app

13 years agoAdded botsnack functionality to the irc application
Matt Mullins [Sun, 22 May 2011 06:26:00 +0000 (01:26 -0500)]
Added botsnack functionality to the irc application

13 years agoBug fix: include the irc_util module in the irc application
Matt Mullins [Sun, 22 May 2011 05:41:13 +0000 (00:41 -0500)]
Bug fix: include the irc_util module in the irc application

13 years agoIRC application version was not a string.
Matt Mullins [Sun, 22 May 2011 05:29:30 +0000 (00:29 -0500)]
IRC application version was not a string.

13 years agoInclude the irc application in the release.
Matt Mullins [Sun, 22 May 2011 05:13:42 +0000 (00:13 -0500)]
Include the irc application in the release.

13 years agoBug fix for irc.floofy-skirts.org: don't JOIN channels until we know we're connected.
Matt Mullins [Sun, 22 May 2011 05:11:54 +0000 (00:11 -0500)]
Bug fix for irc.floofy-skirts.org: don't JOIN channels until we know we're connected.

13 years agoWrote the boiler-plate code to start the IRC modules as an application.
Matt Mullins [Sun, 22 May 2011 05:11:25 +0000 (00:11 -0500)]
Wrote the boiler-plate code to start the IRC modules as an application.

13 years agoAdded a newline to release file so version mismatch is easier.
Matt Mullins [Sun, 22 May 2011 01:28:21 +0000 (20:28 -0500)]
Added a newline to release file so version mismatch is easier.

13 years agoAdded module version to core/config; also made it a new release.
Matt Mullins [Sun, 22 May 2011 00:39:39 +0000 (19:39 -0500)]
Added module version to core/config; also made it a new release.

13 years agoAdded a release file so we can actually boot this thing.
Matt Mullins [Sat, 21 May 2011 23:22:31 +0000 (18:22 -0500)]
Added a release file so we can actually boot this thing.

13 years agoAdded boilerplate code to load the core modules as an app.
Matt Mullins [Sat, 21 May 2011 22:53:59 +0000 (17:53 -0500)]
Added boilerplate code to load the core modules as an app.

13 years agoAdded module to handle configuration files
Matt Mullins [Sat, 21 May 2011 22:53:25 +0000 (17:53 -0500)]
Added module to handle configuration files

13 years agoFinished writing the buffering/parsing code for handling messages from the IRC server
Matt Mullins [Thu, 19 May 2011 23:00:45 +0000 (18:00 -0500)]
Finished writing the buffering/parsing code for handling messages from the IRC server

13 years agoFinished most of the IRC protocol-level work:
Matt Mullins [Thu, 19 May 2011 20:15:10 +0000 (15:15 -0500)]
Finished most of the IRC protocol-level work:

  * added module irc_util to hold the parser and writer for IRC commands
  * irc_conn module should at least be able to join channels

13 years agoUpdated how configuration is bubbled through
Matt Mullins [Wed, 18 May 2011 05:33:32 +0000 (00:33 -0500)]
Updated how configuration is bubbled through

13 years agoRemoved "Supervisor" from state tracked in irc_conn
Matt Mullins [Wed, 18 May 2011 05:19:56 +0000 (00:19 -0500)]
Removed "Supervisor" from state tracked in irc_conn

13 years agoDeleted some un-implemented things from irc_net_sup, and changed some formatting...
Matt Mullins [Wed, 18 May 2011 05:17:24 +0000 (00:17 -0500)]
Deleted some un-implemented things from irc_net_sup, and changed some formatting to be easier to read.

13 years agoRenamed irc_sup to irc_net_sup; added some documentation
Matt Mullins [Wed, 18 May 2011 05:04:18 +0000 (00:04 -0500)]
Renamed irc_sup to irc_net_sup; added some documentation

13 years agoCreated a "core" application that supports core bot activities.
Matt Mullins [Wed, 18 May 2011 04:44:03 +0000 (23:44 -0500)]
Created a "core" application that supports core bot activities.

13 years agoMoved around the IRC modules
Matt Mullins [Wed, 18 May 2011 04:36:11 +0000 (23:36 -0500)]
Moved around the IRC modules

This will support factoring the bot into several "applications".

13 years agoBasic structure of the IRC modules. Nothing does anything, and I still need to make...
Matt Mullins [Mon, 20 Dec 2010 04:26:36 +0000 (22:26 -0600)]
Basic structure of the IRC modules.  Nothing does anything, and I still need to make sure my pid accounting works properly, but at least it kind of has the supervisory structure I'm going to want.

I made lots of TODO notes in comments.