Changeset feabce2 for perl


Ignore:
Timestamp:
May 9, 2008, 8:01:05 PM (13 years ago)
Author:
Nelson Elhage <nelhage@mit.edu>
Branches:
master, barnowl_perlaim, debian, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
61abb18
Parents:
db0ac7e (diff), 0eaa488 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:
Merged revisions 1033-1037 via svnmerge from 
svn+ssh://lunatique.mit.edu/mit/barnowl/src/svn/trunk

........
  r1034 | geofft | 2008-05-05 14:56:52 -0400 (Mon, 05 May 2008) | 1 line
  
  IRC: /list, /who, and /stats commands
........
  r1035 | geofft | 2008-05-06 01:37:29 -0400 (Tue, 06 May 2008) | 1 line
  
  IRC: Make M-N mostly, rather than completely, useless.
........
  r1036 | nelhage | 2008-05-06 20:10:17 -0400 (Tue, 06 May 2008) | 2 lines
  
  Fix two small bugs in styling pointed out by broder
........
  r1037 | nelhage | 2008-05-06 20:32:23 -0400 (Tue, 06 May 2008) | 2 lines
  
  Document create_style
........
Location:
perl/modules
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • perl/modules/IRC/lib/BarnOwl/Message/IRC.pm

    r1fd5041b r8df6cbb  
    3939        my $network = $self->network;
    4040        my $channel = $self->channel;
    41         my $filter = "irc-$network-channel-$channel";
    42         my $ftext = qq{type ^irc\$ and network ^$network\$ and channel ^$channel\$};
     41        my $sender = $self->sender;
     42        my ($filter, $ftext);
     43        if ($inst && $self->body =~ /^(\S+):/) {
     44            $filter = "irc-$network-channel-$channel-$sender-$1";
     45            $ftext = qq{type ^irc\$ and network ^$network\$ and channel ^$channel\$ and ( sender ^$sender\$ or sender ^$1\$ )};
     46        } else {
     47            $filter = "irc-$network-channel-$channel";
     48            $ftext = qq{type ^irc\$ and network ^$network\$ and channel ^$channel\$};
     49        }
    4350        BarnOwl::filter("$filter $ftext");
    4451        return $filter;
  • perl/modules/IRC/lib/BarnOwl/Module/IRC.pm

    r919535f rf094fc4  
    114114    BarnOwl::new_command('irc-whois'      => \&cmd_whois);
    115115    BarnOwl::new_command('irc-motd'       => \&cmd_motd);
     116    BarnOwl::new_command('irc-list'       => \&cmd_list);
     117    BarnOwl::new_command('irc-who'        => \&cmd_who);
     118    BarnOwl::new_command('irc-stats'      => \&cmd_stats);
    116119}
    117120
     
    146149        $host = shift @ARGV or die("Usage: $cmd HOST\n");
    147150        if(!$alias) {
    148             if($host =~ /^(?:irc[.])?(\w+)[.]\w+$/) {
     151            if($host =~ /^(?:irc[.])?([\w-]+)[.]\w+$/) {
    149152                $alias = $1;
    150153            } else {
     
    152155            }
    153156        }
    154         $port = shift @ARGV || 6667;
    155157        $ssl ||= 0;
     158        $port = shift @ARGV || ($ssl ? 6697 : 6667);
    156159    }
    157160
     
    275278}
    276279
     280sub cmd_list {
     281    my $cmd = shift;
     282    my $message = BarnOwl::Style::boldify('Current IRC networks:') . "\n";
     283    while (my ($alias, $conn) = each %ircnets) {
     284        $message .= '  ' . $alias . ' => ' . $conn->nick . '@' . $conn->server . "\n";
     285    }
     286    BarnOwl::popless_ztext($message);
     287}
     288
     289sub cmd_who {
     290    my $cmd = shift;
     291    my $conn = get_connection(\@_);
     292    my $who = shift || die("Usage: $cmd <user>\n");
     293    $conn->conn->who($who);
     294}
     295
     296sub cmd_stats {
     297    my $cmd = shift;
     298    my $conn = get_connection(\@_);
     299    my $type = shift || die("Usage: $cmd <chiklmouy> [server] \n");
     300    $conn->conn->stats($type, @_);
     301}
     302
    277303################################################################################
    278304########################### Utilities/Helpers ##################################
  • perl/modules/Jabber/lib/BarnOwl/Module/Jabber.pm

    rb72a352 rdb0ac7e  
    2626use Getopt::Long;
    2727Getopt::Long::Configure(qw(no_getopt_compat prefix_pattern=-|--));
     28
     29use utf8;
    2830
    2931our $VERSION = 0.1;
     
    378380                    $vars{jlogin_havepass} = 1;
    379381                    $conn->removeConnection($jidStr);
    380                     BarnOwl::start_password( "Password for $jidStr: ", \&do_login );
     382                    BarnOwl::start_password("Password for $jidStr: ", \&do_login );
    381383                    return "";
    382384                }
     
    487489    }
    488490    else {
    489         $to = shift @ARGV;
     491      $to = shift @ARGV;
    490492    }
    491493
     
    531533    $cmd .= " -t $jwrite_thread" if $jwrite_thread;
    532534    $cmd .= " -s $jwrite_subject" if $jwrite_subject;
    533     BarnOwl::start_edit_win( $cmd, \&process_owl_jwrite );
     535
     536    BarnOwl::start_edit_win($cmd, \&process_owl_jwrite );
    534537}
    535538
  • perl/modules/Jabber/lib/BarnOwl/Module/Jabber/Connection.pm

    r6b580b0 r5f3168a  
    11use warnings;
    22use strict;
     3use utf8;
    34
    45=head1 NAME
  • perl/modules/Jabber/lib/Net/XMPP/Debug.pm

    rc2bed55 rb7b2a76  
    189189                        {
    190190                            $self->{HANDLE}->autoflush(1);
     191                            binmode $self->{HANDLE}, ":utf8";
    191192                            $Net::XMPP::Debug::HANDLES{$args{file}} = $self->{HANDLE};
    192193                        }
  • perl/modules/Jabber/lib/Net/XMPP/Message.pm

    rc2bed55 r8574801  
    135135                            $Mess->SetMessage(TO=>"bob\@jabber.org",
    136136                                              Subject=>"Lunch",
    137                                               BoDy=>"Let's do lunch!");
     137                                              Body=>"Let's do lunch!");
    138138                            $Mess->SetMessage(to=>"bob\@jabber.org",
    139139                                              from=>"jabber.org",
  • perl/modules/Jabber/lib/XML/Stream.pm

    r5073972 ra8d5a39  
    16591659    {
    16601660        $self->debug(3,"Send: can_write");
    1661        
     1661
    16621662        $self->{SENDSTRING} = Encode::encode_utf8(join("",@_));
    16631663
Note: See TracChangeset for help on using the changeset viewer.