Changeset 27a1903 for perl/modules/IRC/lib/BarnOwl
- Timestamp:
- Sep 30, 2009, 9:32:36 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:
- 5b483a6
- Parents:
- 9300fe5
- git-author:
- Nelson Elhage <nelhage@mit.edu> (09/19/09 20:18:35)
- git-committer:
- Nelson Elhage <nelhage@mit.edu> (09/30/09 21:32:36)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
perl/modules/IRC/lib/BarnOwl/Module/IRC/Completion.pm
r216b1d0 r27a1903 6 6 use BarnOwl::Completion::Util qw(complete_flags); 7 7 8 my %networks = (); 9 my %dests = (); 10 my %servers = (); 8 our %users = (); 9 our %servers = (); 11 10 12 sub complete_networks { keys % networks }13 sub complete_dests { keys % dests}14 sub complete_channels { grep /^#/, keys %dests }15 sub complete_nicks { grep /^[^#]/, keys %dests }11 sub complete_networks { keys %BarnOwl::Module::IRC::ircnets } 12 sub complete_dests { keys %users, complete_channels() } 13 sub complete_channels { keys %BarnOwl::Module::IRC::channels } 14 sub complete_nicks { keys %users } 16 15 sub complete_servers { keys %servers } 17 16 … … 75 74 my $m = shift; 76 75 return unless $m->type eq 'IRC'; 77 $networks{$m->network} = 1; 78 $dests{$m->recipient} = 1; 79 $dests{$m->sender} = 1; 76 if ($m->recipient !~ m{^#}) { 77 $users{$m->recipient} = 1; 78 } 79 if ($m->sender !~ m{^#}) { 80 $users{$m->sender} = 1; 81 } 80 82 $servers{$m->server} = 1; 81 83 }
Note: See TracChangeset
for help on using the changeset viewer.