Changeset bfc127b for perl/modules/Jabber/lib/BarnOwl/Module/Jabber.pm
- Timestamp:
- Jul 28, 2008, 10:07:48 AM (16 years ago)
- Branches:
- master, debian, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
- Children:
- 601733d
- Parents:
- a1a2036
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
perl/modules/Jabber/lib/BarnOwl/Module/Jabber.pm
ra1a2036 rbfc127b 235 235 ); 236 236 BarnOwl::new_command( 237 jaway => \&cmd_jaway, 238 { 239 summary => "Set Jabber away / presence information", 240 usage => "jaway [-s online|dnd|...] [<message>]" 241 } 242 ); 243 BarnOwl::new_command( 237 244 jlist => \&cmd_jlist, 238 245 { … … 757 764 } 758 765 766 sub cmd_jaway { 767 my $cmd = shift; 768 local @ARGV = @_; 769 my $getopt = Getopt::Long::Parser->new; 770 my ($jid, $show); 771 my $p = new Net::Jabber::Presence; 772 773 $getopt->configure('pass_through', 'no_getopt_compat'); 774 $getopt->getoptions( 775 'account=s' => \$jid, 776 'show=s' => \$show 777 ); 778 $jid ||= defaultJID(); 779 if ($jid) { 780 $jid = resolveConnectedJID($jid); 781 return unless $jid; 782 } 783 else { 784 BarnOwl::error('You must specify an account with -a {jid}'); 785 } 786 787 $p->SetShow($show eq "online" ? "" : $show) if $show; 788 $p->SetStatus(join(' ', @ARGV)) if @ARGV; 789 $conn->getConnectionFromJID($jid)->Send($p); 790 } 791 792 759 793 sub jroster_sub { 760 794 my $jid = shift;
Note: See TracChangeset
for help on using the changeset viewer.