Changeset 186cdc4


Ignore:
Timestamp:
Feb 19, 2007, 7:04:08 PM (18 years ago)
Author:
Alejandro R. Sedeño <asedeno@mit.edu>
Branches:
master, barnowl_perlaim, debian, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
1cc95709
Parents:
a4e0ee8
Message:
Add loopwrite message class.
Trim trailing whitespace.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • perlwrap.pm

    re8bc8ac r186cdc4  
    3333$configfile ||= $ENV{HOME}."/.owlconf";
    3434
    35 # populate global variable space for legacy owlconf files 
     35# populate global variable space for legacy owlconf files
    3636sub _format_msg_legacy_wrap {
    3737    my ($m) = @_;
     
    4040}
    4141
    42 # populate global variable space for legacy owlconf files 
     42# populate global variable space for legacy owlconf files
    4343sub _receive_msg_legacy_wrap {
    4444    my ($m) = @_;
     
    166166                $aval = $val->[$i];
    167167                $aval =~ s/\n/\n$f.$i: /g;
    168                 $s .= "$f.$i: $aval\n";   
     168                $s .= "$f.$i: $aval\n";
    169169            }
    170170        } else {
     
    239239#####################################################################
    240240
     241package BarnOwl::Message::Loopback;
     242
     243use base qw( BarnOwl::Message );
     244
     245# all loopback messages are personal
     246sub is_personal {
     247  return 1;
     248}
     249
     250#####################################################################
     251#####################################################################
     252
    241253package BarnOwl::Message::AIM;
    242254
     
    244256
    245257# all non-loginout AIM messages are personal for now...
    246 sub is_personal { 
     258sub is_personal {
    247259    return !(shift->is_loginout);
    248260}
     
    280292}
    281293
    282 sub login_tty { 
     294sub login_tty {
    283295    my ($m) = @_;
    284296    return undef if (!$m->is_loginout);
     
    286298}
    287299
    288 sub login_host { 
     300sub login_host {
    289301    my ($m) = @_;
    290302    return undef if (!$m->is_loginout);
     
    296308sub is_ping     { return (lc(shift->opcode) eq "ping"); }
    297309
    298 sub is_personal { 
     310sub is_personal {
    299311    my ($m) = @_;
    300312    return ((lc($m->class) eq "message")
     
    303315}
    304316
    305 sub is_mail { 
     317sub is_mail {
    306318    my ($m) = @_;
    307319    return ((lc($m->class) eq "mail") && $m->is_private);
     
    373385      BarnOwl::mainloop_hook() if *BarnOwl::mainloop_hook{CODE};
    374386  }
    375    
     387
    376388  @BarnOwl::Hooks::onMainLoop = ();
    377389  @BarnOwl::Hooks::onStartSubs = ();
     
    388400}
    389401
    390 sub reload_init () 
     402sub reload_init ()
    391403{
    392404    BarnOwl::command('alias reload perl BarnOwl::reload()');
     
    589601{
    590602    my $m = shift;
    591    
     603
    592604    my $body = $m->body;
    593     # replace newline followed by anything with 
     605    # replace newline followed by anything with
    594606    # newline plus four spaces and that thing.
    595607    $body =~ s/\n(.)/\n    $1/g;
Note: See TracChangeset for help on using the changeset viewer.