The AutoAck code is becoming slightly hard to maintain due to many different commands all being part of a centralized "if" statement in the main loop. It is not strictly clear where or how to add new functionality. However, the basic functionality of any action remains simple:
On receive message m from user u, perform action(m,u).
onMessage(m,u)
Therefore, a simple plugin framework can be created so that every plugin is clean, and implements a small set of functions. This simplifies adding new code.
This issue is to add a simple framework for plugins and refactor basic actions of the Auto-Ack to be implemented that framework. It also constitutes the refactor of basic actions into "Plugins"
Plugin Framework:
Class:
Function 1: run(user,message)
Runs this plugin with IRC message consisting of given 'message' from given 'user'
Function 2: list()
Allows user to list commands supported by this plugin.
The AutoAck code is becoming slightly hard to maintain due to many different commands all being part of a centralized "if" statement in the main loop. It is not strictly clear where or how to add new functionality. However, the basic functionality of any action remains simple:
Therefore, a simple plugin framework can be created so that every plugin is clean, and implements a small set of functions. This simplifies adding new code.
This issue is to add a simple framework for plugins and refactor basic actions of the Auto-Ack to be implemented that framework. It also constitutes the refactor of basic actions into "Plugins"
Plugin Framework:
Class:
Function 1: run(user,message)
Runs this plugin with IRC message consisting of given 'message' from given 'user'
Function 2: list()
Allows user to list commands supported by this plugin.