Procházet zdrojové kódy

Stop sharing LASTON unlink entirely.

Every linked bot will set it on its own.
Bryan Drewery před 10 roky
rodič
revize
4de6e77ccb
3 změnil soubory, kde provedl 6 přidání a 3 odebrání
  1. 4 1
      src/botnet.cc
  2. 1 1
      src/userrec.cc
  3. 1 1
      src/userrec.h

+ 4 - 1
src/botnet.cc

@@ -309,8 +309,11 @@ void rembot(const char *whoin)
 
   struct userrec *u = get_user_by_handle(userlist, (char *) who);
 
-  if (u)
+  if (u) {
+    noshare++;
     touch_laston(u, "unlinked", now);
+    noshare--;
+  }
 
   ptr2 = *ptr;
   *ptr = ptr2->next;

+ 1 - 1
src/userrec.cc

@@ -53,7 +53,7 @@
 #include <bdlib/src/AtomicFile.h>
 #include <bdlib/src/String.h>
 
-bool             noshare = 1;		/* don't send out to sharebots	    */
+int             noshare = 1;		/* don't send out to sharebots	    */
 struct userrec	*userlist = NULL;	/* user records are stored here	    */
 struct userrec	*lastuser = NULL;	/* last accessed user record	    */
 maskrec		*global_bans = NULL,

+ 1 - 1
src/userrec.h

@@ -26,5 +26,5 @@ struct userrec *get_user_by_host(char *);
 
 extern struct userrec  		*userlist, *lastuser;
 extern int			cache_hit, cache_miss, userfile_perm;
-extern bool			noshare;
+extern int			noshare;
 #endif /* !_USERREC_H */