Changeset 186cdc4
- Timestamp:
- Feb 19, 2007, 7:04:08 PM (18 years ago)
- 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
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
perlwrap.pm
re8bc8ac r186cdc4 33 33 $configfile ||= $ENV{HOME}."/.owlconf"; 34 34 35 # populate global variable space for legacy owlconf files 35 # populate global variable space for legacy owlconf files 36 36 sub _format_msg_legacy_wrap { 37 37 my ($m) = @_; … … 40 40 } 41 41 42 # populate global variable space for legacy owlconf files 42 # populate global variable space for legacy owlconf files 43 43 sub _receive_msg_legacy_wrap { 44 44 my ($m) = @_; … … 166 166 $aval = $val->[$i]; 167 167 $aval =~ s/\n/\n$f.$i: /g; 168 $s .= "$f.$i: $aval\n"; 168 $s .= "$f.$i: $aval\n"; 169 169 } 170 170 } else { … … 239 239 ##################################################################### 240 240 241 package BarnOwl::Message::Loopback; 242 243 use base qw( BarnOwl::Message ); 244 245 # all loopback messages are personal 246 sub is_personal { 247 return 1; 248 } 249 250 ##################################################################### 251 ##################################################################### 252 241 253 package BarnOwl::Message::AIM; 242 254 … … 244 256 245 257 # all non-loginout AIM messages are personal for now... 246 sub is_personal { 258 sub is_personal { 247 259 return !(shift->is_loginout); 248 260 } … … 280 292 } 281 293 282 sub login_tty { 294 sub login_tty { 283 295 my ($m) = @_; 284 296 return undef if (!$m->is_loginout); … … 286 298 } 287 299 288 sub login_host { 300 sub login_host { 289 301 my ($m) = @_; 290 302 return undef if (!$m->is_loginout); … … 296 308 sub is_ping { return (lc(shift->opcode) eq "ping"); } 297 309 298 sub is_personal { 310 sub is_personal { 299 311 my ($m) = @_; 300 312 return ((lc($m->class) eq "message") … … 303 315 } 304 316 305 sub is_mail { 317 sub is_mail { 306 318 my ($m) = @_; 307 319 return ((lc($m->class) eq "mail") && $m->is_private); … … 373 385 BarnOwl::mainloop_hook() if *BarnOwl::mainloop_hook{CODE}; 374 386 } 375 387 376 388 @BarnOwl::Hooks::onMainLoop = (); 377 389 @BarnOwl::Hooks::onStartSubs = (); … … 388 400 } 389 401 390 sub reload_init () 402 sub reload_init () 391 403 { 392 404 BarnOwl::command('alias reload perl BarnOwl::reload()'); … … 589 601 { 590 602 my $m = shift; 591 603 592 604 my $body = $m->body; 593 # replace newline followed by anything with 605 # replace newline followed by anything with 594 606 # newline plus four spaces and that thing. 595 607 $body =~ s/\n(.)/\n $1/g;
Note: See TracChangeset
for help on using the changeset viewer.