[READ-ONLY] Mirror of https://github.com/VibeDevelopers/Comet.
0

Configure Feed

Select the types of activity you want to include in your feed.

Propagate server-time implicitly (ugh)

authored by

Ed Kellett and committed by
Stephen Bennett
(Oct 10, 2025, 8:09 PM +0100) 1a9633eb 10d2f6f4

+18
+3
include/parse.h
··· 42 42 extern rb_dictionary *alias_dict; 43 43 extern rb_dictionary *cmd_dict; 44 44 45 + extern const struct MsgBuf *incoming_message; 46 + extern const struct Client *incoming_client; 47 + 45 48 #endif /* INCLUDED_parse_h_h */
+8
ircd/parse.c
··· 44 44 rb_dictionary *cmd_dict = NULL; 45 45 rb_dictionary *alias_dict = NULL; 46 46 47 + const struct MsgBuf *incoming_message = NULL; 48 + const struct Client *incoming_client = NULL; 49 + 47 50 static void cancel_clients(struct Client *, struct Client *); 48 51 static void remove_unknown(struct Client *, const char *, char *); 49 52 ··· 153 156 return; 154 157 } 155 158 159 + incoming_message = &msgbuf; 160 + incoming_client = client_p; 161 + 156 162 if(handle_command(mptr, &msgbuf, client_p, from) < -1) 157 163 { 158 164 char *p; ··· 177 183 } 178 184 } 179 185 186 + incoming_message = NULL; 187 + incoming_client = NULL; 180 188 } 181 189 182 190 /*
+7
modules/cap_server_time.c
··· 32 32 #include "s_serv.h" 33 33 #include "numeric.h" 34 34 #include "chmode.h" 35 + #include "parse.h" 35 36 #include "inline/stringops.h" 36 37 37 38 static const char cap_server_time_desc[] = ··· 54 55 { 55 56 hook_data *data = data_; 56 57 static char buf[BUFSIZE]; 58 + const char *tagged_time; 57 59 struct MsgBuf *msgbuf = data->arg1; 58 60 struct timeval tv; 61 + 62 + if (incoming_client != NULL && IsServer(incoming_client) && !msgbuf_get_tag(msgbuf, "time") && (tagged_time = msgbuf_get_tag(incoming_message, "time"))) 63 + { 64 + msgbuf_append_tag(msgbuf, "time", tagged_time, CLICAP_SERVER_TIME); 65 + } 59 66 60 67 if (!IsMe(data->client) && !MyClient(data->client)) 61 68 return;