blob: b9802477948e94353c6e3d3d1a748e1245f1cc61 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
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";
|