Changeset 0572abcf
- Timestamp:
- Dec 24, 2009, 10:36:20 PM (15 years ago)
- Branches:
- master, release-1.10, release-1.6, release-1.7, release-1.8, release-1.9
- Children:
- ac374fc
- Parents:
- d771d1b (diff), 9f026c1 (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. - Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
ChangeLog
r82fbdf0 r1fd6086 1 1.5 2 * Allow ^Z to be rebound. -nelhage@mit.edu 3 * Skip some IRC admin messages by default, controlled by irc:skip -alexmv@mit.edu 4 * Reconnect and re-join channels on IRC disconnect -alexmv@mit.edu 5 * Correct the --with-libzephyr help string to --with-zephyr. -andersk@mit.edu 6 * Improve performance narrowing to certain filters. -nelhage@mit.edu 7 * Add completion for :filter* -adehnert@mit.edu 8 * Fix filter* -adehnert@mit.edu 9 * Mark the current mark with an asterisk -davidben@mit.edu 10 * Complete class names for the 'unsub' command. -nelhage@mit.edu 11 * Make control characters human-readable -kcr@1ts.org 12 * Further complete the show command -davidben@mit.edu 13 * Fix a bug reflowing text in the editwin. -davidben@mit.edu 14 * Reconnect to MUCs when reconnecting to Jabber. -asedeno@mit.edu 15 * Fix spurious trailing newlines in zsigs. -andersk@mit.edu 16 * Fix the behavior of the zsig variable. -kcr@1ts.org 17 * Drop owl_animate_hack. -asedeno@mit.edu 18 * Add IRC server and channel listing to buddylist -alexmv@mit.edu 19 * Make Jabber try to reconnect when disconnected, at exponential intervals -alexmv@mit.edu 20 * Better documentation for jabberlogout. -asedeno@mit.edu 21 * jabberlogout -a --> jabberlogout -A -asedeno@mit.edu 22 * Change the default jabber resource to 'barnowl' -asedeno@mit.edu 23 * Updated Jabber documentation for consistency. -zhangc@mit.edu 24 * Document :bindkey more clearly. -geofft@mit.edu 25 1 26 1.4 2 27 * Fix description of edit:history-next -davidben@mit.edu -
Makefile.am
r8df704f r89982ec 1 1 ACLOCAL_AMFLAGS = -I m4 2 2 3 GIT_FLAGS=$(if $(wildcard .git),-DGIT_VERSION=$(subst barnowl-,,$(shell git describe --match='barnowl-*' HEAD))) 3 GIT_DESCRIPTION := $(if $(wildcard .git),$(shell git describe --match='barnowl-*' HEAD 2>/dev/null)) 4 GIT_FLAGS := $(if $(GIT_DESCRIPTION),-DGIT_VERSION=$(GIT_DESCRIPTION:barnowl-%=%)) 4 5 5 6 bin_PROGRAMS = barnowl.bin -
commands.c
r8c97fa1 r6700c605 320 320 OWLCMD_INT("recv:setshift", owl_command_set_shift, OWL_CTX_INTERACTIVE, 321 321 "scrolls receive window to specified position", "", ""), 322 323 OWLCMD_VOID("recv:shiftleft", owl_command_shift_left, OWL_CTX_INTERACTIVE,324 "scrolls receive window to the left", "", ""),325 326 OWLCMD_VOID("recv:shiftright", owl_command_shift_right, OWL_CTX_INTERACTIVE,327 "scrolls receive window to the left", "", ""),328 322 329 323 OWLCMD_VOID("recv:pagedown", owl_function_mainwin_pagedown, … … 1361 1355 owl_mainwin_redisplay(owl_global_get_mainwin(&g)); 1362 1356 owl_global_set_needrefresh(&g); 1363 }1364 1365 void owl_command_shift_left(void)1366 {1367 owl_function_shift_left();1368 }1369 1370 void owl_command_shift_right(void)1371 {1372 owl_function_shift_right();1373 1357 } 1374 1358 -
configure.ac
r438009c r980fa31 1 1 dnl Process this file with autoconf to produce a configure script. 2 AC_INIT([BarnOwl],[1.5 pre1],[bug-barnowl@mit.edu])2 AC_INIT([BarnOwl],[1.5rc2],[bug-barnowl@mit.edu]) 3 3 AM_INIT_AUTOMAKE([-Wall foreign]) 4 4 m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) -
editwin.c
re9c6fc8 rc471e85 526 526 do { 527 527 werase(e->curswin); 528 if (e->topindex == -1 || e->index < e->topindex 529 || (e->index == e->topindex 530 && e->topindex > 0 531 && e->buff[e->topindex-1] != '\n')) 528 529 if (e->topindex == -1 || e->index < e->topindex) 532 530 oe_reframe(e); 533 531 … … 654 652 } 655 653 654 /* recenter if needed */ 655 if (start <= e->topindex) 656 owl_editwin_recenter(e); 657 656 658 return change; 657 659 } -
functions.c
r8c97fa1 rcce5dbd 3136 3136 #endif 3137 3137 3138 if(aim && zephyr) { 3139 if(owl_perlconfig_is_function("BarnOwl::Hooks::_get_blist")) { 3140 char * perlblist = owl_perlconfig_execute("BarnOwl::Hooks::_get_blist()"); 3141 if(perlblist) { 3142 owl_fmtext_append_ztext(&fm, perlblist); 3143 owl_free(perlblist); 3144 } 3138 if (aim && zephyr) { 3139 if (owl_perlconfig_is_function("BarnOwl::Hooks::_get_blist")) { 3140 char * perlblist = owl_perlconfig_execute("BarnOwl::Hooks::_get_blist()"); 3141 if (perlblist) { 3142 owl_fmtext_append_ztext(&fm, perlblist); 3143 owl_free(perlblist); 3145 3144 } 3145 } 3146 3146 } 3147 3147 -
perl/lib/BarnOwl.pm
r1b9a163 r6700c605 38 38 use BarnOwl::Completion; 39 39 40 use List::Util qw(max); 41 40 42 =head1 NAME 41 43 … … 421 423 }); 422 424 425 # Receive window scrolling 426 BarnOwl::new_command("recv:shiftleft", 427 \&BarnOwl::recv_shift_left, 428 { 429 summary => "scrolls receive window to the left", 430 usage => "recv:shiftleft [<amount>]", 431 description => <<END_DESCR 432 By default, scroll left by 10 columns. Passing no arguments or 0 activates this default behavior. 433 Otherwise, scroll by the number of columns specified as the argument. 434 END_DESCR 435 }); 436 437 BarnOwl::new_command("recv:shiftright", 438 \&BarnOwl::recv_shift_right, 439 { 440 summary => "scrolls receive window to the right", 441 usage => "recv:shiftright [<amount>]", 442 description => <<END_DESCR 443 By default, scroll right by 10 columns. Passing no arguments or 0 activates this default behavior. 444 Otherwise, scroll by the number of columns specified as the argument. 445 END_DESCR 446 }); 447 423 448 } 424 449 … … 485 510 } 486 511 512 =head3 Receive window scrolling 513 514 Permit scrolling the receive window left or right by arbitrary 515 amounts (with a default of 10 characters). 516 517 =cut 518 519 sub recv_shift_left 520 { 521 my $func = shift; 522 my $delta = shift; 523 $delta = 10 unless int($delta) > 0; 524 my $shift = BarnOwl::recv_getshift(); 525 if($shift > 0) { 526 BarnOwl::recv_setshift(max(0, $shift-$delta)); 527 } else { 528 return "Already full left"; 529 } 530 } 531 532 sub recv_shift_right 533 { 534 my $func = shift; 535 my $delta = shift; 536 $delta = 10 unless int($delta) > 0; 537 my $shift = BarnOwl::recv_getshift(); 538 BarnOwl::recv_setshift($shift+$delta); 539 } 540 487 541 =head3 default_zephyr_signature 488 542 -
perl/lib/BarnOwl/Hooks.pm
re2f7963 r7574eed 184 184 185 185 sub _get_blist { 186 return join("\n", $getBuddyList->run); 186 my @results = grep defined, $getBuddyList->run; 187 s/^\s+|\s+$//sg for (@results); 188 return join("\n", grep {length($_)} @results); 187 189 } 188 190 -
perl/modules/IRC/lib/BarnOwl/Module/IRC.pm
rf81176c r618a980 94 94 my $conn = $ircnets{$net}; 95 95 my ($nick, $server) = ($conn->nick, $conn->server); 96 $list .= BarnOwl::Style::boldify("IRC channels for $net ($nick\@$server)\n"); 96 $list .= BarnOwl::Style::boldify("IRC channels for $net ($nick\@$server)"); 97 $list .= "\n"; 97 98 98 99 for my $chan (keys %channels) { … … 100 101 $list .= " $chan\n"; 101 102 } 102 $list .= "\n";103 103 } 104 104 … … 167 167 168 168 BarnOwl::new_command( 169 'irc-disconnect' => mk_irc_command( \&cmd_disconnect ),169 'irc-disconnect' => \&cmd_disconnect, 170 170 { 171 171 summary => 'Disconnect from an IRC server', … … 391 391 392 392 sub cmd_disconnect { 393 my $cmd = shift; 394 my $conn = shift; 395 $conn->conn->disconnect; 396 return; 393 # Such a hack 394 local *get_connection_by_alias = sub { 395 my $key = shift; 396 return $ircnets{$key} if exists $ircnets{$key}; 397 return $reconnect{$key}{conn} if exists $reconnect{$key}; 398 die("No such ircnet: $key\n"); 399 }; 400 401 mk_irc_command( 402 sub { 403 my $cmd = shift; 404 my $conn = shift; 405 if ($conn->conn->connected) { 406 $conn->conn->disconnect; 407 } elsif ($reconnect{$conn->alias}) { 408 BarnOwl::admin_message('IRC', 409 "[" . $conn->alias . "] Reconnect cancelled"); 410 delete $reconnect{$conn->alias}; 411 } 412 } 413 )->(@_); 397 414 } 398 415 -
perl/modules/IRC/lib/BarnOwl/Module/IRC/Connection.pm
r99c1f46 r618a980 322 322 }, 323 323 } ); 324 $BarnOwl::Module::IRC::reconnect{$self->alias}{conn} = $self; 324 325 } 325 326 -
perl/modules/Jabber/lib/BarnOwl/Module/Jabber.pm
rf1a2736 r0cfa6ee 136 136 137 137 foreach my $jid ( $conn->getJIDs() ) { 138 139 next unless $conn->jidActive($jid) or $conn->tryReconnect($jid); 138 next if $conn->jidActive($jid); 139 $conn->tryReconnect($jid); 140 } 141 142 foreach my $jid ( $conn->getJIDs() ) { 143 next unless $conn->jidActive($jid); 140 144 141 145 my $client = $conn->getConnectionFromJID($jid); … … 210 214 my $roster = $conn->getRosterFromJID($jid); 211 215 if ($roster) { 212 $blist .= "\n" .BarnOwl::Style::boldify("Jabber roster for $jid\n");216 $blist .= BarnOwl::Style::boldify("Jabber roster for $jid\n"); 213 217 214 218 my @gTexts = (); … … 465 469 } 466 470 ); 467 my $roster = $conn->getRosterFromJID($jidStr); 468 $roster->fetch(); 469 $client->PresenceSend( priority => 1 ); 470 my $fullJid = $client->{SESSION}->{FULLJID} || $jidStr; 471 $conn->renameConnection($jidStr, $fullJid); 472 queue_admin_msg("Connected to jabber as $fullJid"); 473 # The remove_io_dispatch() method is called from the 474 # ConnectionManager's removeConnection() method. 475 $client->{fileno} = $client->getSocket()->fileno(); 476 #queue_admin_msg("Connected to jabber as $fullJid ($client->{fileno})"); 477 BarnOwl::add_io_dispatch($client->{fileno}, 'r', sub { $client->OwlProcess($fullJid) }); 478 479 # populate completion from roster. 480 for my $buddy ( $roster->jids('all') ) { 481 my %jq = $roster->query($buddy); 482 my $name = $jq{name} || $buddy->GetUserID(); 483 $completion_jids{$name} = 1; 484 $completion_jids{$buddy->GetJID()} = 1; 485 } 486 $vars{idletime} |= BarnOwl::getidletime(); 487 unless (exists $vars{keepAliveTimer}) { 488 $vars{keepAliveTimer} = BarnOwl::Timer->new({ 489 'after' => 5, 490 'interval' => 5, 491 'cb' => sub { BarnOwl::Module::Jabber::do_keep_alive_and_auto_away(@_) } 492 }); 493 } 471 $client->onConnect($conn, $jidStr); 494 472 } 495 473 } … … 1059 1037 sub process_incoming_chat_message { 1060 1038 my ( $sid, $j ) = @_; 1061 if ($j->DefinedBody() ) {1039 if ($j->DefinedBody() || BarnOwl::getvar('jabber:spew') eq 'on') { 1062 1040 BarnOwl::queue_message( j2o( $j, { direction => 'in', 1063 1041 sid => $sid } ) ); … … 1105 1083 # } 1106 1084 # 1107 if (BarnOwl::getvar('jabber:spew') eq 'on') {1085 if ($j->DefinedBody() || BarnOwl::getvar('jabber:spew') eq 'on') { 1108 1086 BarnOwl::queue_message( BarnOwl::Message->new(%jhash) ); 1109 1087 } -
perl/modules/Jabber/lib/BarnOwl/Module/Jabber/Connection.pm
r8590774 r0dbb7d2 163 163 } 164 164 165 =head2 OnConnect 166 167 Actions to perform on connecting and reconnecting. 168 169 =cut 170 171 sub onConnect { 172 my $self = shift; 173 my $conn = shift; 174 my $jidStr = shift; 175 176 my $fullJid = $self->{SESSION}->{FULLJID} || $jidStr; 177 my $roster = $conn->getRosterFromJID($jidStr); 178 179 $roster->fetch(); 180 $self->PresenceSend( priority => 1 ); 181 182 $conn->renameConnection($jidStr, $fullJid); 183 BarnOwl::admin_message('Jabber', "Connected to jabber as $fullJid"); 184 # The remove_io_dispatch() method is called from the 185 # ConnectionManager's removeConnection() method. 186 $self->{fileno} = $self->getSocket()->fileno(); 187 BarnOwl::add_io_dispatch($self->{fileno}, 'r', sub { $self->OwlProcess($fullJid) }); 188 189 # populate completion from roster. 190 for my $buddy ( $roster->jids('all') ) { 191 my %jq = $roster->query($buddy); 192 my $name = $jq{name} || $buddy->GetUserID(); 193 $BarnOwl::Module::Jabber::completion_jids{$name} = 1; 194 $BarnOwl::Module::Jabber::completion_jids{$buddy->GetJID()} = 1; 195 } 196 $BarnOwl::Module::Jabber::vars{idletime} |= BarnOwl::getidletime(); 197 unless (exists $BarnOwl::Module::Jabber::vars{keepAliveTimer}) { 198 $BarnOwl::Module::Jabber::vars{keepAliveTimer} = 199 BarnOwl::Timer->new({ 200 'after' => 5, 201 'interval' => 5, 202 'cb' => sub { BarnOwl::Module::Jabber::do_keep_alive_and_auto_away(@_) } 203 }); 204 } 205 } 206 165 207 =head1 SEE ALSO 166 208 -
perl/modules/Jabber/lib/BarnOwl/Module/Jabber/ConnectionManager.pm
rf1a2736 r2cca044 85 85 $self->{$jidStr}->{ReconnectAt} = time + $self->{$jidStr}->{ReconnectBackoff}; 86 86 87 my $status = $self->{$jidStr}->{Client}->Connect; 87 my $client = $self->{$jidStr}->{Client}; 88 my $status = $client->Connect; 88 89 return 0 unless $status; 89 90 90 my @result = $ self->{$jidStr}->{Client}->AuthSend( %{ $self->{$jidStr}->{Auth} } );91 my @result = $client->AuthSend( %{ $self->{$jidStr}->{Auth} } ); 91 92 if ( !@result || $result[0] ne 'ok' ) { 92 93 $self->removeConnection($jidStr); … … 94 95 return 0; 95 96 } 96 97 BarnOwl::admin_message(Jabber => "Reconnected to jabber as $jidStr"); 98 $self->{$jidStr}{Status} = "available"; 99 100 foreach my $muc ($self->{$jidStr}->{Client}->MUCs()) { 97 $self->{$jidStr}->{Roster} = $client->Roster(); 98 $self->{$jidStr}->{Status} = "available"; 99 $client->onConnect($self, $jidStr); 100 foreach my $muc ($client->MUCs()) { 101 101 $muc->Join($muc->{ARGS}); 102 102 } -
runtests.sh
r42ad917 r9f026c1 1 1 #!/bin/sh 2 prove t/ --perl ./perl_tester 2 HARNESS_PERL=./perl_tester exec prove t/ -
tester.c
re9c6fc8 rf0f2eec 223 223 owl_filter *f1, *f2, *f3, *f4, *f5; 224 224 225 owl_list_create(&(g.filterlist)); 225 owl_dict_create(&g.filters); 226 g.filterlist = NULL; 226 227 owl_message_init(&m); 227 228 owl_message_set_type_zephyr(&m); -
scripts/do-release
r01846ce rd771d1b 31 31 if [ ! "$force" ] && [ "$VERS" != "$(head -1 ChangeLog)" ]; then 32 32 die "No ChangeLog entry for version $VERS, aborting." 33 fi 34 35 head=$(git symbolic-ref HEAD) 36 head=${head#refs/heads/} 37 38 git rev-parse --verify -q $head >/dev/null 2>&1 39 git rev-parse --verify -q origin/$head >/dev/null 2>&1 40 if [ -n "$(git rev-list $head..origin/$head)" ]; then 41 die "$head is not up to date. Aborting." 33 42 fi 34 43
Note: See TracChangeset
for help on using the changeset viewer.