remove resource from contact jid
authorDobrica Pavlinusic <dpavlin@rot13.org>
Sun, 29 Aug 2010 00:33:29 +0000 (02:33 +0200)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Sun, 29 Aug 2010 00:33:29 +0000 (02:33 +0200)
scripts/mqr-xmpp-client.pl

index 84acdd1..d0a7e67 100755 (executable)
@@ -56,7 +56,9 @@ $cl->reg_cb (
 
                my $body = $msg->any_body;
 
-               $contacts->{ $msg->from }++;
+               my $f = $msg->from;
+               $f =~ s!/.+!!;
+               $contacts->{ $f }++;
 
 warn "# contacts ",dump($contacts);