neozeed ircu2.9.32-linux-hacks.diff

This commit is contained in:
2023-12-26 16:42:36 -05:00
parent ab64084f63
commit 51650c0d78
40 changed files with 718 additions and 720 deletions

View File

@@ -56,9 +56,6 @@ void free();
#include MALLOCH
#endif
extern int matches PROTO((char *, char *));
extern int mycmp PROTO((const char *, const char *));
extern int myncmp PROTO((const char *, const char *, int));
#ifdef NEED_STRTOK
extern char *strtok PROTO((char *, char *));
#endif
@@ -67,6 +64,10 @@ extern char *strtoken PROTO((char **, char *, char *));
#endif
#ifdef NEED_INET_ADDR
extern unsigned long inet_addr PROTO((char *));
#else
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#endif
#if defined(NEED_INET_NTOA) || defined(NEED_INET_NETOF)

View File

@@ -69,9 +69,12 @@
** Define this to prevent mixed case userids that clonebots use.
** It is strongly advised to define this, unless you have a known reason
** not to.
* In fact, I do. It's fucking 2017 and mixed case is no longer any kind of
* indicator on compromised hosts.
*/
#define DISALLOW_MIXED_CASE
#undef DISALLOW_MIXED_CASE
/*
** The mixed case patch can optionally notify opers when an invalid uid
@@ -200,8 +203,8 @@
* FNAME_USERLOG just logs user connections, FNAME_OPERLOG logs every
* successful use of /oper. These are either full paths or files within DPATH.
*/
#define FNAME_USERLOG "/usr/local/lib/ircd/users" /* */
/* #define FNAME_OPERLOG "/usr/local/lib/ircd/opers" /* */
/* #define FNAME_USERLOG "/usr/local/lib/ircd/users" */
/* #define FNAME_OPERLOG "/usr/local/lib/ircd/opers" */
/* CHROOTDIR
*
@@ -554,7 +557,7 @@
* support NOSPOOF will have to type /QUOTE PING <bignumber> before
* registration.
*/
#define CONNECTTIMEOUT 90 /* Recommended value: 90 */
#define CONNECTTIMEOUT 10 /* Recommended value: 90 */
/*
* Max time from the nickname change that still causes KILL
@@ -615,11 +618,11 @@
#endif
#ifdef DEBUGMODE
extern void debug();
extern void debug(int level, char *form, ...);
# define Debug(x) debug x
# define LOGFILE LPATH
#else
# define Debug(x) ;
# define Debug(x) do { } while(0);
# if VMS
# define LOGFILE "NLA0:"
# else

View File

@@ -70,8 +70,9 @@ extern int find_restrict PROTO((aClient *));
extern int rehash PROTO((aClient *, aClient *, int));
extern int initconf PROTO((int));
extern char *MyMalloc PROTO((int)), *MyRealloc PROTO((char *, int));
extern char *debugmode, *configfile, *sbrk0;
extern char *MyMalloc PROTO((size_t)), *MyRealloc PROTO((char *, size_t));
extern char *debugmode, *configfile;
extern void *sbrk0;
extern char *getfield PROTO((char *));
extern void get_sockhost PROTO((aClient *, char *));
extern char *rpl_str PROTO((int)), *err_str PROTO((int));
@@ -118,34 +119,22 @@ extern void end_ping PROTO((aClient *));
extern void cancel_ping PROTO((aClient *, aClient *));
extern void send_queued PROTO((aClient *));
/*VARARGS2*/
extern void sendto_one();
extern void sendto_one(aClient *to, char *pattern, ...);
extern void vsendto_one();
/*VARARGS4*/
extern void sendto_channel_butone();
/*VARARGS2*/
extern void sendto_serv_butone();
/*VARARGS2*/
extern void sendto_common_channels();
/*VARARGS3*/
extern void sendto_channel_butserv();
/*VARARGS3*/
extern void sendto_match_servs();
/*VARARGS5*/
extern void sendto_match_butone();
/*VARARGS3*/
extern void sendto_all_butone();
/*VARARGS1*/
extern void sendto_ops();
/*VARARGS2*/
extern void sendto_lops_butone();
/*VARARGS3*/
extern void sendto_ops_butone();
/*VARARGS3*/
extern void sendto_prefix_one();
extern void sendto_channel_butone(aClient *one, aClient *from, aChannel *chptr, char *pattern, ...);
extern void sendto_serv_butone(aClient *one, char *pattern, ...);
extern void sendto_common_channels(aClient *user, char *pattern, ...);
extern void sendto_channel_butserv(aChannel *chptr, aClient *from, char *pattern, ...);
extern void sendto_match_servs(aChannel *chptr, aClient *from, char *format, ...);
extern void sendto_match_butone(aClient *one, aClient *from, char *mask, int what, char *pattern, ...);
extern void sendto_all_butone(aClient *one, aClient *from, char *pattern, ...);
extern void sendto_ops(char *pattern, ...);
extern void sendto_lops_butone(aClient *one, char *pattern, ...);
extern void sendto_ops_butone(aClient *one, aClient *from, char *pattern, ...);
extern void sendto_prefix_one(aClient *to, aClient *from, char *pattern, ...);
extern void vsendto_prefix_one();
/*VARARGS4*/
extern int exit_client_msg();
extern void sendto_realops(char *pattern, ...);
extern int exit_client_msg(aClient *cptr, aClient *bcptr, aClient *sptr, char *pattern, ...);
extern int writecalls, writeb[];
extern int deliver_it PROTO((aClient *, char *, int));
@@ -229,14 +218,28 @@ extern void off_history PROTO((aClient *));
extern int dopacket PROTO((aClient *, char *, int));
/*VARARGS2*/
extern void debug();
extern void debug PROTO((int level, char *form, ...));
#if defined(DEBUGMODE)
extern void send_usage PROTO((aClient *, char *));
extern void send_listinfo PROTO((aClient *, char *));
extern void count_memory PROTO((aClient *, char *));
extern void MyFree(void *x);
extern void dumpcore();
#endif
extern void count_memory PROTO((aClient *, char *));
char *crule_parse PROTO((char *));
int crule_eval PROTO((char *));
void crule_free PROTO((char **));
extern char *collapse PROTO((char *pattern));
extern int match PROTO((const char *ma, const char *na));
extern int matches PROTO((const char *ma, const char *na));
extern void read_ping PROTO((aClient *cptr));
extern void send_ping PROTO((aClient *cptr));
extern int ping_server PROTO((aClient *cptr, struct hostent *hp));
extern void delist_conf PROTO((aConfItem *aconf));
extern u_long cres_mem PROTO((aClient *sptr));
extern int hash_nick_name PROTO((char *nname));
extern VOIDSIG s_die();
extern unsigned long ircrandom(void);

