summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorSoniEx2 <endermoneymod@gmail.com>2018-09-29 23:45:15 -0300
committerSoniEx2 <endermoneymod@gmail.com>2018-09-29 23:45:43 -0300
commit72ee2ee105e0fea4f4a1222419eaac809d3b5bd1 (patch)
tree978e5b7149372d5b46958c4ec92abd62379dfdce /src
parent5bf1df10b12c95c0d6b33ccdb53f8d4caf6ee670 (diff)
Fix mistakes, update repo
Diffstat (limited to 'src')
-rw-r--r--src/lib.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 2235e5b..b89ead0 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -789,8 +789,8 @@ impl PluginHandle {
     ///
     /// fn register_print_hooks(ph: &mut PluginHandle) {
     ///     ph.hook_print("Channel Message", |ph, arg| {
-    ///         if let Some(nick) = word.get(0) {
-    ///             if nick == "KnOwN_SpAmMeR" {
+    ///         if let Some(nick) = arg.get(0) {
+    ///             if *nick == "KnOwN_SpAmMeR" {
     ///                 return hexchat_plugin::EAT_ALL
     ///             }
     ///         }
@@ -841,10 +841,10 @@ impl PluginHandle {
     /// use hexchat_plugin::PluginHandle;
     ///
     /// fn register_timers(ph: &mut PluginHandle) {
-    ///     ph.hook_timer(|ph| {
+    ///     ph.hook_timer(2000, |ph| {
     ///         ph.print("timer up!");
     ///         false
-    ///     }, 2000);
+    ///     });
     /// }
     /// ```
     pub fn hook_timer<F>(&mut self, timeout: i32, cb: F) -> TimerHookHandle where F: Fn(&mut PluginHandle) -> bool + 'static + ::std::panic::RefUnwindSafe {