*** VERSION 5.5.0 ***
[NeonServV5.git] / src / modules / stats.mod / module.c
index ee8a20d98b2436156e845b4d196eb277262e8ff1..f276a0abded650f370c1585344e9d2c9f2eb595a 100644 (file)
@@ -1,4 +1,4 @@
-/* module.c - NeonServ v5.4
+/* module.c - NeonServ v5.5
  * Copyright (C) 2011-2012  Philipp Kreil (pk910)
  * 
  * This program is free software: you can redistribute it and/or modify
@@ -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");
     }