- Timestamp:
- Jul 17, 2009, 9:46:45 PM (15 years ago)
- Branches:
- master, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
- Children:
- 2f2a643, f9c93cd
- Parents:
- a52d13a (diff), c08a725 (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. - Location:
- perl
- Files:
-
- 2 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
perl/lib/BarnOwl.pm
rfd8dfe7 r22b54a7 18 18 use BarnOwl::Style; 19 19 use BarnOwl::Timer; 20 use BarnOwl::Editwin; 20 21 21 22 =head1 NAME … … 316 317 } 317 318 319 =head2 Modify filters by appending text 320 321 =cut 322 323 BarnOwl::new_command("filterappend", 324 sub { filter_append_helper('appending', '', @_); }, 325 { 326 summary => "append '<text>' to filter", 327 usage => "filterappend <filter> <text>", 328 }); 329 330 BarnOwl::new_command("filterand", 331 sub { filter_append_helper('and-ing', 'and', @_); }, 332 { 333 summary => "append 'and <text>' to filter", 334 usage => "filterand <filter> <text>", 335 }); 336 337 BarnOwl::new_command("filteror", 338 sub { filter_append_helper('or-ing', 'or', @_); }, 339 { 340 summary => "append 'or <text>' to filter", 341 usage => "filteror <filter> <text>", 342 }); 343 344 =head3 filter_append_helper ACTION SEP FUNC FILTER APPEND_TEXT 345 346 Helper to append to filters. 347 348 =cut 349 350 sub filter_append_helper 351 { 352 my $action = shift; 353 my $sep = shift; 354 my $func = shift; 355 my $filter = shift; 356 my @append = @_; 357 my $oldfilter = BarnOwl::getfilter($filter); 358 chomp $oldfilter; 359 my $newfilter = join(' ', $oldfilter, $sep, @_); 360 my $msgtext = "To filter '$filter' $action\n'".join(' ', @append)."' to get\n'$newfilter'"; 361 if (BarnOwl::getvar('showfilterchange') eq 'on') { 362 BarnOwl::admin_message("Filter", $msgtext); 363 } 364 BarnOwl::filter($filter, $newfilter); 365 return; 366 } 367 BarnOwl::new_variable_bool("showfilterchange", 368 { default => 1, 369 summary => 'Show modifications to filters by filterappend and friends.'}); 318 370 319 371 1; -
perl/lib/BarnOwl/Message.pm
rfd8dfe7 rd1ae4a4 22 22 sub direction { return shift->{"direction"}; } 23 23 sub time { return shift->{"time"}; } 24 sub unix_time { return shift->{"unix_time"}; } 24 25 sub id { return shift->{"id"}; } 25 26 sub body { return shift->{"body"}; } -
perl/lib/BarnOwl/Message/Zephyr.pm
rbc8275e r30e7ffd 179 179 180 180 my $cmd; 181 if(lc $self->opcode eq 'crypt') { 181 if(lc $self->opcode eq 'crypt' and ( not $sender or $self->is_private)) { 182 # Responses to zcrypted messages should be zcrypted, so long as we 183 # aren't switching to personals 182 184 $cmd = 'zcrypt'; 183 185 } else { -
perl/lib/BarnOwl/Style/Default.pm
ree183be r5550eb0 3 3 4 4 package BarnOwl::Style::Default; 5 use POSIX qw(strftime); 6 5 7 ################################################################################ 6 8 # Branching point for various formatting functions in this style. … … 40 42 my $self = shift; 41 43 my $m = shift; 42 my ($time) = $m->time =~ /(\d\d:\d\d)/; 43 return $time; 44 return strftime('%H:%M', localtime($m->unix_time)); 44 45 } 45 46 -
perl/modules/IRC/lib/BarnOwl/Module/IRC.pm
r1b62a55 r48f7d12 60 60 register_commands(); 61 61 register_handlers(); 62 BarnOwl::filter('irc type ^IRC$ ');62 BarnOwl::filter('irc type ^IRC$ or ( type ^admin$ and adminheader ^IRC$ )'); 63 63 } 64 64 … … 375 375 $conn->conn->disconnect; 376 376 delete $ircnets{$conn->alias}; 377 return; 377 378 } 378 379 … … 387 388 BarnOwl::start_edit_win("/msg -a " . $conn->alias . " $to", sub {process_msg($conn, $to, @_)}); 388 389 } 390 return; 389 391 } 390 392 … … 415 417 ); 416 418 BarnOwl::queue_message($msg); 419 return; 417 420 } 418 421 … … 423 426 $target ||= shift; 424 427 $conn->conn->mode($target, @_); 428 return; 425 429 } 426 430 … … 432 436 push @{$channels{$chan}}, $conn; 433 437 $conn->conn->join($chan, @_); 438 return; 434 439 } 435 440 … … 440 445 $channels{$chan} = [grep {$_ ne $conn} @{$channels{$chan} || []}]; 441 446 $conn->conn->part($chan); 447 return; 442 448 } 443 449 … … 447 453 my $nick = shift or die("Usage: $cmd <new nick>\n"); 448 454 $conn->conn->nick($nick); 455 return; 449 456 } 450 457 … … 455 462 $conn->names_tmp([]); 456 463 $conn->conn->names($chan); 464 return; 457 465 } 458 466 … … 462 470 my $who = shift || die("Usage: $cmd <user>\n"); 463 471 $conn->conn->whois($who); 472 return; 464 473 } 465 474 … … 468 477 my $conn = shift; 469 478 $conn->conn->motd; 479 return; 470 480 } 471 481 … … 477 487 } 478 488 BarnOwl::popless_ztext($message); 489 return; 479 490 } 480 491 … … 485 496 BarnOwl::error("WHO $cmd $conn $who"); 486 497 $conn->conn->who($who); 498 return; 487 499 } 488 500 … … 492 504 my $type = shift || die("Usage: $cmd <chiklmouy> [server] \n"); 493 505 $conn->conn->stats($type, @_); 506 return; 494 507 } 495 508 … … 499 512 my $chan = shift; 500 513 $conn->conn->topic($chan, @_ ? join(" ", @_) : undef); 514 return; 501 515 } 502 516 … … 505 519 my $conn = shift; 506 520 $conn->conn->sl(join(" ", @_)); 521 return; 507 522 } 508 523 -
perl/modules/IRC/lib/BarnOwl/Module/IRC/Connection.pm
r32620ac r7c83a32 273 273 $self->whois_tmp 274 274 ); 275 $self->whois_tmp( []);275 $self->whois_tmp(''); 276 276 } 277 277
Note: See TracChangeset
for help on using the changeset viewer.