+ $muc->join_room ($acc->connection, $room, node_jid ($acc->jid));
+ $muc->reg_cb (
+ message => sub {
+ my ($cl, $room, $msg, $is_echo) = @_;
+
+ return if $is_echo;
+ return if $msg->is_delayed;
+ my $mynick = res_jid ($room->nick_jid);
+ if ($msg->any_body =~ /^\s*\Q$mynick\E:\s+(.*?)\s*$/) {
+ my $ans = answer_to ($1);
+ my $repl = $msg->make_reply;
+ $repl->add_body ($ans);
+ $repl->send;
+ }
+ }
+ );