slackbuilds_ponce/network/sendxmpp/patches/04.patch
Alexander Verbovetsky a428f1a4cd network/sendxmpp: Added (send xmpp messages from the command line).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
2019-01-24 18:08:19 +07:00

26 lines
788 B
Diff

From 17fa8783527fcbfb7624889cdf5de12375517924 Mon Sep 17 00:00:00 2001
From: Andrey Shertsinger <andrey@shertsinger.ru>
Date: Thu, 14 May 2015 14:18:46 +0600
Subject: [PATCH] Fix for support virtual domain user names
---
sendxmpp | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/sendxmpp b/sendxmpp
index 0d7c4ff..7045c16 100755
--- a/sendxmpp
+++ b/sendxmpp
@@ -355,8 +355,10 @@ sub xmpp_login ($$$$$$$$$$$$) { # {{{
# use the xmpp domain as the host and enable SRV lookups
if (!$host) {
- if ($user =~ /@(.*)/) {
- $arghash->{hostname} = $host = $1;
+ if ($user =~ /([\.\w_#-]+)@(.*)/) {
+ $arghash->{hostname} = $host = $2;
+ $arghash->{componentname} = $2;
+ $user = $1;
$arghash->{srv} = 1;
debug_print "enabling SRV lookups";