Skip to content

Commit

Permalink
Stop link to rejected (+r) bot before opening socket. Fixes #463
Browse files Browse the repository at this point in the history
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 9426781
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/botnet.c
Expand Up @@ -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) &&
Expand Down
4 changes: 2 additions & 2 deletions src/version.h
Expand Up @@ -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.