#include "hook.h"
#include "send.h"
#include "s_assert.h"
+#include "s_newconf.h"
static char readBuf[READBUF_SIZE];
static void client_dopacket(struct Client *client_p, char *buffer, size_t length);
/* allow opers 4 times the amount of messages as users. why 4?
* why not. :) --fl_
*/
- if(IsOper(client_p) && ConfigFileEntry.no_oper_flood)
+ if(IsOperGeneral(client_p) && ConfigFileEntry.no_oper_flood)
allow_read *= 4;
/*
* Handle flood protection here - if we exceed our flood limit on
client_p->localClient->lasttime = rb_current_time();
client_p->flags &= ~FLAGS_PINGSENT;
+ if (client_p->flags & FLAGS_PINGWARN)
+ {
+ /*
+ * if we warned about this server being unresponsive
+ * before, let's let everyone know there's no need
+ * to panic
+ */
+ client_p->flags &= ~FLAGS_PINGWARN;
+ sendto_realops_snomask(SNO_GENERAL, L_NETWIDE,
+ "Received response from previously unresponsive link %s",
+ client_p->name);
+ ilog(L_SERVER,
+ "Received response from previously unresponsive link %s",
+ log_client_name(client_p, HIDE_IP));
+ }
+
+
/*
* Before we even think of parsing what we just read, stick
* it on the end of the receive queue and do it when its
if(!IsAnyServer(client_p) &&
(rb_linebuf_alloclen(&client_p->localClient->buf_recvq) > ConfigFileEntry.client_flood_max_lines))
{
- if(!(ConfigFileEntry.no_oper_flood && IsOper(client_p)))
+ if(!(ConfigFileEntry.no_oper_flood && IsOperGeneral(client_p)))
{
exit_client(client_p, client_p, client_p, "Excess Flood");
return;
* with client_p of "local" variation, which contains all the
* necessary fields (buffer etc..)
*/
-void
+static void
client_dopacket(struct Client *client_p, char *buffer, size_t length)
{
s_assert(client_p != NULL);