Fix mistakes, update repo
This commit is contained in:
parent
5bf1df10b1
commit
72ee2ee105
|
@ -4,7 +4,7 @@ version = "0.2.6"
|
||||||
authors = ["SoniEx2 <endermoneymod@gmail.com>"]
|
authors = ["SoniEx2 <endermoneymod@gmail.com>"]
|
||||||
description = "Lets you write HexChat plugins in Rust"
|
description = "Lets you write HexChat plugins in Rust"
|
||||||
license = "AGPL-3.0+"
|
license = "AGPL-3.0+"
|
||||||
repository = "https://bitbucket.org/SoniEx2/hexchat-plugin.rs"
|
repository = "https://cybre.tech/SoniEx2/rust.hexchat.hexchat-plugin/"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
libc = "0.2"
|
libc = "0.2"
|
||||||
|
|
|
@ -789,8 +789,8 @@ impl PluginHandle {
|
||||||
///
|
///
|
||||||
/// fn register_print_hooks(ph: &mut PluginHandle) {
|
/// fn register_print_hooks(ph: &mut PluginHandle) {
|
||||||
/// ph.hook_print("Channel Message", |ph, arg| {
|
/// ph.hook_print("Channel Message", |ph, arg| {
|
||||||
/// if let Some(nick) = word.get(0) {
|
/// if let Some(nick) = arg.get(0) {
|
||||||
/// if nick == "KnOwN_SpAmMeR" {
|
/// if *nick == "KnOwN_SpAmMeR" {
|
||||||
/// return hexchat_plugin::EAT_ALL
|
/// return hexchat_plugin::EAT_ALL
|
||||||
/// }
|
/// }
|
||||||
/// }
|
/// }
|
||||||
|
@ -841,10 +841,10 @@ impl PluginHandle {
|
||||||
/// use hexchat_plugin::PluginHandle;
|
/// use hexchat_plugin::PluginHandle;
|
||||||
///
|
///
|
||||||
/// fn register_timers(ph: &mut PluginHandle) {
|
/// fn register_timers(ph: &mut PluginHandle) {
|
||||||
/// ph.hook_timer(|ph| {
|
/// ph.hook_timer(2000, |ph| {
|
||||||
/// ph.print("timer up!");
|
/// ph.print("timer up!");
|
||||||
/// false
|
/// false
|
||||||
/// }, 2000);
|
/// });
|
||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
pub fn hook_timer<F>(&mut self, timeout: i32, cb: F) -> TimerHookHandle where F: Fn(&mut PluginHandle) -> bool + 'static + ::std::panic::RefUnwindSafe {
|
pub fn hook_timer<F>(&mut self, timeout: i32, cb: F) -> TimerHookHandle where F: Fn(&mut PluginHandle) -> bool + 'static + ::std::panic::RefUnwindSafe {
|
||||||
|
|
Loading…
Reference in New Issue