summaryrefslogtreecommitdiff
path: root/mysql.c
diff options
context:
space:
mode:
Diffstat (limited to 'mysql.c')
-rw-r--r--mysql.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/mysql.c b/mysql.c
index 9ddac4455..8366d5c74 100644
--- a/mysql.c
+++ b/mysql.c
@@ -1474,7 +1474,11 @@ void db_mysql_load_ns_dbase(void)
nc->memos.memomax = atoi(mysql_row[9]);
nc->channelcount = atoi(mysql_row[10]);
nc->channelmax = atoi(mysql_row[11]);
- nc->greet = sstrdup(mysql_row[12]);
+
+ if (mysql_row[12][0] == '\0') /* check if it's empty */
+ nc->greet = NULL;
+ else
+ nc->greet = sstrdup(mysql_row[12]);
if (!NSAllowKillImmed)
nc->flags &= ~NI_KILL_IMMED;