Permalink
Browse files

Stop link to rejected (+r) bot before opening socket. Fixes #463

Previously, a socket would be opened (and TLS negotiation completed) before a bot checked to see if the connecting bot was marked for rejection (+r). This moves that check earlier in the process prior to attempting the socket connection.
  • Loading branch information...
vanosg committed Sep 27, 2017
1 parent ab40ee3 commit 942678100be2af9141db74bc8f68175d0ab01ef0
Showing with 6 additions and 2 deletions.
  1. +4 −0 src/botnet.c
  2. +2 −2 src/version.h
View
@@ -997,6 +997,10 @@ int botlink(char *linker, int idx, char *nick)
} else if (in_chain(nick) && (idx != -3)) {
if (idx >= 0)
dprintf(idx, "%s\n", BOT_ALREADYLINKED);
} else if (bot_flags(u) & BOT_REJECT) {
if (idx >= 0) {
dprintf(idx, "%s %s\n", BOT_REJECTING, nick);
}
} else {
for (i = 0; i < dcc_total; i++)
if ((dcc[i].user == u) &&
View
@@ -27,5 +27,5 @@
*/
#define EGG_STRINGVER "1.8.2"
#define EGG_NUMVER 1080205
#define EGG_PATCH "newchanflags"
#define EGG_NUMVER 1080206
#define EGG_PATCH "rejectlink"

0 comments on commit 9426781

Please sign in to comment.