Browse Source

* Don't check counter for my own ops as it may have incremented in the queue before seeing the last last counter

Bryan Drewery 17 năm trước cách đây
mục cha
commit
02b991bbe8
1 tập tin đã thay đổi với 5 bổ sung2 xóa
  1. 5 2
      src/mod/irc.mod/irc.c

+ 5 - 2
src/mod/irc.mod/irc.c

@@ -479,7 +479,10 @@ static int checkcookie(const char *chname, const memberlist* opper, const member
 
 
   //Lookup counter for the opper
   //Lookup counter for the opper
   unsigned long last_counter = 0;
   unsigned long last_counter = 0;
-  if (hash_table_find(bot_counters, opper->user->handle, &last_counter) == -1) last_counter = 0;
+  // Don't check counter for my own ops as it may have incremented in the queue before seeing the last last counter
+  if (conf.bot->u != opper->user) {
+    if (hash_table_find(bot_counters, opper->user->handle, &last_counter) == -1) last_counter = 0;
+  }
 
 
 #ifdef DEBUG
 #ifdef DEBUG
 sdprintf("key: %s", key);
 sdprintf("key: %s", key);
@@ -498,7 +501,7 @@ if (indexHint == 0) {
     return BC_SLACK;
     return BC_SLACK;
 
 
   //Only check on the first cookie
   //Only check on the first cookie
-  if (indexHint == 0) {
+  if (indexHint == 0 && conf.bot->u != opper->user) {
     if (counter <= last_counter)
     if (counter <= last_counter)
       return BC_COUNTER;
       return BC_COUNTER;