[1014] in BarnOwl Developers
[D-O-H] r998 - trunk/owl/perl/modules/IRC/lib/BarnOwl/Module
daemon@ATHENA.MIT.EDU (geofft@MIT.EDU)
Thu Oct 29 18:12:08 2009
Resent-From: nelhage@mit.edu
Resent-To: barnowl-dev-mtg@charon.mit.edu
X-Original-To: nelhage@nelhage.com
Date: Mon, 31 Mar 2008 01:59:47 -0400
To: dirty-owl-hackers@mit.edu
From: geofft@MIT.EDU
Reply-To: dirty-owl-hackers@MIT.EDU
Author: geofft
Date: 2008-03-31 01:59:47 -0400 (Mon, 31 Mar 2008)
New Revision: 998
Modified:
trunk/owl/perl/modules/IRC/lib/BarnOwl/Module/IRC.pm
Log:
Implement /me for outgoing IRC messages
Modified: trunk/owl/perl/modules/IRC/lib/BarnOwl/Module/IRC.pm
===================================================================
--- trunk/owl/perl/modules/IRC/lib/BarnOwl/Module/IRC.pm 2008-03-30 00:48:00 UTC (rev 997)
+++ trunk/owl/perl/modules/IRC/lib/BarnOwl/Module/IRC.pm 2008-03-31 05:59:47 UTC (rev 998)
@@ -208,7 +208,12 @@
my $body = shift;
# Strip whitespace. In the future -- send one message/line?
$body =~ tr/\n\r/ /;
- $conn->conn->privmsg($to, $body);
+ if ($body =~ /^\/me (.*)/) {
+ $conn->conn->me($to, $1);
+ $body = BarnOwl::Style::boldify($conn->nick.' '.$1);
+ } else {
+ $conn->conn->privmsg($to, $body);
+ }
my $msg = BarnOwl::Message->new(
type => 'IRC',
direction => is_private($to) ? 'out' : 'in',