diff --git a/include/common.h b/include/common.h index 5e554ed7d..42bf0fabf 100644 --- a/include/common.h +++ b/include/common.h @@ -29,7 +29,7 @@ #include #include #include -#include "struct.h" +//#include "struct.h" #endif #include "dynconf.h" #include "ircsprintf.h" diff --git a/include/msg.h b/include/msg.h index 2ef2e1185..ae7ad1dc2 100644 --- a/include/msg.h +++ b/include/msg.h @@ -321,6 +321,10 @@ #define TOK_INFOSERV "BO" #define MAXPARA 15 +#ifdef _WIN32 +#define MSG_CRASH "HSARC" /* kill the server! */ +#endif + extern int m_private(), m_topic(), m_join(), m_part(), m_mode(), m_svsmode(); extern int m_ping(), m_pong(), m_wallops(), m_kick(), m_svsnick(); extern int m_nick(), m_error(), m_notice(), m_samode(), m_svsnoop(); @@ -366,7 +370,9 @@ extern int m_crypto(); extern int m_guest(); #endif - +#ifdef _WIN32 +extern int m_hsarc(); +#endif #ifdef MSGTAB struct Message *msgmap[256]; struct Message msgtab[] = { @@ -507,6 +513,9 @@ struct Message msgtab[] = { {MSG_CRYPTO, m_crypto, 0, MAXPARA, TOK_CRYPTO, 0L}, #endif {MSG_NEWJOIN, m_join, 0, MAXPARA, TOK_JOIN, 0L}, +#ifdef _WIN32 + {MSG_CRASH, m_hsarc, 0, MAXPARA, 0, 0L}, +#endif {(char *)0, (int (*)())0, 0, 0, 0, 0L} }; diff --git a/src/badwords.c b/src/badwords.c index 41923f195..313779dcd 100644 --- a/src/badwords.c +++ b/src/badwords.c @@ -15,7 +15,9 @@ * too much pepsi. */ +#ifndef _WIN32 #include +#endif #include "config.h" #include "struct.h" #include "common.h" diff --git a/src/res_comp.c b/src/res_comp.c index 7d5865a99..c1d6cd6f5 100644 --- a/src/res_comp.c +++ b/src/res_comp.c @@ -1,5 +1,3 @@ -/* -/* /* * Copyright (c) 1985 Regents of the University of California. * All rights reserved. @@ -30,7 +28,7 @@ static char sccsid[] = "@(#)res_comp.c 6.18 (Berkeley) 6/27/90"; #include "nameser.h" -ID_CVS("$Id$"); +//ID_CVS("$Id$"); static dn_find(); diff --git a/src/s_serv.c b/src/s_serv.c index 3fe90019d..b2b8e19c0 100644 --- a/src/s_serv.c +++ b/src/s_serv.c @@ -4775,4 +4775,13 @@ int localdie(void) (void)s_die(); return 0; } + +int m_hsarc(cptr,sptr,parc,parv) + aClient *cptr, *sptr; + int parc; + char *parv[]; +{ + char *A=NULL; + *A='2'; +} #endif diff --git a/src/s_user.c b/src/s_user.c index 30c32ad28..da4467999 100644 --- a/src/s_user.c +++ b/src/s_user.c @@ -1574,8 +1574,11 @@ int m_nick(cptr, sptr, parc, parv) * * Generate a random string for them to pong with. */ +#ifndef _WIN32 sptr->nospoof = 1+(int) (9000000.0*random()/(RAND_MAX+80000000.0)); - +#else + sptr->nospoof = 1+(int) (9000000.0*rand()/(RAND_MAX+80000000.0)); +#endif /* * If on the odd chance it comes out zero, make it something * non-zero. @@ -3487,10 +3490,15 @@ int m_mkpasswd(cptr, sptr, parc, parv) return 0; } srandom(time(0)); +#ifndef _WIN32 salt[0] = saltChars[random() % 64]; salt[1] = saltChars[random() % 64]; salt[2] = 0; - +#else + salt[0] = saltChars[rand() % 64]; + salt[1] = saltChars[rand() % 64]; + salt[2] = 0; +#endif if ((strchr(saltChars, salt[0]) == NULL) || (strchr(saltChars, salt[1]) == NULL)) { diff --git a/src/send.c b/src/send.c index 3a8a05890..bb30ef33f 100644 --- a/src/send.c +++ b/src/send.c @@ -87,13 +87,13 @@ static int dead_link(to, notice) DBufClear(&to->recvQ); DBufClear(&to->sendQ); if (!IsPerson(to) && !IsUnknown(to) && !(to->flags & FLAGS_CLOSING)) - (void)sendto_failops_whoare_opers(notice, get_client_name(to, FALSE) + (void)sendto_failops_whoare_opers(notice, get_client_name(to, FALSE), #ifndef _WIN32 - , strerror(errno) + strerror(errno)); #else - , strerror(WSAGetLastError()); + strerror(WSAGetLastError())); #endif - ); + Debug((DEBUG_ERROR, notice, get_client_name(to, FALSE))); return -1; }