WIP for autolinker module. Currently can't use stc and tqm together because of conflicting dependencies, so this is a placeholder.

This commit is contained in:
Adrian Malacoda 2017-02-26 17:17:22 -06:00
parent a7b9d801a1
commit 5551ebd552
5 changed files with 20 additions and 0 deletions

View File

@ -13,5 +13,7 @@ log = "0.3.6"
env_logger = "0.4.0"
transformable_channels = "0.1.1"
time = "0.1"
regex = "0.2"
pvn = { git = "http://gitlab.monarch-pass.net/malacoda/pvn.git" }
echobox = { git = "http://gitlab.monarch-pass.net/malacoda/echobox.git" }
#stc = { git = "http://gitlab.monarch-pass.net/malacoda/stc.git" }

View File

@ -5,6 +5,8 @@ extern crate rand;
extern crate pvn;
extern crate echobox;
extern crate transformable_channels;
//extern crate stc;
extern crate regex;
#[macro_use]
extern crate hlua;

View File

@ -12,6 +12,7 @@ use modules::echo::EchoModule;
use modules::random::RandomModule;
use modules::pvn::PvnModule;
use modules::echobox::EchoboxModule;
use modules::autolink::AutolinkModule;
pub struct ModuleLoader {
types: BTreeMap<&'static str, fn(&Table, &Table) -> Box<Module>>
@ -27,6 +28,7 @@ impl ModuleLoader {
types.insert("random", RandomModule::new as fn(&Table, &Table) -> Box<Module>);
types.insert("pvn", PvnModule::new as fn(&Table, &Table) -> Box<Module>);
types.insert("echobox", EchoboxModule::new as fn(&Table, &Table) -> Box<Module>);
types.insert("autolink", AutolinkModule::new as fn(&Table, &Table) -> Box<Module>);
ModuleLoader {
types: types
}

View File

@ -5,6 +5,7 @@ pub mod echo;
pub mod random;
pub mod pvn;
pub mod echobox;
pub mod autolink;
pub mod loader;

View File

@ -1,3 +1,6 @@
[general]
foo = "bar"
[discord]
token = "your token here"
@ -48,3 +51,13 @@ responses = ["ack"]
[pvn]
[echobox]
[lua]
code = """
function on_message (message, reply)
reply("Lua says: " .. message)
end
"""
foo = "bar"
[autolink]