commit - a39e2f22c928a8bd8d16c2e008a62800f6412fe6
commit + 62f705f97e580fe61520793b3387081915f240ba
blob - 397bc91586c7bcdf2ddb7a722c574bec374278b0
blob + 63093c25f64462b1468cc99bac2e4b7cea22e5a5
--- src/ngircd/conn.c
+++ src/ngircd/conn.c
CLIENT *c;
c = Conn_GetClient(Idx);
- assert( c != NULL);
+ starttime = time(NULL);
+
+ assert(c != NULL);
/* Servers do get special command limits, so they can process
* all the messages that are required while peering. */
switch (Client_Type(c)) {
case CLIENT_SERVER:
- maxcmd = MAX_COMMANDS_SERVER; break;
+ /* Allow servers to send more commands in the first 10 secods
+ * to speed up server login and network synchronisation. */
+ if (starttime - Client_StartTime(c) < 10)
+ maxcmd = MAX_COMMANDS_SERVER * 5;
+ else
+ maxcmd = MAX_COMMANDS_SERVER;
+ break;
case CLIENT_SERVICE:
maxcmd = MAX_COMMANDS_SERVICE; break;
}
- starttime = time(NULL);
for (i=0; i < maxcmd; i++) {
/* Check penalty */
if (My_Connections[Idx].delaytime > starttime)