From 9960666abef914905768c5f9fb43c3de846b80c2 Mon Sep 17 00:00:00 2001
From: thomascube <thomas@roundcube.net>
Date: Sun, 20 Aug 2006 10:06:30 -0400
Subject: [PATCH] Added support for Nox Spell Server; plus small bugfixes

---
 program/include/main.inc |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/program/include/main.inc b/program/include/main.inc
index 887668b..1a2b8c7 100644
--- a/program/include/main.inc
+++ b/program/include/main.inc
@@ -439,12 +439,12 @@
      Inspired by Marco <P0L0_notspam_binware.org>
   */
   // Check if we need to add domain
-  if ($CONFIG['username_domain'] && !strstr($user, '@'))
+  if (!empty($CONFIG['username_domain']) && !strstr($user, '@'))
     {
     if (is_array($CONFIG['username_domain']) && isset($CONFIG['username_domain'][$host]))
       $user .= '@'.$CONFIG['username_domain'][$host];
-    else if (!empty($CONFIG['username_domain']))
-      $user .= '@'.$CONFIG['username_domain'];    
+    else if (is_string($CONFIG['username_domain']))
+      $user .= '@'.$CONFIG['username_domain'];
     }
 
 

--
Gitblit v1.9.1