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:
parent
a7b9d801a1
commit
5551ebd552
@ -13,5 +13,7 @@ log = "0.3.6"
|
|||||||
env_logger = "0.4.0"
|
env_logger = "0.4.0"
|
||||||
transformable_channels = "0.1.1"
|
transformable_channels = "0.1.1"
|
||||||
time = "0.1"
|
time = "0.1"
|
||||||
|
regex = "0.2"
|
||||||
pvn = { git = "http://gitlab.monarch-pass.net/malacoda/pvn.git" }
|
pvn = { git = "http://gitlab.monarch-pass.net/malacoda/pvn.git" }
|
||||||
echobox = { git = "http://gitlab.monarch-pass.net/malacoda/echobox.git" }
|
echobox = { git = "http://gitlab.monarch-pass.net/malacoda/echobox.git" }
|
||||||
|
#stc = { git = "http://gitlab.monarch-pass.net/malacoda/stc.git" }
|
||||||
|
@ -5,6 +5,8 @@ extern crate rand;
|
|||||||
extern crate pvn;
|
extern crate pvn;
|
||||||
extern crate echobox;
|
extern crate echobox;
|
||||||
extern crate transformable_channels;
|
extern crate transformable_channels;
|
||||||
|
//extern crate stc;
|
||||||
|
extern crate regex;
|
||||||
|
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate hlua;
|
extern crate hlua;
|
||||||
|
@ -12,6 +12,7 @@ use modules::echo::EchoModule;
|
|||||||
use modules::random::RandomModule;
|
use modules::random::RandomModule;
|
||||||
use modules::pvn::PvnModule;
|
use modules::pvn::PvnModule;
|
||||||
use modules::echobox::EchoboxModule;
|
use modules::echobox::EchoboxModule;
|
||||||
|
use modules::autolink::AutolinkModule;
|
||||||
|
|
||||||
pub struct ModuleLoader {
|
pub struct ModuleLoader {
|
||||||
types: BTreeMap<&'static str, fn(&Table, &Table) -> Box<Module>>
|
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("random", RandomModule::new as fn(&Table, &Table) -> Box<Module>);
|
||||||
types.insert("pvn", PvnModule::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("echobox", EchoboxModule::new as fn(&Table, &Table) -> Box<Module>);
|
||||||
|
types.insert("autolink", AutolinkModule::new as fn(&Table, &Table) -> Box<Module>);
|
||||||
ModuleLoader {
|
ModuleLoader {
|
||||||
types: types
|
types: types
|
||||||
}
|
}
|
||||||
|
@ -5,6 +5,7 @@ pub mod echo;
|
|||||||
pub mod random;
|
pub mod random;
|
||||||
pub mod pvn;
|
pub mod pvn;
|
||||||
pub mod echobox;
|
pub mod echobox;
|
||||||
|
pub mod autolink;
|
||||||
|
|
||||||
pub mod loader;
|
pub mod loader;
|
||||||
|
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
[general]
|
||||||
|
foo = "bar"
|
||||||
|
|
||||||
[discord]
|
[discord]
|
||||||
token = "your token here"
|
token = "your token here"
|
||||||
|
|
||||||
@ -48,3 +51,13 @@ responses = ["ack"]
|
|||||||
[pvn]
|
[pvn]
|
||||||
|
|
||||||
[echobox]
|
[echobox]
|
||||||
|
|
||||||
|
[lua]
|
||||||
|
code = """
|
||||||
|
function on_message (message, reply)
|
||||||
|
reply("Lua says: " .. message)
|
||||||
|
end
|
||||||
|
"""
|
||||||
|
foo = "bar"
|
||||||
|
|
||||||
|
[autolink]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user