diff --git a/sendxmpp b/sendxmpp index 423ff2b..91ae1ef 100755 --- a/sendxmpp +++ b/sendxmpp @@ -175,13 +175,13 @@ sub read_config_file ($) { # {{{ } # account with weird port number - if ($config{'jserver'} =~ /(.*):(\d+)/) { + if (defined($config{'jserver'}) and $config{'jserver'} =~ /(.*):(\d+)/) { $config{'jserver'} = $1; $config{'port'} = $2; } # account with specific connection host - if ($config{'jserver'} =~ /(.*);([-\.\w]+)/) { + if (defined($config{'jserver'}) and $config{'jserver'} =~ /(.*);([-\.\w]+)/) { $config{'jserver'} = $2; $config{'username'} .= "\@$1" unless $config{'component'}; }