removed unused code in bots.c
[NeonServV5.git] / src / IRCParser.c
index c8cd526a5b37dae8ca0f6f9c72f231ae18aa74a3..bf7755142b7f9f7049a4a77fba4ce41b950dc7dd 100644 (file)
@@ -1,4 +1,4 @@
-/* IRCParser.c - NeonServ v5.5
+/* IRCParser.c - NeonServ v5.6
  * Copyright (C) 2011-2012  Philipp Kreil (pk910)
  * 
  * This program is free software: you can redistribute it and/or modify
@@ -340,8 +340,10 @@ static IRC_CMD(raw_join) {
             return 1; //ignore join
         }
         
-        chanuser = addChanUser(chan, user);
-        chanuser->visCount = 1;
+        if(!(chanuser = getChanUser(user, chan))) {
+            chanuser = addChanUser(chan, user);
+        }
+        chanuser->visCount++;
         chan->botcount++;
         
         if(isModeSet(chan->modes, 'D')) //if the bot joins a channel it could also be invisible