Bläddra i källkod

* Send first 2 CTCP responses for dronemones, not just the first

Bryan Drewery 16 år sedan
förälder
incheckning
8bd9277f03
2 ändrade filer med 5 tillägg och 4 borttagningar
  1. 4 3
      src/mod/ctcp.mod/ctcp.c
  2. 1 1
      src/mod/ctcp.mod/ctcp.h

+ 4 - 3
src/mod/ctcp.mod/ctcp.c

@@ -429,7 +429,7 @@ static int ctcp_PING(char *nick, char *uhost, struct userrec *u, char *object, c
   return BIND_RET_BREAK;
 }
 
-bool first_ctcp_check = 0;
+int first_ctcp_check = 0;
 
 static int ctcp_VERSION(char *nick, char *uhost, struct userrec *u, char *object, char *keyword, char *text)
 {
@@ -466,9 +466,10 @@ static int ctcp_VERSION(char *nick, char *uhost, struct userrec *u, char *object
   
   int queue = DP_HELP;
 
-  if (!first_ctcp_check) {
+  // Send out first few replies right away for dronemons
+  if (first_ctcp_check < 2) {
     queue = DP_SERVER;
-    first_ctcp_check = 1;
+    ++first_ctcp_check;
   }
 
   dprintf(queue, "NOTICE %s :\001%s %s%s\001\n", nick, keyword, ctcpversion, s);

+ 1 - 1
src/mod/ctcp.mod/ctcp.h

@@ -22,6 +22,6 @@
 void ctcp_init();
 void scriptchanged();
 extern char		kickprefix[], bankickprefix[];
-extern bool		first_ctcp_check;
+extern int		first_ctcp_check;
 
 #endif				/* _EGG_MOD_CTCP_CTCP_H */