diff options
| author | Jokler <jokler.contact@gmail.com> | 2017-10-10 17:48:30 +0200 |
|---|---|---|
| committer | Jokler <jokler.contact@gmail.com> | 2017-10-11 15:41:32 +0200 |
| commit | 0195219d5c0b0ff1486b3e6bdcd62a807d3d2932 (patch) | |
| tree | 0e518f025de563a9df792ad8237275d3ad71af5d /src/plugins/emoji.rs | |
| parent | ec33c870852f8a52f3cc0cf5a84b99c775dee1e3 (diff) | |
| download | frippy-0195219d5c0b0ff1486b3e6bdcd62a807d3d2932.tar.gz frippy-0195219d5c0b0ff1486b3e6bdcd62a807d3d2932.zip | |
Create plugin_derive to replace the register_plugin macro
Diffstat (limited to 'src/plugins/emoji.rs')
| -rw-r--r-- | src/plugins/emoji.rs | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/plugins/emoji.rs b/src/plugins/emoji.rs index c7054d8..b08b1b7 100644 --- a/src/plugins/emoji.rs +++ b/src/plugins/emoji.rs @@ -2,12 +2,16 @@ extern crate unicode_names; use irc::client::prelude::*; use irc::error::Error as IrcError; -use plugin::Plugin; -use PluginCommand; -register_plugin!(Emoji); +use plugin::*; +#[derive(PluginName, Debug)] +pub struct Emoji; impl Emoji { + pub fn new() -> Emoji { + Emoji {} + } + fn emoji(&self, server: &IrcServer, content: &str, target: &str) -> Result<(), IrcError> { let mut names: Vec<String> = Vec::new(); @@ -73,5 +77,4 @@ impl Plugin for Emoji { } #[cfg(test)] -mod tests { -} +mod tests {} |
