diff options
author | SoniEx2 <endermoneymod@gmail.com> | 2022-04-11 19:33:04 -0300 |
---|---|---|
committer | SoniEx2 <endermoneymod@gmail.com> | 2022-04-11 22:39:16 -0300 |
commit | 207026ae5e35da096b8110afe1ba2973a0e54fdb (patch) | |
tree | 2612bfe820324034716409a27c5317efa39ba9a4 /src/word.rs | |
parent | 3b38f6e4f418baafe48989a90ce17661a6c2966f (diff) |
[Project] hexchat-unsafe-plugin.rs
A best-effort safe wrapper for the hexchat C API. Enables writing native hexchat plugins in mostly-safe Rust.
Diffstat (limited to 'src/word.rs')
-rw-r--r-- | src/word.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/word.rs b/src/word.rs index 8bcabfc..9e484d7 100644 --- a/src/word.rs +++ b/src/word.rs @@ -1,5 +1,5 @@ // This file is part of Hexchat Plugin API Bindings for Rust -// Copyright (C) 2018, 2021 Soni L. +// Copyright (C) 2018, 2021, 2022 Soni L. // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as @@ -22,7 +22,7 @@ use std::ops::Deref; /// # Examples /// /// ```no_run -/// use hexchat_plugin::{PluginHandle, Word, WordEol, Eat}; +/// use hexchat_unsafe_plugin::{PluginHandle, Word, WordEol, Eat}; /// /// fn cmd_foo(ph: &mut PluginHandle, arg: Word, arg_eol: WordEol) -> Eat { /// if arg.len() < 3 { @@ -30,14 +30,14 @@ use std::ops::Deref; /// } else { /// ph.print(&format!("{} {} {}", arg[0], arg[1], arg[2])); /// } -/// hexchat_plugin::EAT_ALL +/// hexchat_unsafe_plugin::EAT_ALL /// } /// /// fn on_privmsg(ph: &mut PluginHandle, word: Word, word_eol: WordEol) -> Eat { /// if word.len() > 0 && word[0].starts_with('@') { /// ph.print("We have message tags!?"); /// } -/// hexchat_plugin::EAT_NONE +/// hexchat_unsafe_plugin::EAT_NONE /// } /// ``` pub struct Word<'a> { @@ -49,7 +49,7 @@ pub struct Word<'a> { /// # Examples /// /// ```no_run -/// use hexchat_plugin::{PluginHandle, Word, WordEol, Eat}; +/// use hexchat_unsafe_plugin::{PluginHandle, Word, WordEol, Eat}; /// /// fn cmd_foo(ph: &mut PluginHandle, arg: Word, arg_eol: WordEol) -> Eat { /// if arg.len() < 3 { @@ -57,14 +57,14 @@ pub struct Word<'a> { /// } else { /// ph.print(&format!("{} {} {}", arg[0], arg[1], arg_eol[2])); /// } -/// hexchat_plugin::EAT_ALL +/// hexchat_unsafe_plugin::EAT_ALL /// } /// /// fn on_privmsg(ph: &mut PluginHandle, word: Word, word_eol: WordEol) -> Eat { /// if word_eol.len() > 0 && word[0].starts_with('@') { /// ph.print("We have message tags!?"); /// } -/// hexchat_plugin::EAT_NONE +/// hexchat_unsafe_plugin::EAT_NONE /// } /// ``` pub struct WordEol<'a> { |