From 61cfb5ac3ee15e2a34dd2fa073f52922ff3e9cb9 Mon Sep 17 00:00:00 2001 From: Bram Matthys Date: Thu, 4 Apr 2013 23:07:04 +0200 Subject: [PATCH] - Windows: Fix strange linking bug. Outgoing connects from a Windows IRCd caused a garbled SERVER protocol message, causing 'cannot find server' errors and killing of users. Reported by Sunkat (#4183). --- include/h.h | 2 ++ src/hash.c | 1 - src/modules/m_nick.c | 1 - src/modules/m_protoctl.c | 2 -- src/modules/m_server.c | 3 --- src/s_bsd.c | 1 - src/s_serv.c | 2 -- src/win32/debug.c | 1 - 8 files changed, 2 insertions(+), 11 deletions(-) diff --git a/include/h.h b/include/h.h index 1453ec1e5..f520b0718 100644 --- a/include/h.h +++ b/include/h.h @@ -772,5 +772,7 @@ extern void free_pending_net(aClient *sptr); extern aPendingNet *find_pending_net_by_numeric_butone(int numeric, aClient *exempt); extern aClient *find_pending_net_duplicates(aClient *cptr, aClient **srv, int *numeric); extern aClient *find_non_pending_net_duplicates(aClient *cptr); +extern MODVAR char serveropts[]; +extern MODVAR char *IsupportStrings[]; extern void finish_auth(aClient *acptr); extern void read_packet(int fd, int revents, void *data); diff --git a/src/hash.c b/src/hash.c index 5197f4d5f..c881c7821 100644 --- a/src/hash.c +++ b/src/hash.c @@ -759,7 +759,6 @@ EVENT(e_clean_out_throttling_buckets) if (!t || (TStime() - t > 30)) { - extern char serveropts[]; extern Module *Modules; char *p = serveropts + strlen(serveropts); Module *mi; diff --git a/src/modules/m_nick.c b/src/modules/m_nick.c index 38fdd2e13..3cc35aad3 100644 --- a/src/modules/m_nick.c +++ b/src/modules/m_nick.c @@ -1085,7 +1085,6 @@ int _register_user(aClient *cptr, aClient *sptr, char *nick, char *username, cha me.name, parv[0], me.name, version, umodestring, cmodestring); { - extern MODVAR char *IsupportStrings[]; int i; for (i = 0; IsupportStrings[i]; i++) sendto_one(sptr, rpl_str(RPL_ISUPPORT), me.name, nick, IsupportStrings[i]); diff --git a/src/modules/m_protoctl.c b/src/modules/m_protoctl.c index 17eef9c74..21c5a46aa 100644 --- a/src/modules/m_protoctl.c +++ b/src/modules/m_protoctl.c @@ -44,8 +44,6 @@ DLLFUNC int m_protoctl(aClient *cptr, aClient *sptr, int parc, char *parv[]); -extern MODVAR char serveropts[]; - #define MSG_PROTOCTL "PROTOCTL" #define TOK_PROTOCTL "_" diff --git a/src/modules/m_server.c b/src/modules/m_server.c index 1f8b45403..966787c74 100644 --- a/src/modules/m_server.c +++ b/src/modules/m_server.c @@ -130,8 +130,6 @@ char buf[512]; void _send_server_message(aClient *sptr) { -extern char serveropts[]; - if (sptr->serv->flags.server_sent) { #ifdef DEBUGMODE @@ -699,7 +697,6 @@ CMD_FUNC(m_server_remote) int m_server_synch(aClient *cptr, long numeric, ConfigItem_link *aconf) { char *inpath = get_client_name(cptr, TRUE); - extern MODVAR char serveropts[]; aClient *acptr; char buf[BUFSIZE]; int incoming = IsUnknown(cptr) ? 1 : 0; diff --git a/src/s_bsd.c b/src/s_bsd.c index 53a527e5b..491a2ecd6 100644 --- a/src/s_bsd.c +++ b/src/s_bsd.c @@ -794,7 +794,6 @@ void completed_connection(int fd, int revents, void *data) { aClient *cptr = data; ConfigItem_link *aconf = cptr->serv ? cptr->serv->conf : NULL; - extern char serveropts[]; SetHandshake(cptr); if (!aconf) diff --git a/src/s_serv.c b/src/s_serv.c index ebce915a7..91a818efb 100644 --- a/src/s_serv.c +++ b/src/s_serv.c @@ -175,8 +175,6 @@ char *p; */ CMD_FUNC(m_version) { - extern char serveropts[]; - extern char *IsupportStrings[]; int reply, i; /* Only allow remote VERSIONs if registered -- Syzop */ diff --git a/src/win32/debug.c b/src/win32/debug.c index 6f8a0c2a9..fdf92ab1a 100644 --- a/src/win32/debug.c +++ b/src/win32/debug.c @@ -35,7 +35,6 @@ extern OSVERSIONINFO VerInfo; extern char OSName[256]; extern char backupbuf[8192]; extern char *buildid; -extern char serveropts[]; extern char *extraflags; extern BOOL IsService; void CleanUp(void);