summaryrefslogtreecommitdiff
path: root/Ivy.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Ivy.pm')
-rw-r--r--Ivy.pm7
1 files changed, 6 insertions, 1 deletions
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<sendDirectMsgs>
$ivyobj->sendDirectMsgs($to, $id, @msgs);