show just nick before message
authorDobrica Pavlinusic <dpavlin@rot13.org>
Mon, 30 Aug 2010 19:25:53 +0000 (19:25 +0000)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Mon, 30 Aug 2010 19:25:53 +0000 (19:25 +0000)
scripts/mqr-irc-client.pl
scripts/mqr-xmpp-client.pl

index fdfae80..03f981a 100755 (executable)
@@ -30,6 +30,7 @@ $sub->psubscribe( "MSG $subscribe", sub {
        return unless $from !~ m/\Q($nick|$room)\E/; # FIXME: skip our messages
        warn "#Q<< ",dump( $from, $message );
        my ( undef, $gw, $user ) = split(/ /,$from,3);
+       $user =~ s{^.+/}{};
        $con->send_msg( 'PRIVMSG', $room => "<$user> $message" );
 });
 
index f501940..2536051 100755 (executable)
@@ -54,8 +54,7 @@ warn "XXX send to $to\n";
                next if $from =~ m/\Q$to\E/; # FIXME
                warn "# $jid [$from] -> [$to] | $message\n";
                $user =~ s{!.+}{};
-               $gw   =~ s{^.+\/#}{#};
-               my $body = "<$user$gw> $message"; # FIXME
+               my $body = "<$user> $message"; # FIXME
                $cl->send_message( $body, $to => $jid, defined $muc_rooms->{$to} ? 'groupchat' : 'chat' );
        }
 });