Skip to content

Commit

Permalink
- New output system:
Browse files Browse the repository at this point in the history
  - Prioritized queues.
  - Leaky bucket check to keep from flooding.
  - New ctcp flood system based on backlog
    (only uses nicks now, will be changed
     It also takes about 5 ctcps before it
     reacts, but when it does, false positives
     should be a thing of the past.)
Thats about it, bed time...

Please test


git-svn-id: svn://red.pomac.com/rage@198 55c13d69-e7e2-0310-b639-a4a306287c42
  • Loading branch information
pomac committed Jan 13, 2005
1 parent 6527e4b commit 4ffcd7e
Show file tree
Hide file tree
Showing 8 changed files with 451 additions and 204 deletions.
2 changes: 1 addition & 1 deletion trunk/src/common/dcc.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ void
dcc_check_timeouts (void)
{
struct DCC *dcc;
time_t tim = time (0);
time_t tim = time (NULL);
GSList *next, *list = dcc_list;

while (list)
Expand Down
7 changes: 2 additions & 5 deletions trunk/src/common/ignore.c
Original file line number Diff line number Diff line change
Expand Up @@ -313,14 +313,11 @@ flood_check (char *nick, char *host, server *serv, rage_session *sess, int what)
if (what == 0 )
{
value = 10;
if (prefs.ctcp_number_limit > 0 && gen_parm_throttle (&serv->ctcp_counter, &value, &value,
&prefs.ctcp_number_limit, &serv->ctcp_last_time))
if (prefs.ctcp_number_limit > 0 &&
queue_count(serv, nick, 2) > prefs.ctcp_number_limit)
{
char *tmp = strchr(host, '@');
snprintf (real_ip, sizeof (real_ip), "*!*%s", tmp);

serv->ctcp_counter = 0;

snprintf (buf, sizeof (buf),
_("You are being CTCP flooded from %s, ignoring %s\n"),
nick, real_ip);
Expand Down
4 changes: 2 additions & 2 deletions trunk/src/common/modes.c
Original file line number Diff line number Diff line change
Expand Up @@ -679,7 +679,7 @@ run_005 (server * serv)
}

if((pre = get_isupport(serv, "NAMESX")))
tcp_send_len (serv, "PROTOCTL NAMESX\r\n", 17);
send_command (serv, NULL, "PROTOCTL NAMESX\r\n");

if((pre = get_isupport(serv, "NETWORK")))
{
Expand All @@ -691,6 +691,6 @@ run_005 (server * serv)
}

if(isupport(serv, "CAPAB")) /* after this we get a 290 numeric reply */
tcp_send_len (serv, "CAPAB IDENTIFY-MSG\r\n", 20);
send_command (serv, NULL, "CAPAB IDENTIFY-MSG\r\n");

}
Loading

0 comments on commit 4ffcd7e

Please sign in to comment.