projects
/
cascardo
/
sendxmpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Import Upstream version 1.22
[cascardo/sendxmpp.git]
/
sendxmpp
diff --git
a/sendxmpp
b/sendxmpp
index
4a86f6e
..
b78fbc2
100755
(executable)
--- a/
sendxmpp
+++ b/
sendxmpp
@@
-16,7
+16,7
@@
if 0; # not running under some shell
#
# Released under the terms of the GNU General Public License v2
#
#
# Released under the terms of the GNU General Public License v2
#
-# $Platon: sendxmpp/sendxmpp,v 1.2
0 2010-01-18 00:54:16
rajo Exp $
+# $Platon: sendxmpp/sendxmpp,v 1.2
2 2010-10-03 19:36:35
rajo Exp $
# $Id: $
use Authen::SASL qw(Perl); # authentication broken if Authen::SASL::Cyrus module installed
# $Id: $
use Authen::SASL qw(Perl); # authentication broken if Authen::SASL::Cyrus module installed
@@
-44,7
+44,7
@@
sub terminate();
sub main();
my # MakeMaker
sub main();
my # MakeMaker
-$VERSION = [ q$Revision: 1.2
0
$ =~ m/(\S+)\s*$/g ]->[0];
+$VERSION = [ q$Revision: 1.2
2
$ =~ m/(\S+)\s*$/g ]->[0];
my $RESOURCE = 'sendxmpp';
my $VERBOSE = 0;
my $DEBUG = 0;
my $RESOURCE = 'sendxmpp';
my $VERBOSE = 0;
my $DEBUG = 0;
@@
-178,7
+178,7
@@
sub read_config_file ($) {
# account with specific connection host
if ($config{'jserver'} =~ /(.*);([-\.\w]+)/) {
$config{'jserver'} = $2;
# account with specific connection host
if ($config{'jserver'} =~ /(.*);([-\.\w]+)/) {
$config{'jserver'} = $2;
- $config{'username'} .= "\@$1";
+ $config{'username'} .= "\@$1"
unless $config{'component'}
;
}
}
}
}
@@
-405,7
+405,8
@@
sub xmpp_send_message ($$$$$$) {
my ($cnx, $rcpt, $comp, $subject, $message_type, $msg) = @_;
# for some reason, MessageSend does not return anything
my ($cnx, $rcpt, $comp, $subject, $message_type, $msg) = @_;
# for some reason, MessageSend does not return anything
- $cnx->MessageSend('to' => $rcpt . ( $comp ? "\@$comp" : '' ),
+ # mimeit01@xmpp.hs-esslingen.de: if $comp IS set, AND the rcpt DOESN'T contain an @, then @comp is added
+ $cnx->MessageSend('to' => $rcpt . ( ($comp && index($rcpt, "@") == -1) ? "\@$comp" : '' ),
'type' => $message_type,
'subject' => $subject,
'body' => $msg);
'type' => $message_type,
'subject' => $subject,
'body' => $msg);