فهرست منبع

Stop sharing LASTON unlink entirely.

Every linked bot will set it on its own.
Bryan Drewery 10 سال پیش
والد
کامیت
4de6e77ccb
3فایلهای تغییر یافته به همراه6 افزوده شده و 3 حذف شده
  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 */