#include #include "broadcast.h" #include "db.h" #include "event.h" #include "net.h" #include "user_data.h" #include "util.h" // Returns whether value was new and therefore inserted into the list. // If already present, does nothing and returns false. // Assumes enough space for the possible new item. static bool sorted_insert(i64 *buf,i64 len,i64 value){ if(len==0){ buf[0]=value; return true; } i64 L=0,H=len-1; if(buf[L]==value||buf[H]==value)return false; if(valuebuf[H]){ buf[len]=value; return true; } while(Lvalue)break; } else if(buf[M]>value){ H=M-1; if(buf[H]