fixed crash in stats.mod/module.c
[NeonServV5.git] / src / modules / stats.mod / module.c
index ee8a20d98b2436156e845b4d196eb277262e8ff1..190972cf2a0c53f13b447345c36adaa56372d9ed 100644 (file)
@@ -114,7 +114,7 @@ static TIMEQ_CALLBACK(stats_timer_callback) {
         else
             bot = bot3;
         if(bot) {
-            pkgpos += sprintf(pkgbuf + pkgpos, "%s!%s@%s %d\n", bot->user->nick, bot->user->ident, bot->host, bot->port);
+            pkgpos += sprintf(pkgbuf + pkgpos, "%s!%s@%s %d\n", (bot->user ? bot->user->nick : "*"), (bot->user ? bot->user->ident : "*"), (bot->host ? bot->host : "*"), bot->port);
         } else
             pkgpos += sprintf(pkgbuf + pkgpos, "?\n");
     }