From a5a0156f449ee7fdd4a99b93127e6e073dae7d57 Mon Sep 17 00:00:00 2001 From: mertz Date: Thu, 29 Nov 2001 16:16:09 +0000 Subject: modif du man pour mieux expliquer le unbind --- Ivy.pm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Ivy.pm b/Ivy.pm index 0e1d37e..947afda 100644 --- a/Ivy.pm +++ b/Ivy.pm @@ -1888,6 +1888,8 @@ message that matches the regexp (case insensitive). See perlre(1) to find how to write regexps. Use the bracketing construct ( ... ) so that your callback is called with the captured bits of text as parameters. +To unbind callback(s) associated to a regexp use bindRegexp with only +one argument, the regexp. Example : $ivyobject->bindRegexp("\w+ (\d+)", [\&callback, @cb_parameters]); @@ -1896,7 +1898,7 @@ called with the captured bits of text as parameters. # the name of appli who send the message # Your callback and method must be like: - sub cb { + sub callback { my ($sendername, @cb_parameters, @matched_regexps_in_brackets) = @_; ... @@ -1908,6 +1910,9 @@ called with the captured bits of text as parameters. ... } + # to unbind: + $ivyobject->bindRegexp("\w+ (\d+)"); + =item B $ivyobj->sendDirectMsgs($to, $id, @msgs); -- cgit v1.1