Changeset 45d9eb0 for perl/modules/jabber.pl
- Timestamp:
- Jan 24, 2007, 10:30:47 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:
- b2648bc
- Parents:
- 989fae0
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
perl/modules/jabber.pl
r989fae0 r45d9eb0 255 255 BarnOwl::error("Connection for $jid undefined -- error in reload?"); 256 256 } 257 257 258 258 my $status = $client->Process(0); 259 259 if ( !defined($status) ) { … … 390 390 { 391 391 summary => "Jabber Roster related commands.", 392 description => "jroster sends jabber commands related to rosters.\n\n", 392 description => "jroster sends jabber commands related to rosters.\n\n" 393 . "The following commands are available\n\n" 394 . "sub <jid> Subscribe to <jid>'s presence. (implicit add)\n\n" 395 . "add <jid> Adds <jid> to your roster.\n\n" 396 . "unsub <jid> Unsubscribe from <jid>'s presence.\n\n" 397 . "remove <jid> Removes <jid> to your roster. (implicit unsub)\n\n" 398 . "auth <jid> Authorizes <jid> to subscribe to your presence.\n\n" 399 . "deauth <jid> De-authorizes <jid>'s subscription to your presence.\n\n" 400 . "The following arguments are supported for all commands\n\n" 401 . "-a <jid> Specify which account to make the roster changes on.\n" 402 . " Required if you're signed into more than one account.\n\n" 403 . "The following arguments only work with the add and sub commands.\n\n" 404 . "-g <group> Add <jid> to group <group>.\n" 405 . " May be specified more than once, will not remove <jid> from any groups.\n\n" 406 . "-p Purge. Removes <jid> from all groups.\n" 407 . " May be combined with -g completely alter <jid>'s groups.\n\n" 408 . "-n <name> Sets <name> as <jid>'s short name.\n\n" 409 . "Note: Unless -n is used, you can specify multiple <jid> arguments.\n", 393 410 usage => "jroster COMMAND ARGS" 394 411 } … … 402 419 my $password = ''; 403 420 $password = shift if @_; 404 421 405 422 my $uid = $jid->GetUserID(); 406 423 my $componentname = $jid->GetServer(); … … 492 509 } 493 510 delete $vars{jlogin_jid}; 494 $vars{jlogin_password} =~ tr/\0-\377/x/ ;511 $vars{jlogin_password} =~ tr/\0-\377/x/ if $vars{jlogin_password}; 495 512 delete $vars{jlogin_password}; 496 513 delete $vars{jlogin_havepass}; … … 584 601 585 602 my @candidates = guess_jwrite($from, $to); 586 603 587 604 unless(scalar @candidates) { 588 605 die("Unable to resolve JID $to"); … … 601 618 602 619 ($jwrite_from, $jwrite_to, $jwrite_type) = @{$candidates[0]}; 603 620 604 621 $vars{jwrite} = { 605 622 to => $jwrite_to, … … 620 637 ); 621 638 } 622 639 623 640 my $cmd = "jwrite $jwrite_to -a $jwrite_from"; 624 641 $cmd .= " -t $jwrite_thread" if $jwrite_thread; … … 1180 1197 " -a " . ( ( $dir eq 'out' ) ? $props{from} : $props{to} ); 1181 1198 1199 if ($dir eq 'out') { 1200 $props{replysendercmd} = "jwrite ".$props{to}." -a ".$props{from}; 1201 } 1202 else { 1203 $props{replysendercmd} = "jwrite ".$props{from}." -a ".$props{to}; 1204 } 1205 1182 1206 $props{sender} = $nick || $room; 1183 1207 $props{recipient} = $room; … … 1204 1228 } 1205 1229 1206 $props{replysendercmd} = $props{replycmd} ;1230 $props{replysendercmd} = $props{replycmd} unless $props{replysendercmd}; 1207 1231 return %props; 1208 1232 } … … 1323 1347 } 1324 1348 1325 return undef; 1349 my @mucs = $conn->getConnectionFromJID($from)->MUCs; 1350 for my $m (@mucs) { 1351 if ($m->BaseJID eq $to) { 1352 return $m->BaseJID; 1353 } 1354 } 1355 1356 return $to; 1326 1357 } 1327 1358 … … 1365 1396 push @$m, $type; 1366 1397 } 1367 1398 1368 1399 return @matches; 1369 1400 }
Note: See TracChangeset
for help on using the changeset viewer.