fixed possible crash (NULL pointer) in cmd_neonserv_unvisited.c
[NeonServV5.git] / src / modules / NeonServ.mod / cmd_neonserv_unvisited.c
index 1ff26e5523837b4115124d2e4999be2ec9445cef..fc00afacc25c162b11d9af2397cb155c8b53fe22 100644 (file)
@@ -1,4 +1,4 @@
-/* cmd_neonserv_unvisited.c - NeonServ v5.5
+/* cmd_neonserv_unvisited.c - NeonServ v5.6
  * Copyright (C) 2011-2012  Philipp Kreil (pk910)
  * 
  * This program is free software: you can redistribute it and/or modify
@@ -195,7 +195,7 @@ static void neonserv_cmd_unvisited_unreg(struct ClientSocket *client, char *chan
             putsock(bot, "PART %s :Channel unregistered.", channel);
         }
     }
-    if(client->botid == NEONSERV_BOTID) {
+    if(botid == NEONSERV_BOTID) {
         char setting[128];
         sprintf(setting, "modules.%s.auto_backup_unregister", get_module_name(module_id));
         if(get_int_field(setting))