IRCForumları - IRC ve mIRC Kullanıcılarının Buluşma Noktası

IRCForumları - IRC ve mIRC Kullanıcılarının Buluşma Noktası (https://www.ircforumlari.net/)
-   Unreal IRCd (https://www.ircforumlari.net/unreal-ircd/)
-   -   Unreal Excess Flood Sorunu (https://www.ircforumlari.net/unreal-ircd/379348-unreal-excess-flood-sorunu.html)

Cheyenne 27 Ocak 2011 00:34

Unreal Excess Flood Sorunu
 
* Mbot IRC`den Çıktı (Excess Flood) Bu Excess Flood Suresini nasıl uzatabilirim bot excess floodtan dussun istemiyorum Yardımcı olabilecek varmı ?

----------

Yokmu hiç bilen bir arkadas :)

EceLMeriC 27 Ocak 2011 01:04

Cevap: Unreal Excess Flood Sorunu
 
Alıntı:

Crazyb0y Nickli Üyeden Alıntı (Mesaj 1040661743)
* Mbot IRC`den Çıktı (Excess Flood) Bu Excess Flood Suresini nasıl uzatabilirim bot excess floodtan dussun istemiyorum Yardımcı olabilecek varmı ?




Unreal3.2/src/s_bsd.c dizindeki modulde, aşağıdaki satırdan düzenlemeleri yapabilirsin.

Kod:


/*
** read_packet
**
** Read a 'packet' of data from a connection
and process it.  Read in 8k
** chunks to give a better performance
rating (for server connections).
** Do some tricky stuff for client connections to make sure they don't do
** any flooding >:-)
-avalon
*/

 
#ifndef USE_POLL
static int read_packet(aClient *cptr, fd_set
*rfd)
{
 int  dolen = 0, length = 0, done;
 time_t now =
TStime();
 if (FD_ISSET(cptr->fd, rfd)
&&
    !(IsPerson(cptr) &&
DBufLength(&cptr->recvQ) >
6090))
 {
  SET_ERRNO(0);
#ifdef
USE_SSL
  if (cptr->flags &
FLAGS_SSL)
      length = ircd_SSL_read(cptr,
readbuf,
sizeof(readbuf));
  else
#endif
  length =
recv(cptr->fd, readbuf, sizeof(readbuf), 0);
  cptr->lasttime
= now;
  if (cptr->lasttime >
cptr->since)
  cptr->since =
cptr->lasttime;
  cptr->flags &= ~(FLAGS_PINGSENT |
FLAGS_NONL);
  /*
  * If not ready, fake it so it
isnt closed
  */
  if (length < 0 && ERRNO
== P_EWOULDBLOCK)
      return 1;
  if
(length <= 0)
  return
length;
 }
 /*
    ** For server connections,
we process as many as we can without
    ** worrying about the
time of day or anything :)
  */
 if (IsServer(cptr) ||
IsConnecting(cptr) || IsHandshake(cptr))
 {
  if (length
> 0)
  if ((done = dopacket(cptr, readbuf,
length)))
    return
done;
 }
 else
 {
  /*
   
** Before we even think of parsing what we just read,
stick
    ** it on the end of the receive queue and do
it when its
    ** turn comes around.
 
*/
  if (!dbuf_put(&cptr->recvQ, readbuf,
length))
  return exit_client(cptr, cptr, cptr, "dbuf_put
fail");

 
  if (IsPerson(cptr) && DBufLength(&cptr->recvQ)
>
get_recvq(cptr))
  {
  sendto_snomask(SNO_FLOOD,
     
"*** Flood -- %s!%s@%s (%d) exceeds %d
recvQ",
      cptr->name[0] ? cptr->name
: "*",
      cptr->user ?
cptr->user->username : "*",
     
cptr->user ? cptr->user->realhost :
"*",
      DBufLength(&cptr->recvQ),
get_recvq(cptr));
  return exit_client(cptr, cptr, cptr,
"Excess Flood");
  }

 
  while (DBufLength(&cptr->recvQ) &&
!NoNewLine(cptr) &&
      ((cptr->status
< STAT_UNKNOWN) || (cptr->since - now <
10)))
  {
  /*
     
** If it has become registered as a Service or
Server
      ** then skip the per-message parsing
below.
    */
  if
(IsServer(cptr))
  {
    dolen =
dbuf_get(&cptr->recvQ,
readbuf,
       
sizeof(readbuf));
    if (dolen <=
0)
    break;
    if ((done
= dopacket(cptr, readbuf, dolen)))
    return
done;
    break;
  }
  dolen
= dbuf_getmsg(&cptr->recvQ,
readbuf,
     
sizeof(readbuf));
  /*
      **
Devious looking...whats it do ? well..if a
client
      ** sends a *long* message without any
CR or LF, then
      ** dbuf_getmsg fails and we
pull it out using this
      ** loop which just gets
the next 512 bytes and then
      ** deletes the
rest of the buffer contents.
      **
-avalon
    */
  while (dolen <=
0)
  {
    if (dolen <
0)
    return exit_client(cptr, cptr,
cptr,
        "dbuf_getmsg
fail");
    if (DBufLength(&cptr->recvQ) <
510)
    {
    cptr->flags
|=
FLAGS_NONL;
    break;
    }
    dolen
= dbuf_get(&cptr->recvQ, readbuf, 511);
    if
(dolen > 0 &&
DBufLength(&cptr->recvQ))
    DBufClear(&cptr->recvQ);
  }

 
  if (dolen > 0
&&
      (dopacket(cptr, readbuf,
dolen) == FLUSH_BUFFER))
    return
FLUSH_BUFFER;
  }
 }
 return 1;
}
#else
/*
handle taking care of the client's recvq here */
static int
do_client_queue(aClient *cptr)
{
 int  dolen = 0, done;

 
 while (DBufLength(&cptr->recvQ) && !NoNewLine(cptr)
&&
    ((cptr->status < STAT_UNKNOWN) ||
(cptr->since - now < 10)))
 {
  /* If it's become
registered as a server, just parse the whole block */
  if
(IsServer(cptr))
  {
  dolen
=
      dbuf_get(&cptr->recvQ, readbuf,
sizeof(readbuf));
  if (dolen <=
0)
    break;
  if ((done =
dopacket(cptr, readbuf, dolen)))
    return
done;
  break;
  }

 
#if defined(MAXBUFFERS)
  dolen
=
      dbuf_getmsg(&cptr->recvQ,
readbuf,
      rcvbufmax *
sizeof(char));
#else
  dolen = dbuf_getmsg(&cptr->recvQ,
readbuf, sizeof(readbuf));
#endif

 
  if (dolen <= 0)
  {
  if
(dolen < 0)
    return exit_client(cptr, cptr,
cptr,
        "dbuf_getmsg fail");

 
  if (DBufLength(&cptr->recvQ) <
510)
  {
    cptr->flags |=
FLAGS_NONL;
    break;
  }
  /*
The buffer is full (more than 512 bytes) and it has no \n
   
* Some user is trying to trick us. Kill their recvq.
*/
  DBufClear(&cptr->recvQ);
  break;
  }
  else
if (dopacket(cptr, readbuf, dolen) == FLUSH_BUFFER)
  return
FLUSH_BUFFER;
 }
 return 1;
}

 
#define MAX_CLIENT_RECVQ 8192 /* 4 dbufs */

 
static int read_packet(aClient *cptr)
{
 int  length = 0,
done;

 
 /* If data is ready, and the user is either not a person or
  *
is a person and has a recvq of less than MAX_CLIENT_RECVQ,
  * read from
this client
  */
 if (!(IsPerson(cptr) &&
DBufLength(&cptr->recvQ) >
MAX_CLIENT_RECVQ))
 {
  errno = 0;

 
#ifdef USE_SSL
  if (cptr->flags &
FLAGS_SSL)
      length = ircd_SSL_read((SSL
*)cptr->ssl, readbuf,
sizeof(readbuf));
  else
#endif
  length =
recv(cptr->fd, readbuf, sizeof(readbuf), 0);
  cptr->lasttime
= now;
  if (cptr->lasttime >
cptr->since)
  cptr->since =
cptr->lasttime;
  cptr->flags &= ~(FLAGS_PINGSENT |
FLAGS_NONL);
  /*
  * If not ready, fake it so it
isnt closed
 
*/
        if (length < 0
&& ((ERRNO == P_EWOULDBLOCK) || ERRNO ==
P_EAGAIN)))
  return 1;
  if (length <=
0)
  return length;
 }

 
 /*
  * For server connections, we process as many as we can
without
  * worrying about the time of day or anything :)
 
*/
 if (IsServer(cptr) || IsConnecting(cptr) ||
IsHandshake(cptr))
 {
  if (length >
0)
  if ((done = dopacket(cptr, readbuf,
length)))
    return
done;
 }
 else
 {
  /*
  *
Before we even think of parsing what we just read, stick
  * it on
the end of the receive queue and do it when its turn
  * comes
around. */
  if (!dbuf_put(&cptr->recvQ, readbuf,
length))
  return exit_client(cptr, cptr, cptr, "dbuf_put
fail");

 
  if (IsPerson(cptr) &&
#ifdef
NO_OPER_FLOOD
      !IsAnOper(cptr)
&&
#endif
     
DBufLength(&cptr->recvQ) >
get_recvq(cptr))
  {
  sendto_snomask(SNO_FLOOD,
     
"Flood -- %s!%s@%s (%d) Exceeds %d
RecvQ",
      cptr->name[0] ? cptr->name
: "*",
      cptr->user ?
cptr->user->username : "*",
     
cptr->user ? cptr->user->realhost :
"*",
      DBufLength(&cptr->recvQ),
get_recvq(cptr));
  return exit_client(cptr, cptr, cptr,
"Excess Flood");
  }
  return
do_client_queue(cptr);
 }
 return 1;
}

 

#endif


Cheyenne 27 Ocak 2011 03:19

Cevap: Unreal Excess Flood Sorunu
 
ama nerelerini :)

EceLMeriC 27 Ocak 2011 03:33

Cevap: Unreal Excess Flood Sorunu
 
İlgi alanın unreal diye görünüyor, biraz çaba göster hem unreali anla hemde öğren test sunucusu aç yedek al editlemeler yap boz .core oluştur yık tekrar yap bu şekilde alışma bence hiç birşey anlamazsın not düşersin ancak anlayan kişi yokmu diye :) biraz forumu dolaş bu tip başlıklar vardır. Örnek al biraz çaba göster terle :)


Tüm Zamanlar GMT +3 Olarak Ayarlanmış. Şuanki Zaman: 01:28.

Powered by vBulletin® Version 3.8.8 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO
Copyright ©2004 - 2024 IRCForumlari.Net