rpms/bip/F-12 bip-fn-ircd7.patch,NONE,1.1
Lorenzo Villani
arbiter at fedoraproject.org
Mon Feb 1 01:02:03 UTC 2010
Author: arbiter
Update of /cvs/pkgs/rpms/bip/F-12
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv20606
Added Files:
bip-fn-ircd7.patch
Log Message:
* Mon Feb 1 2010 Lorenzo Villani <lvillani at binaryhelix.net> - 0.8.4-2
- Import patch reported by Kevin Fenzi (bz #560476)
- + Add a join delay to work around ircd7 flood protection
- + Add support for the "quiet" list
bip-fn-ircd7.patch:
irc.c | 6 +++++-
irc.h | 1 +
2 files changed, 6 insertions(+), 1 deletion(-)
--- NEW FILE bip-fn-ircd7.patch ---
diff --git a/src/irc.c b/src/irc.c
index 556bf97..a5cc039 100644
--- a/src/irc.c
+++ b/src/irc.c
@@ -16,6 +16,7 @@
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
+#include <unistd.h>
#include "util.h"
#include "irc.h"
#include "bip.h"
@@ -206,6 +207,8 @@ static void irc_server_join(struct link_server *s)
WRITE_LINE1(CONN(s), NULL, "JOIN", ci->name);
else
WRITE_LINE2(CONN(s), NULL, "JOIN", ci->name, ci->key);
+
+ usleep(1000 * JOIN_THROTTLE_MSEC);
}
}
@@ -944,7 +947,8 @@ static int irc_cli_mode(struct link_client *ic, struct line *line)
/* This is a wild guess and that sucks. */
if (!irc_line_elem_equals(line, 0, "MODE") ||
- strchr(irc_line_elem(line, 2), 'b') == NULL)
+ (strchr(irc_line_elem(line, 2), 'b') == NULL &&
+ strchr(irc_line_elem(line, 2), 'q') == NULL))
return OK_COPY;
++ic->who_count;
diff --git a/src/irc.h b/src/irc.h
index c0c3373..f474b25 100644
--- a/src/irc.h
+++ b/src/irc.h
@@ -28,6 +28,7 @@
#define P_SERV "b.i.p"
#define S_PING "BIPPING"
#define P_IRCMASK "-bip!bip@" P_SERV
+#define JOIN_THROTTLE_MSEC 300
struct server {
char *host;
More information about the scm-commits
mailing list