1. firefly
  2. Eldis4

Wiki

Clone wiki

Eldis4 / Home

I should probably write something less illegible here, though for now this page serves mostly as a personal scratchpad...

ToC

Eldis4 structure

* Eldis4
  - Backends          : node.js, Rhino?, ...
  - Connectors        : IRC, MC?, terminal?, www?, http?, ...
  - Modules           : a script file that interfaces with the Eldis4 module API. CommonJS.
  - Triggers          : something that is fired when a (raw, message) chat line is seen that
                      : matches a given format (commands, CTCPs, links, ...)
  - Security system   : a user (identified by its 'user hash', e.g. hostname) has a 'rights'
                      : hash associated with it. Other things (e.g. commands) has 'requires'
                      : hashes that the rights hash has to match for the thing to execute.

Eldis4 module API

bot: {
  register: function (name, TriggerObj),
  unregister: function (name),
  triggers: {name => TriggerObj},
  modules: {
    loaded: [filename ...],
    load: function (filename),
    reloadAll: function ()
  }
}

TriggerObj = {
  requires: {prop => {$op => value}},
  exec: function ({target, line, storage}, ...)
}

Todo

  • Improve security system (rights, requires).
    • Add new meta-op $any.
    • Default to equality if no meta-op.
    • Command to set/view rights from IRC.
  • Simplify trigger creation, e.g. wrap try-catch feature into a generic trigger creator funciton.
  • (Re)implement command-specific storage.
  • Port literals from Eldis3.
  • Add (google, wikipedia) commands
  • Implement CTCP trigger.
  • Add timeout for js...
  • Add more evaling: CoffeeScript, Lua, more?
  • Let commands be user-rights-sensitive.
  • Handle help with help <command>.
  • reload lies about "successfully" reloading modules even if errors occur.
  • Feature: "module" global in modules
    • module.log - logs to a module-specific config file.
    • module.storage - module-specific storage
    • module.storageDefaults - declarative way do define what config related info a module needs.
    • module event: 'save' - called when a save occurs.
    • module event: 'load' - called when a load occurs.
    • module event: 'close' - called when a module is unloaded.
  • Work out a (good) way to do error handling with async callbacks...

Updated