View File

@@ -28,6 +28,7 @@
#define __u_l unsigned long
#endif
#if 0
#ifdef __STDC__
extern __u_l inet_addr(char *);
extern char *inet_ntoa(char *);
@@ -48,3 +49,4 @@ extern __u_l inet_lnaof();
extern __u_l inet_netof();
#endif
#undef __u_l
#endif

View File

@@ -42,7 +42,7 @@
#define QUERY 0x0 /* standard query */
#define IQUERY 0x1 /* inverse query */
#define STATUS 0x2 /* nameserver status query */
/*#define xxx 0x3 /* 0x3 reserved */
/*#define xxx 0x3 0x3 reserved */
/* non standard */
#define UPDATEA 0x9 /* add resource record */
#define UPDATED 0xa /* delete a specific resource record */
@@ -246,3 +246,6 @@ extern u_long _getlong();
(cp)[0] = l >> 8; \
(cp) += sizeof(u_long); \
}
int res_init();

View File

@@ -75,4 +75,7 @@ struct state {
extern struct state _res;
extern char *p_cdname(), *p_rr(), *p_type(), *p_class(), *p_time();
extern int dn_comp(char *exp_dn, char *comp_dn, int length, char **dnptrs, char **lastdnptr);
extern void putshort(u_short s, char *msgp);
extern void putlong(u_long l, char *msgp);

30
include/setup.h Normal file
View File

@@ -0,0 +1,30 @@
#ifndef __setup_include__
#define __setup_include__
/* Fuck your build system and everything about it.
* Just edit this file instead of letting Config be dumb.
*/
#undef PARAMH
#define UNISTDH
#define STDLIBH
#define STDDEFH
#undef SYSSYSLOGH
#define NOINDEX
#undef NEED_STRERROR
#define NEED_STRTOKEN
#undef NEED_STRTOK
#undef NEED_INET_ADDR
#undef NEED_INET_NTOA
#undef NEED_INET_NETOF
/* This one doesn't even do anything?! */
#define GETTIMEOFDAY
/* If set, lrand48() is used over gettimeofday... And Config seems to make
* gettimeofday the *preferred* option.
* wat
*/
#undef LRAND48
#define MALLOCH <stdlib.h>
#define NBLOCK_POSIX
#define POSIX_SIGNALS
#undef TIMES_2
#define GETRUSAGE_2
#endif

View File

@@ -37,23 +37,8 @@
#include <stdlib.h>
#endif
#ifdef STRINGSH
#include <strings.h>
#else
# ifdef STRINGH
# include <string.h>
# endif
#endif
#define strcasecmp mycmp
#define strncasecmp myncmp
#ifdef NOINDEX
#define index strchr
#define rindex strrchr
/*
extern char *index PROTO((char *, char));
extern char *rindex PROTO((char *, char));
*/
#endif
#include <string.h>
#ifdef AIX
#include <sys/select.h>
@@ -108,7 +93,7 @@ typedef unsigned int u_int;
#endif
#ifdef USE_VARARGS
#include <varargs.h>
#include <stdarg.h>
#endif
#endif /* __sys_include__ */