From ea53aab823230f6f477409b1841049fa8775cf03 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Thu, 30 Jun 2016 20:04:00 -0700 Subject: [PATCH] Refactor repository layout. * librb is no longer a separately configured subproject. * charybdis is now a standalone directory with a binary. * Include path layout now requires a directory ircd/ rb/ etc. --- .gitignore | 26 +- Makefile.am | 59 +- authd/Makefile.am | 6 +- authd/authd.h | 7 +- authd/dns.h | 2 +- authd/getaddrinfo.c | 4 +- authd/getnameinfo.c | 2 +- authd/provider.c | 4 +- authd/provider.h | 3 +- authd/providers/blacklist.c | 2 - authd/providers/ident.c | 5 +- authd/providers/opm.c | 5 +- authd/providers/rdns.c | 3 +- authd/res.c | 3 +- authd/reslib.c | 11 +- authd/reslist.c | 3 +- autogen.sh | 7 - bandb/Makefile.am | 9 +- bandb/bandb.c | 6 +- bandb/bantool.c | 2 +- bandb/rsdb_snprintf.c | 2 +- bandb/rsdb_sqlite3.c | 2 +- charybdis/.gitignore | 1 + charybdis/Makefile.am | 12 + charybdis/charybdis.cc | 30 + configure.ac | 701 +++++++++++++++--- extensions/Makefile.am | 4 +- extensions/chm_adminonly.c | 22 +- extensions/chm_insecure.c | 22 +- extensions/chm_nonotice.c | 26 +- extensions/chm_operonly.c | 22 +- extensions/chm_operonly_compat.c | 12 +- extensions/chm_operpeace.c | 28 +- extensions/chm_quietunreg_compat.c | 12 +- extensions/chm_spamfilter.c | 16 +- extensions/chm_sslonly.c | 22 +- extensions/chm_sslonly_compat.c | 12 +- extensions/createauthonly.c | 18 +- extensions/createoperonly.c | 18 +- extensions/example_module.c | 12 +- extensions/extb_account.c | 8 +- extensions/extb_canjoin.c | 12 +- extensions/extb_channel.c | 12 +- extensions/extb_combi.c | 8 +- extensions/extb_extgecos.c | 8 +- extensions/extb_hostmask.c | 8 +- extensions/extb_oper.c | 12 +- extensions/extb_realname.c | 8 +- extensions/extb_server.c | 8 +- extensions/extb_ssl.c | 8 +- extensions/extb_usermode.c | 22 +- extensions/force_user_invis.c | 16 +- extensions/helpops.c | 20 +- extensions/hide_uncommon_channels.c | 16 +- extensions/hurt.c | 26 +- extensions/ip_cloaking.c | 22 +- extensions/ip_cloaking_3.0.c | 20 +- extensions/ip_cloaking_4.0.c | 22 +- extensions/ip_cloaking_old.c | 20 +- extensions/m_adminwall.c | 28 +- extensions/m_echotags.c | 10 +- extensions/m_extendchans.c | 12 +- extensions/m_findforwards.c | 32 +- extensions/m_identify.c | 26 +- extensions/m_locops.c | 28 +- extensions/m_mkpasswd.c | 14 +- extensions/m_ojoin.c | 34 +- extensions/m_okick.c | 32 +- extensions/m_omode.c | 36 +- extensions/m_opme.c | 34 +- extensions/m_remove.c | 32 +- extensions/m_roleplay.c | 28 +- extensions/m_sendbans.c | 27 +- extensions/m_webirc.c | 28 +- extensions/no_kill_services.c | 26 +- extensions/no_locops.c | 16 +- extensions/no_oper_invis.c | 16 +- extensions/override.c | 26 +- extensions/restrict-unauthenticated.c | 26 +- extensions/sno_channelcreate.c | 17 +- extensions/sno_farconnect.c | 16 +- extensions/sno_globalkline.c | 14 +- extensions/sno_globalnickchange.c | 16 +- extensions/sno_globaloper.c | 16 +- extensions/sno_whois.c | 12 +- extensions/spamfilter_expr.c | 18 +- extensions/spamfilter_nicks.c | 14 +- extensions/spy_admin_notice.c | 12 +- extensions/spy_info_notice.c | 12 +- extensions/spy_links_notice.c | 12 +- extensions/spy_motd_notice.c | 12 +- extensions/spy_stats_notice.c | 12 +- extensions/spy_stats_p_notice.c | 12 +- extensions/spy_trace_notice.c | 12 +- extensions/umode_noctcp.c | 18 +- include/ircd/.gitignore | 2 + include/{ => ircd}/authproc.h | 1 - include/{ => ircd}/bandbi.h | 0 include/{ => ircd}/cache.h | 2 - include/{ => ircd}/capability.h | 1 - include/{ => ircd}/certfp.h | 0 include/{ => ircd}/channel.h | 2 +- include/{ => ircd}/chmode.h | 0 include/{ => ircd}/class.h | 0 include/{ => ircd}/client.h | 3 +- include/{ => ircd}/defaults.h | 6 +- include/{ => ircd}/dns.h | 0 include/{ => ircd}/hash.h | 4 +- include/{ => ircd}/hook.h | 0 include/{ => ircd}/hostmask.h | 0 include/{ => ircd}/inline/stringops.h | 0 include/{ => ircd}/ircd.h | 0 include/{ => ircd}/ircd_defs.h | 0 include/{ => ircd}/ircd_getopt.h | 0 include/{ => ircd}/ircd_linker.h | 0 include/{ => ircd}/ircd_signal.h | 0 include/{ => ircd}/listener.h | 2 +- include/{ => ircd}/logger.h | 0 include/{ => ircd}/m_info.h | 0 include/{ => ircd}/match.h | 3 +- include/{ => ircd}/messages.h | 0 include/{ => ircd}/modules.h | 7 +- include/{ => ircd}/monitor.h | 0 include/{ => ircd}/msg.h | 0 include/{ => ircd}/msgbuf.h | 0 include/{ => ircd}/newconf.h | 0 include/{ => ircd}/numeric.h | 0 include/{ => ircd}/operhash.h | 0 include/{ => ircd}/packet.h | 0 include/{ => ircd}/parse.h | 2 +- include/{ => ircd}/patchlevel.h | 2 +- include/{ => ircd}/privilege.h | 0 include/{ => ircd}/ratelimit.h | 0 include/{ => ircd}/reject.h | 0 include/{ => ircd}/restart.h | 0 include/{ => ircd}/s_assert.h | 0 include/{ => ircd}/s_conf.h | 2 +- include/{ => ircd}/s_newconf.h | 2 +- include/{ => ircd}/s_serv.h | 0 include/{ => ircd}/s_stats.h | 0 include/{ => ircd}/s_user.h | 0 include/{ => ircd}/scache.h | 0 include/{ => ircd}/send.h | 2 +- include/{ => ircd}/snomask.h | 0 include/{ => ircd}/sslproc.h | 0 include/{ => ircd}/stdinc.h | 2 +- include/{ => ircd}/substitution.h | 0 include/{ => ircd}/supported.h | 0 include/{ => ircd}/tgchange.h | 0 include/{ => ircd}/whowas.h | 4 +- include/{ => ircd}/wsproc.h | 0 include/rb/.gitignore | 1 + {librb/include => include/rb}/arc4random.h | 0 .../rb_balloc.h => include/rb/balloc.h | 9 +- .../rb_commio.h => include/rb/commio.h | 0 .../commio-int.h => include/rb/commio_int.h | 36 +- .../rb/dictionary.h | 2 - .../include/rb_dlink.h => include/rb/dlink.h | 0 .../include/rb_event.h => include/rb/event.h | 0 .../event-int.h => include/rb/event_int.h | 5 + .../rb_helper.h => include/rb/helper.h | 0 .../rb_linebuf.h => include/rb/linebuf.h | 0 .../rb_memory.h => include/rb/memory.h | 2 - .../rb_patricia.h => include/rb/patricia.h | 0 .../rb_radixtree.h => include/rb/radixtree.h | 0 .../rb_rawbuf.h => include/rb/rawbuf.h | 0 include/rb/rb.h | 68 ++ .../include/commio-ssl.h => include/rb/ssl.h | 4 +- librb/include/rb_lib.h => include/rb/system.h | 107 ++- .../include/rb_tools.h => include/rb/tools.h | 0 ircd/Makefile.am | 22 +- ircd/authproc.c | 33 +- ircd/bandbi.c | 33 +- ircd/cache.c | 16 +- ircd/capability.c | 7 +- ircd/channel.c | 34 +- ircd/chmode.c | 36 +- ircd/class.c | 21 +- ircd/client.c | 59 +- ircd/dns.c | 26 +- ircd/extban.c | 6 +- ircd/getopt.c | 5 +- ircd/hash.c | 29 +- ircd/hook.c | 6 +- ircd/hostmask.c | 13 +- ircd/ircd.c | 81 +- ircd/ircd_lexer.l | 12 +- ircd/ircd_parser.y | 12 +- ircd/ircd_signal.c | 16 +- ircd/listener.c | 38 +- ircd/logger.c | 13 +- ircd/main.c | 9 - ircd/match.c | 12 +- ircd/modules.c | 27 +- ircd/monitor.c | 13 +- ircd/msgbuf.c | 9 +- ircd/newconf.c | 43 +- ircd/operhash.c | 10 +- ircd/packet.c | 22 +- ircd/parse.c | 34 +- ircd/privilege.c | 14 +- ircd/ratelimit.c | 10 +- ircd/reject.c | 24 +- ircd/restart.c | 16 +- ircd/s_conf.c | 59 +- ircd/s_newconf.c | 27 +- ircd/s_serv.c | 51 +- ircd/s_user.c | 58 +- ircd/scache.c | 19 +- ircd/send.c | 29 +- ircd/snomask.c | 6 +- ircd/sslproc.c | 27 +- ircd/substitution.c | 12 +- ircd/supported.c | 18 +- ircd/tgchange.c | 20 +- ircd/version.c | 46 ++ ircd/version.c.SH | 83 --- ircd/whowas.c | 31 +- ircd/wsproc.c | 25 +- librb/COPYING | 340 --------- librb/CREDITS | 2 - librb/Makefile.am | 22 - librb/TODO | 2 - librb/acinclude.m4 | 172 ----- librb/autogen.sh | 89 --- librb/configure.ac | 698 ----------------- librb/install-sh | 501 ------------- librb/librb.pc.in | 14 - modules/Makefile.am | 3 +- modules/cap_account_tag.c | 24 +- modules/cap_server_time.c | 24 +- modules/chm_nocolour.c | 24 +- modules/chm_noctcp.c | 24 +- modules/core/m_ban.c | 34 +- modules/core/m_die.c | 26 +- modules/core/m_error.c | 18 +- modules/core/m_join.c | 36 +- modules/core/m_kick.c | 28 +- modules/core/m_kill.c | 30 +- modules/core/m_message.c | 40 +- modules/core/m_mode.c | 34 +- modules/core/m_modules.c | 30 +- modules/core/m_nick.c | 46 +- modules/core/m_part.c | 32 +- modules/core/m_quit.c | 22 +- modules/core/m_server.c | 32 +- modules/core/m_squit.c | 28 +- modules/m_accept.c | 22 +- modules/m_admin.c | 22 +- modules/m_alias.c | 26 +- modules/m_away.c | 24 +- modules/m_cap.c | 28 +- modules/m_capab.c | 16 +- modules/m_certfp.c | 18 +- modules/m_challenge.c | 28 +- modules/m_chghost.c | 34 +- modules/m_close.c | 16 +- modules/m_connect.c | 30 +- modules/m_dline.c | 38 +- modules/m_encap.c | 24 +- modules/m_etrace.c | 36 +- modules/m_grant.c | 20 +- modules/m_help.c | 25 +- modules/m_info.c | 34 +- modules/m_invite.c | 30 +- modules/m_ison.c | 24 +- modules/m_kline.c | 40 +- modules/m_knock.c | 28 +- modules/m_links.c | 28 +- modules/m_list.c | 37 +- modules/m_lusers.c | 22 +- modules/m_map.c | 14 +- modules/m_monitor.c | 20 +- modules/m_motd.c | 26 +- modules/m_names.c | 26 +- modules/m_oper.c | 30 +- modules/m_operspy.c | 26 +- modules/m_pass.c | 24 +- modules/m_ping.c | 24 +- modules/m_pong.c | 30 +- modules/m_post.c | 20 +- modules/m_privs.c | 18 +- modules/m_rehash.c | 39 +- modules/m_restart.c | 28 +- modules/m_resv.c | 32 +- modules/m_sasl.c | 26 +- modules/m_scan.c | 36 +- modules/m_services.c | 35 +- modules/m_set.c | 26 +- modules/m_signon.c | 39 +- modules/m_snote.c | 34 +- modules/m_starttls.c | 26 +- modules/m_stats.c | 47 +- modules/m_svinfo.c | 24 +- modules/m_tb.c | 24 +- modules/m_testline.c | 22 +- modules/m_testmask.c | 24 +- modules/m_tginfo.c | 20 +- modules/m_time.c | 22 +- modules/m_topic.c | 36 +- modules/m_trace.c | 32 +- modules/m_unreject.c | 16 +- modules/m_user.c | 24 +- modules/m_userhost.c | 22 +- modules/m_users.c | 20 +- modules/m_version.c | 22 +- modules/m_wallops.c | 26 +- modules/m_who.c | 36 +- modules/m_whois.c | 40 +- modules/m_whowas.c | 30 +- modules/m_xline.c | 42 +- modules/sno_routing.c | 12 +- {librb/src => rb}/Makefile.am | 15 +- {librb => rb}/README.md | 0 {librb/src => rb}/arc4random.c | 3 +- {librb/src => rb}/balloc.c | 3 +- {librb/src => rb}/commio.c | 10 +- {librb/src => rb}/crypt.c | 3 +- {librb/src => rb}/devpoll.c | 6 +- {librb/src => rb}/dictionary.c | 4 +- {librb/src => rb}/epoll.c | 10 +- {librb/src => rb}/event.c | 7 +- {librb/src => rb}/export-syms.txt | 0 {librb/src => rb}/gnutls.c | 8 +- {librb/src => rb}/helper.c | 5 +- {librb/src => rb}/kqueue.c | 7 +- {librb/src => rb}/linebuf.c | 5 +- {librb/src => rb}/mbedtls.c | 8 +- {librb/src => rb}/mbedtls_embedded_data.h | 0 {librb/src => rb}/nossl.c | 10 +- {librb/src => rb}/openssl.c | 8 +- {librb/src => rb}/patricia.c | 3 +- {librb/src => rb}/poll.c | 5 +- {librb/src => rb}/ports.c | 9 +- {librb/src => rb}/radixtree.c | 4 +- {librb/src => rb}/rawbuf.c | 5 +- librb/src/rb_lib.c => rb/rb.c | 13 +- {librb/src => rb}/rb_memory.c | 4 +- {librb/src => rb}/select.c | 5 +- {librb/src => rb}/sigio.c | 9 +- {librb/src => rb}/tools.c | 4 +- {librb/src => rb}/unix.c | 3 +- librb/src/version.c.SH => rb/version.c | 49 +- {librb/src => rb}/win32.c | 5 +- scripts/application.sh | 4 +- ssld/Makefile.am | 6 +- ssld/ssld.c | 2 +- tools/Makefile.am | 6 +- tools/mkfingerprint.c | 8 +- tools/mkpasswd.c | 8 +- wsockd/Makefile.am | 6 +- wsockd/sha1.c | 2 +- wsockd/wsockd.c | 2 +- 353 files changed, 3316 insertions(+), 4833 deletions(-) create mode 100644 charybdis/.gitignore create mode 100644 charybdis/Makefile.am create mode 100644 charybdis/charybdis.cc create mode 100644 include/ircd/.gitignore rename include/{ => ircd}/authproc.h (99%) rename include/{ => ircd}/bandbi.h (100%) rename include/{ => ircd}/cache.h (97%) rename include/{ => ircd}/capability.h (98%) rename include/{ => ircd}/certfp.h (100%) rename include/{ => ircd}/channel.h (99%) rename include/{ => ircd}/chmode.h (100%) rename include/{ => ircd}/class.h (100%) rename include/{ => ircd}/client.h (99%) rename include/{ => ircd}/defaults.h (98%) rename include/{ => ircd}/dns.h (100%) rename include/{ => ircd}/hash.h (98%) rename include/{ => ircd}/hook.h (100%) rename include/{ => ircd}/hostmask.h (100%) rename include/{ => ircd}/inline/stringops.h (100%) rename include/{ => ircd}/ircd.h (100%) rename include/{ => ircd}/ircd_defs.h (100%) rename include/{ => ircd}/ircd_getopt.h (100%) rename include/{ => ircd}/ircd_linker.h (100%) rename include/{ => ircd}/ircd_signal.h (100%) rename include/{ => ircd}/listener.h (98%) rename include/{ => ircd}/logger.h (100%) rename include/{ => ircd}/m_info.h (100%) rename include/{ => ircd}/match.h (99%) rename include/{ => ircd}/messages.h (100%) rename include/{ => ircd}/modules.h (98%) rename include/{ => ircd}/monitor.h (100%) rename include/{ => ircd}/msg.h (100%) rename include/{ => ircd}/msgbuf.h (100%) rename include/{ => ircd}/newconf.h (100%) rename include/{ => ircd}/numeric.h (100%) rename include/{ => ircd}/operhash.h (100%) rename include/{ => ircd}/packet.h (100%) rename include/{ => ircd}/parse.h (98%) rename include/{ => ircd}/patchlevel.h (98%) rename include/{ => ircd}/privilege.h (100%) rename include/{ => ircd}/ratelimit.h (100%) rename include/{ => ircd}/reject.h (100%) rename include/{ => ircd}/restart.h (100%) rename include/{ => ircd}/s_assert.h (100%) rename include/{ => ircd}/s_conf.h (99%) rename include/{ => ircd}/s_newconf.h (99%) rename include/{ => ircd}/s_serv.h (100%) rename include/{ => ircd}/s_stats.h (100%) rename include/{ => ircd}/s_user.h (100%) rename include/{ => ircd}/scache.h (100%) rename include/{ => ircd}/send.h (99%) rename include/{ => ircd}/snomask.h (100%) rename include/{ => ircd}/sslproc.h (100%) rename include/{ => ircd}/stdinc.h (99%) rename include/{ => ircd}/substitution.h (100%) rename include/{ => ircd}/supported.h (100%) rename include/{ => ircd}/tgchange.h (100%) rename include/{ => ircd}/whowas.h (98%) rename include/{ => ircd}/wsproc.h (100%) create mode 100644 include/rb/.gitignore rename {librb/include => include/rb}/arc4random.h (100%) rename librb/include/rb_balloc.h => include/rb/balloc.h (92%) rename librb/include/rb_commio.h => include/rb/commio.h (100%) rename librb/include/commio-int.h => include/rb/commio_int.h (87%) rename librb/include/rb_dictionary.h => include/rb/dictionary.h (99%) rename librb/include/rb_dlink.h => include/rb/dlink.h (100%) rename librb/include/rb_event.h => include/rb/event.h (100%) rename librb/include/event-int.h => include/rb/event_int.h (93%) rename librb/include/rb_helper.h => include/rb/helper.h (100%) rename librb/include/rb_linebuf.h => include/rb/linebuf.h (100%) rename librb/include/rb_memory.h => include/rb/memory.h (99%) rename librb/include/rb_patricia.h => include/rb/patricia.h (100%) rename librb/include/rb_radixtree.h => include/rb/radixtree.h (100%) rename librb/include/rb_rawbuf.h => include/rb/rawbuf.h (100%) create mode 100644 include/rb/rb.h rename librb/include/commio-ssl.h => include/rb/ssl.h (97%) rename librb/include/rb_lib.h => include/rb/system.h (72%) rename librb/include/rb_tools.h => include/rb/tools.h (100%) delete mode 100644 ircd/main.c create mode 100644 ircd/version.c delete mode 100644 ircd/version.c.SH delete mode 100644 librb/COPYING delete mode 100644 librb/CREDITS delete mode 100644 librb/Makefile.am delete mode 100644 librb/TODO delete mode 100644 librb/acinclude.m4 delete mode 100755 librb/autogen.sh delete mode 100644 librb/configure.ac delete mode 100755 librb/install-sh delete mode 100644 librb/librb.pc.in rename {librb/src => rb}/Makefile.am (67%) rename {librb => rb}/README.md (100%) rename {librb/src => rb}/arc4random.c (99%) rename {librb/src => rb}/balloc.c (99%) rename {librb/src => rb}/commio.c (99%) rename {librb/src => rb}/crypt.c (99%) rename {librb/src => rb}/devpoll.c (98%) rename {librb/src => rb}/dictionary.c (99%) rename {librb/src => rb}/epoll.c (98%) rename {librb/src => rb}/event.c (98%) rename {librb/src => rb}/export-syms.txt (100%) rename {librb/src => rb}/gnutls.c (99%) rename {librb/src => rb}/helper.c (98%) rename {librb/src => rb}/kqueue.c (98%) rename {librb/src => rb}/linebuf.c (99%) rename {librb/src => rb}/mbedtls.c (99%) rename {librb/src => rb}/mbedtls_embedded_data.h (100%) rename {librb/src => rb}/nossl.c (97%) rename {librb/src => rb}/openssl.c (99%) rename {librb/src => rb}/patricia.c (99%) rename {librb/src => rb}/poll.c (98%) rename {librb/src => rb}/ports.c (98%) rename {librb/src => rb}/radixtree.c (99%) rename {librb/src => rb}/rawbuf.c (98%) rename librb/src/rb_lib.c => rb/rb.c (98%) rename {librb/src => rb}/rb_memory.c (96%) rename {librb/src => rb}/select.c (98%) rename {librb/src => rb}/sigio.c (98%) rename {librb/src => rb}/tools.c (99%) rename {librb/src => rb}/unix.c (98%) rename librb/src/version.c.SH => rb/version.c (63%) rename {librb/src => rb}/win32.c (99%) diff --git a/.gitignore b/.gitignore index 97a17b388..2cbbb52d4 100644 --- a/.gitignore +++ b/.gitignore @@ -28,31 +28,11 @@ config.status configure stamp-h1 libltdl/ -librb/configure -librb/compile -librb/depcomp -librb/aclocal.m4 -librb/include/librb_config.h -librb/include/librb_config.h.in -librb/include/librb-config.h -librb/include/serno.h -librb/librb.pc -librb/ltmain.sh -librb/missing -librb/libratbox.pc -librb/libtool -librb/src/version.c -librb/src/version.c.last scripts/*.tar.bz2 scripts/*.tar.gz -include/setup.h -include/setup.h.in -ircd/charybdis ircd/ircd_parser.c ircd/ircd_parser.h ircd/ircd_lexer.c -ircd/version.c -ircd/version.c.last ssld/ssld wsockd/wsockd testsuite/ircd.pid.* @@ -61,10 +41,6 @@ tools/charybdis-mkfingerprint tools/genssl tools/mkpasswd tools/viconf -include/serno.h -ircd/charybdis -ircd/version.c -ircd/version.c.last /libtool Makefile.in m4/argz.m4 @@ -76,3 +52,5 @@ m4/ltsugar.m4 m4/ltversion.m4 m4/lt~obsolete.m4 *.dSYM/ +install-sh +ylwrap diff --git a/Makefile.am b/Makefile.am index 551b10d81..77a1fe306 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,59 +1,34 @@ AUTOMAKE_OPTIONS = foreign ACLOCAL_AMFLAGS = -I m4 -SUBDIRS = librb +SUBDIRS = rb \ + ircd if BUILD_LTDL -SUBDIRS += libltdl + SUBDIRS += libltdl endif -SUBDIRS += ircd \ - ssld \ - wsockd \ - authd \ - bandb \ - tools \ - modules \ - extensions \ - help \ - doc +SUBDIRS += tools \ + help \ + doc \ + ssld \ + wsockd \ + authd \ + bandb \ + modules \ + extensions \ + charybdis -logdir = @prefix@/logs - -BUILT_SOURCES = include/serno.h - -include/serno.h: - @if [ -d .git ]; then \ - revh=`git log -1 --date=format:%Y%m%d --pretty=format:%cd-%h`; \ - datecode=`git log -1 --pretty=format:%ct`; \ - if [ -n "$$revh" ]; then \ - echo '#define SERNO "'$$revh'"' >include/serno.h ; \ - echo "#define DATECODE $${datecode}UL" >>include/serno.h; \ - fi \ - fi - @if [ ! -f include/serno.h ]; then \ - echo '#define SERNO "unknown"' >include/serno.h; \ - echo '#define DATECODE 0UL' >>include/serno.h; \ - fi +logdir = @prefix@/var/log install-data-hook: test -d ${DESTDIR}${logdir} || mkdir -p ${DESTDIR}${logdir} -install-exec-hook: - rm -f ${DESTDIR}${moduledir}/*.la - rm -f ${DESTDIR}${moduledir}/autoload/*.la - rm -f ${DESTDIR}${moduledir}/extensions/*.la - rm -f ${DESTDIR}${moduledir}/*.dll.a - rm -f ${DESTDIR}${moduledir}/autoload/*.dll.a - rm -f ${DESTDIR}${moduledir}/extensions/*.dll.a - -distclean-local: - rm -f librb/include/librb-config.h +mrproper: + rm -f include/rb/config.h + rm -f include/rb/config.h.in clean-local: - rm -f include/serno.h rm -f ircd/ircd_lexer.c rm -f ircd/ircd_parser.c rm -f ircd/ircd_parser.h - rm -f ircd/version.c - rm -f ircd/version.c.last diff --git a/authd/Makefile.am b/authd/Makefile.am index d6033e056..f291f5df8 100644 --- a/authd/Makefile.am +++ b/authd/Makefile.am @@ -1,6 +1,6 @@ -pkglibexec_PROGRAMS = authd +bin_PROGRAMS = authd AM_CFLAGS=$(WARNFLAGS) -AM_CPPFLAGS = -I../include -I../librb/include +AM_CPPFLAGS = -I$(top_srcdir)/include authd_SOURCES = \ authd.c \ @@ -17,4 +17,4 @@ authd_SOURCES = \ providers/rdns.c \ providers/opm.c -authd_LDADD = ../librb/src/librb.la +authd_LDADD = $(top_srcdir)/rb/librb.la diff --git a/authd/authd.h b/authd/authd.h index f9e7e2f28..9ac3c179c 100644 --- a/authd/authd.h +++ b/authd/authd.h @@ -21,12 +21,7 @@ #ifndef _AUTHD_H #define _AUTHD_H -#include "stdinc.h" -#include "rb_lib.h" -#include "rb_dictionary.h" - -#include "setup.h" -#include "ircd_defs.h" +#include typedef enum exit_reasons { diff --git a/authd/dns.h b/authd/dns.h index 7383ab692..493491fe1 100644 --- a/authd/dns.h +++ b/authd/dns.h @@ -23,7 +23,7 @@ #define DNS_REQ_IDLEN 10 -#include "stdinc.h" +#include #include "res.h" #include "reslib.h" diff --git a/authd/getaddrinfo.c b/authd/getaddrinfo.c index 43384c426..c7c662387 100644 --- a/authd/getaddrinfo.c +++ b/authd/getaddrinfo.c @@ -28,9 +28,9 @@ */ #ifdef _WIN32 -#include +#include +#include #include "getaddrinfo.h" -#include "stdinc.h" static const char in_addrany[] = { 0, 0, 0, 0 }; static const char in_loopback[] = { 127, 0, 0, 1 }; diff --git a/authd/getnameinfo.c b/authd/getnameinfo.c index 4b3dbcf51..4c9d1ef8b 100644 --- a/authd/getnameinfo.c +++ b/authd/getnameinfo.c @@ -42,7 +42,7 @@ */ #ifdef _WIN32 -#include +#include #include "getaddrinfo.h" #include "getnameinfo.h" diff --git a/authd/provider.c b/authd/provider.c index 7def5714a..ce412a0f2 100644 --- a/authd/provider.c +++ b/authd/provider.c @@ -46,9 +46,7 @@ * --Elizafox, 9 March 2016 */ -#include "stdinc.h" -#include "rb_dictionary.h" -#include "rb_lib.h" +#include #include "authd.h" #include "provider.h" #include "notice.h" diff --git a/authd/provider.h b/authd/provider.h index 9bcb74214..97af1361d 100644 --- a/authd/provider.h +++ b/authd/provider.h @@ -21,9 +21,8 @@ #ifndef __CHARYBDIS_AUTHD_PROVIDER_H__ #define __CHARYBDIS_AUTHD_PROVIDER_H__ -#include "stdinc.h" +#include #include "authd.h" -#include "rb_dictionary.h" #define MAX_PROVIDERS 32 /* This should be enough */ diff --git a/authd/providers/blacklist.c b/authd/providers/blacklist.c index c6de72a6c..7dcb7fee9 100644 --- a/authd/providers/blacklist.c +++ b/authd/providers/blacklist.c @@ -38,10 +38,8 @@ */ #include "authd.h" -#include "defaults.h" #include "provider.h" #include "notice.h" -#include "stdinc.h" #include "dns.h" #define SELF_PID (blacklist_provider.id) diff --git a/authd/providers/ident.c b/authd/providers/ident.c index e6f08b198..8b2bedf68 100644 --- a/authd/providers/ident.c +++ b/authd/providers/ident.c @@ -24,9 +24,8 @@ * --Elizafox 13 March 2016 */ -#include "stdinc.h" -#include "defaults.h" -#include "match.h" +#include +#include #include "authd.h" #include "notice.h" #include "provider.h" diff --git a/authd/providers/opm.c b/authd/providers/opm.c index 8087bc972..b98124459 100644 --- a/authd/providers/opm.c +++ b/authd/providers/opm.c @@ -18,10 +18,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include "stdinc.h" -#include "rb_lib.h" -#include "defaults.h" -#include "setup.h" +#include #include "authd.h" #include "notice.h" #include "provider.h" diff --git a/authd/providers/rdns.c b/authd/providers/rdns.c index ff0bb0780..5ac03511d 100644 --- a/authd/providers/rdns.c +++ b/authd/providers/rdns.c @@ -18,8 +18,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include "stdinc.h" -#include "rb_commio.h" +#include #include "authd.h" #include "provider.h" #include "notice.h" diff --git a/authd/res.c b/authd/res.c index 878174731..f39507436 100644 --- a/authd/res.c +++ b/authd/res.c @@ -32,8 +32,7 @@ * January 2016 --kaniini */ -#include -#include "setup.h" +#include #include "res.h" #include "reslib.h" diff --git a/authd/reslib.c b/authd/reslib.c index 7771da6c5..c33ae9d68 100644 --- a/authd/reslib.c +++ b/authd/reslib.c @@ -76,7 +76,7 @@ * - Dianora */ -#include +#include #ifndef _WIN32 @@ -95,13 +95,12 @@ extern const char * get_windows_nameservers(void); typedef struct rb_addrinfo rb_addrinfo; #endif -#include "stdinc.h" -#include "ircd_defs.h" -#include "ircd.h" +#include +#include +#include +#include #include "res.h" #include "reslib.h" -#include "match.h" -#include "logger.h" #define NS_TYPE_ELT 0x40 /* EDNS0 extended label type */ #define DNS_LABELTYPE_BITSTRING 0x41 diff --git a/authd/reslist.c b/authd/reslist.c index 1a17ec2e6..3df01c814 100644 --- a/authd/reslist.c +++ b/authd/reslist.c @@ -29,8 +29,7 @@ */ #ifdef _WIN32 -#include - +#include #include #include diff --git a/autogen.sh b/autogen.sh index 6348810bc..35a6fca34 100755 --- a/autogen.sh +++ b/autogen.sh @@ -81,13 +81,6 @@ parse_options "$@" echo "Building librb autotools files." -cd "$TOP_DIR"/librb -sh autogen.sh - -echo "Building main autotools files." - -cd "$LAST_DIR" - run_or_die $ACLOCAL -I m4 run_or_die $LIBTOOLIZE --force --copy run_or_die $AUTOHEADER diff --git a/bandb/Makefile.am b/bandb/Makefile.am index 040451c15..0d305cda9 100644 --- a/bandb/Makefile.am +++ b/bandb/Makefile.am @@ -1,16 +1,15 @@ -pkglibexec_PROGRAMS = bandb -bin_PROGRAMS = bantool +bin_PROGRAMS = bandb bantool AM_CFLAGS=$(WARNFLAGS) -AM_CPPFLAGS = -I../include -I../librb/include @SQLITE_INCLUDES@ +AM_CPPFLAGS = -I$(top_srcdir)/include @SQLITE_INCLUDES@ AM_CPPFLAGS += -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION bandb_SOURCES = bandb.c rsdb_sqlite3.c rsdb_snprintf.c EXTRA_bandb_SOURCES = sqlite3.c -bandb_LDADD = ../librb/src/librb.la @SQLITE_LD@ @SQLITE_OBJ@ +bandb_LDADD = $(top_srcdir)/rb/librb.la @SQLITE_LD@ @SQLITE_OBJ@ bandb_DEPENDENCIES = @SQLITE_OBJ@ bantool_SOURCES = bantool.c rsdb_sqlite3.c rsdb_snprintf.c EXTRA_bantool_SOURCES = sqlite3.c -bantool_LDADD = ../librb/src/librb.la @SQLITE_LD@ @SQLITE_OBJ@ +bantool_LDADD = $(top_srcdir)/rb/librb.la @SQLITE_LD@ @SQLITE_OBJ@ bantool_DEPENDENCIES = @SQLITE_OBJ@ diff --git a/bandb/bandb.c b/bandb/bandb.c index 769f6fe43..b17e647c3 100644 --- a/bandb/bandb.c +++ b/bandb/bandb.c @@ -27,11 +27,9 @@ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ -#include "setup.h" -#include -#include +#include #include "rsdb.h" -#include "ircd_defs.h" +#include #define MAXPARA 10 diff --git a/bandb/bantool.c b/bandb/bantool.c index f4547eb9b..2a88c16ee 100644 --- a/bandb/bantool.c +++ b/bandb/bantool.c @@ -39,7 +39,7 @@ #include #include -#include "stdinc.h" +#include #include "rsdb.h" #define EmptyString(x) ((x == NULL) || (*(x) == '\0')) diff --git a/bandb/rsdb_snprintf.c b/bandb/rsdb_snprintf.c index 7cf369ddd..a4a0d39b6 100644 --- a/bandb/rsdb_snprintf.c +++ b/bandb/rsdb_snprintf.c @@ -6,7 +6,7 @@ * do so under the terms of the GNU General Public License under which * this library is distributed. */ -#include "stdinc.h" +#include #include "rsdb.h" /* diff --git a/bandb/rsdb_sqlite3.c b/bandb/rsdb_sqlite3.c index 97eff0e64..a9de390ae 100644 --- a/bandb/rsdb_sqlite3.c +++ b/bandb/rsdb_sqlite3.c @@ -28,7 +28,7 @@ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ -#include "stdinc.h" +#include #include "rsdb.h" #include diff --git a/charybdis/.gitignore b/charybdis/.gitignore new file mode 100644 index 000000000..ac536e13e --- /dev/null +++ b/charybdis/.gitignore @@ -0,0 +1 @@ +charybdis diff --git a/charybdis/Makefile.am b/charybdis/Makefile.am new file mode 100644 index 000000000..3dd0672d2 --- /dev/null +++ b/charybdis/Makefile.am @@ -0,0 +1,12 @@ +prefix = @prefix@ +AM_CPPFLAGS = @LTDLINCL@ -I$(top_srcdir)/include + +if MINGW +EXTRA_FLAGS = -Wl,--enable-runtime-pseudo-reloc -export-symbols-regex '*' +endif + +bin_PROGRAMS = charybdis +charybdis_SOURCES = charybdis.cc +charybdis_LDFLAGS = $(EXTRA_FLAGS) -dlopen self +charybdis_LDADD = -L$(top_srcdir)/ircd -lircd +charybdis_LDADD += -L$(top_srcdir)/rb -lrb diff --git a/charybdis/charybdis.cc b/charybdis/charybdis.cc new file mode 100644 index 000000000..2e4919b18 --- /dev/null +++ b/charybdis/charybdis.cc @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2016 Charybdis Development Team + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice is present in all copies. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include + + +extern "C" int charybdis_main(int argc, char *argv[]); + +int main(int argc, char *argv[]) +{ + return charybdis_main(argc, argv); +} diff --git a/configure.ac b/configure.ac index ef8783050..f37ec8931 100644 --- a/configure.ac +++ b/configure.ac @@ -2,38 +2,623 @@ dnl TODO: clean up all the OpenSSL and shared module checking stuff; dnl the most major changes have already been made and it looks like dnl said functions need to be just about as complex as they already are. -AC_PREREQ(2.60) +AC_PREREQ(2.63) +AUTOMAKE_OPTIONS = 1.10 AC_INIT([charybdis], [5-dev]) +AC_CONFIG_MACRO_DIR([m4]) +AC_CONFIG_HEADER(include/rb/config.h) +AC_PREFIX_DEFAULT($HOME/ircd) -AC_LANG(C) -AC_USE_SYSTEM_EXTENSIONS +AC_LANG(C++) AC_GNU_SOURCE - -AC_PROG_CC_C99 -if test x"$ac_cv_prog_cc_c99" = "xno"; then - AC_ERROR([charybdis requires a C99 capable compiler]) -fi +AC_USE_SYSTEM_EXTENSIONS +AX_CXX_COMPILE_STDCXX_14([ext], [mandatory]) +AC_ISC_POSIX +AC_C_INLINE +AC_C_CONST +AC_C_BIGENDIAN +AC_TYPE_PID_T +AC_TYPE_SIZE_T +AC_TYPE_SSIZE_T +AC_TYPE_UID_T AC_PROG_CXX -AX_CXX_COMPILE_STDCXX_14([ext], [mandatory]) +AC_PROG_MAKE_SET +AC_PROG_LIBTOOL +AC_PATH_PROG(AUTOMAKE, automake) +AC_PATH_PROG(ACLOCAL, aclocal) +AC_PATH_PROG(AUTOHEADER, autoheader) +AC_PATH_PROG(AS, as) +AC_PATH_PROG(RM, rm) +AC_PATH_PROG(CP, cp) +AC_PATH_PROG(MV, mv) +AC_PATH_PROG(LN, ln) +AC_PATH_PROG(TOUCH, touch) -AC_PREFIX_DEFAULT($HOME/ircd) -AC_CONFIG_MACRO_DIR([m4]) -AC_CONFIG_HEADER(include/setup.h) +LT_CONFIG_LTDL_DIR([libltdl]) +LT_INIT([dlopen disable-static]) +LTDL_INIT +#LIBTOOL="$LIBTOOL --silent" -AC_CONFIG_SUBDIRS([librb]) -AC_CONFIG_AUX_DIR([libltdl/config]) +AC_CONFIG_FILES(\ + Makefile \ + authd/Makefile \ + bandb/Makefile \ + charybdis/Makefile \ + doc/Makefile \ + extensions/Makefile \ + help/Makefile \ + ircd/Makefile \ + modules/Makefile \ + rb/Makefile \ + ssld/Makefile \ + tools/Makefile \ + tools/genssl \ + wsockd/Makefile \ +) AM_INIT_AUTOMAKE([subdir-objects]) -AM_SILENT_RULES([yes]) -AM_PROG_AR +AM_EXTRA_RECURSIVE_TARGETS([mrproper]) + +VERSION_CMD="git describe --tags" +DATESTR_CMD="date -R" +DATECODE_CMD="date +%s" + +RB_VERSION=`$VERSION_CMD` +RB_DATESTR=`$DATESTR_CMD` +RB_DATECODE=`$DATECODE_CMD` + +AC_DEFINE_UNQUOTED([RB_VERSION], ["$RB_VERSION"], [Version generated at configuration time.]) +AC_DEFINE_UNQUOTED([RB_DATESTR], ["$RB_DATESTR"], [Readable date string of configuration time.]) +AC_DEFINE_UNQUOTED([RB_DATECODE], [$RB_DATECODE], [UNIX epoch time at configuration time.]) + +AC_DEFINE([NICKNAMEHISTORYLENGTH], 15000, [Size of the WHOWAS array.]) +AC_DEFINE([CHANNEL_HEAP_SIZE], 8192, [Size of the channel heap.]) +AC_DEFINE([BAN_HEAP_SIZE], 4096, [Size of the ban heap.]) +AC_DEFINE([CLIENT_HEAP_SIZE], 8192, [Size of the client heap.]) +AC_DEFINE([LCLIENT_HEAP_SIZE], 1024, [Size of the local client heap.]) +AC_DEFINE([PCLIENT_HEAP_SIZE], 256, [Size of the pre-client heap.]) +AC_DEFINE([USER_HEAP_SIZE], 8192, [Size of the user heap.]) +AC_DEFINE([DNODE_HEAP_SIZE], 8192, [Size of the dlink_node heap.]) +AC_DEFINE([TOPIC_HEAP_SIZE], 4096, [Size of the topic heap.]) +AC_DEFINE([LINEBUF_HEAP_SIZE], 2048, [Size of the linebuf heap.]) +AC_DEFINE([MEMBER_HEAP_SIZE], 32768, [Sizeof member heap.]) +AC_DEFINE([ND_HEAP_SIZE], 512, [Size of the nick delay heap.]) +AC_DEFINE([CONFITEM_HEAP_SIZE], 256, [Size of the confitem heap.]) +AC_DEFINE([MONITOR_HEAP_SIZE], 1024, [Size of the monitor heap.]) +AC_DEFINE([FD_HEAP_SIZE], 1024, [Size of fd heap.]) +AC_DEFINE([AWAY_HEAP_SIZE], 512, [Size of away heap.]) + +dnl Checks for header files. +AC_DEFUN([RB_CHK_SYSHEADER], \ +[ + AC_CHECK_HEADER([$1], \ + [ + AC_DEFINE([HAVE_$2], [1], [ Indication $1 is available. ]) + AC_DEFINE_UNQUOTED([RB_INC_$2], [$1>], [ The computed-include location of $1. ]) + ],[ + AC_DEFINE_UNQUOTED([RB_INC_$2], [/dev/null>], [ The computed-include location of $1. ]) + ]) +]) + +RB_CHK_SYSHEADER([errno.h]) +#RB_CHK_SYSHEADER([errno.h], [ERRNO_H]) +RB_CHK_SYSHEADER([assert.h], [ASSERT_H]) +RB_CHK_SYSHEADER([stddef.h], [STDDEF_H]) +RB_CHK_SYSHEADER([stdarg.h], [STDARG_H]) +RB_CHK_SYSHEADER([stdint.h], [STDINT_H]) +RB_CHK_SYSHEADER([inttypes.h], [INTTYPES_H]) +RB_CHK_SYSHEADER([ctype.h], [CTYPE_H]) +RB_CHK_SYSHEADER([limits.h], [LIMITS_H]) +RB_CHK_SYSHEADER([stdlib.h], [STDLIB_H]) +RB_CHK_SYSHEADER([unistd.h], [UNISTD_H]) +RB_CHK_SYSHEADER([time.h], [TIME_H]) +RB_CHK_SYSHEADER([fcntl.h], [FCNTL_H]) +RB_CHK_SYSHEADER([signal.h], [SIGNAL_H]) +RB_CHK_SYSHEADER([sys/types.h], [SYS_TYPES_H]) +RB_CHK_SYSHEADER([sys/time.h], [SYS_TIME_H]) +RB_CHK_SYSHEADER([sys/stat.h], [SYS_STAT_H]) +RB_CHK_SYSHEADER([sys/socket.h], [SYS_SOCKET_H]) +RB_CHK_SYSHEADER([arpa/inet.h], [ARPA_INET_H]) +RB_CHK_SYSHEADER([netinet/in.h], [NETINET_IN_H]) +RB_CHK_SYSHEADER([netinet/tcp.h], [NETINET_TCP_H]) +RB_CHK_SYSHEADER([string.h], [STRING_H]) +RB_CHK_SYSHEADER([stdio.h], [STDIO_H]) +RB_CHK_SYSHEADER([crypt.h], [CRYPT_H]) +RB_CHK_SYSHEADER([sys/uio.h], [SYS_UIO_H]) +RB_CHK_SYSHEADER([spawn.h], [SPAWN_H]) +RB_CHK_SYSHEADER([sys/poll.h], [SYS_POLL_H]) +RB_CHK_SYSHEADER([sys/epoll.h], [SYS_EPOLL_H]) +RB_CHK_SYSHEADER([sys/select.h], [SYS_SELECT_H]) +RB_CHK_SYSHEADER([sys/devpoll.h], [SYS_DEVPOLL_H]) +RB_CHK_SYSHEADER([sys/event.h], [SYS_EVENT_H]) +RB_CHK_SYSHEADER([port.h], [PORT_H]) +RB_CHK_SYSHEADER([sys/signalfd.h], [SYS_SIGNALFD_H]) +RB_CHK_SYSHEADER([sys/timerfd.h], [SYS_TIMERFD_H]) +RB_CHK_SYSHEADER([execinfo.h], [EXECINFO_H]) +RB_CHK_SYSHEADER([windows.h], [WINDOWS_H]) +RB_CHK_SYSHEADER([winsock2.h], [WINSOCK2_H]) +RB_CHK_SYSHEADER([ws2tcpip.h], [WS2TCPIP_H]) +RB_CHK_SYSHEADER([iphlpapi.h], [IPHLPAPI_H]) + + +CFLAGS="$IRC_CFLAGS $CFLAGS" + +case "$host_os" in +*cygwin*) + AC_DEFINE_UNQUOTED(CYGWIN,1,[This is a Cygwin system]) + AC_DEFINE_UNQUOTED(WINDOWS,1,[This is a Windows system]) + ;; +*mingw* | *msys*) + AC_DEFINE_UNQUOTED(MINGW,1,[This is a MinGW system]) + AC_DEFINE_UNQUOTED(WINDOWS,1,[This is a Windows system]) + AC_CHECK_HEADER(windows.h, , [AC_MSG_ERROR([** MinGW and no windows.h. I give up.])]) + AC_CHECK_HEADER(winsock2.h, , [AC_MSG_ERROR([** MinGW and no winsock2.h. I give up.])]) + AC_DEFINE_UNQUOTED(HAVE_WINSOCK2_H, 1, [Have WINSOCK2_H]) + AC_DEFINE_UNQUOTED(HAVE_WINSOCK_H, 1, [Have WINSOCK_H]) + LIBS="$LIBS -lws2_32 -liphlpapi" + is_mingw="yes" + ;; +*interix*) + CPPFLAGS="$CFLAGS -D_ALL_SOURCE -D_XOPEN_SOURCE=500" + ;; +*solaris*) + CPPFLAGS="$CFLAGS -D_POSIX_PTHREAD_SEMANTICS -D_XPG4_2" + ;; +*) + ;; +esac + +AM_CONDITIONAL([MINGW], [test "$is_mingw" = "yes"]) + + +dnl use directory structure of cached as default (hack) +if test "$libexecdir" = '${exec_prefix}/libexec' && + test "$localstatedir" = '${prefix}/var'; then + libexecdir='${bindir}' + localstatedir='${prefix}' +fi + + +dnl Networking Functions +dnl ==================== + +AC_SEARCH_LIBS(socket, [socket],,) + + +AC_CHECK_MEMBER([struct sockaddr.sa_len], [AC_DEFINE(SOCKADDR_IN_HAS_LEN, 1, [Define to 1 if sockaddr has a 'sa_len' member.])],,[[ +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_WINSOCK2_H +#include +#endif +]]) + +AC_CHECK_TYPE([socklen_t], rb_cv_socklen_t=socklen_t,[ + AC_MSG_CHECKING([for socklen_t equivalent]) + AC_CACHE_VAL([rb_cv_socklen_t], + [ + # Systems have either "struct sockaddr *" or + # "void *" as the second argument to getpeername + rb_cv_socklen_t= + for arg2 in "struct sockaddr" void; do + for t in int size_t unsigned long "unsigned long"; do + AC_TRY_COMPILE([ +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_WINSOCK2_H +#include +#include +#endif +int getpeername (int, $arg2 *, $t *); +],[ +$t len; +getpeername(0,0,&len); +],[ + rb_cv_socklen_t="$t" + break +]) + done + done + + if test "x$rb_cv_socklen_t" = x; then + AC_MSG_WARN([Cannot find a type to use in place of socklen_t using int]) + rb_cv_socklen_t=int + fi + ]) + AC_MSG_RESULT($rb_cv_socklen_t)], + [#include +#include ]) + +rb_socklen_t=$rb_cv_socklen_t + + + +AC_ARG_ENABLE(ipv6, AC_HELP_STRING([--disable-ipv6], [Disable IPv6 support]), [ipv6=$enableval], [ipv6=yes]) + +dnl TODO: IPV6 CHECKS + +if test x$ipv6 = "Xyes"; then + AC_DEFINE([HAVE_IPV6], [1], [IPv6 is supported]) +else + AC_DEFINE([HAVE_IPV6], [0], [IPv6 not supported]) +fi + + +AC_CHECK_TYPES([struct sockaddr_storage],[ + rb_have_sockaddr_storage=yes + ],[], [ + #include + #include + ]) + + +dnl Check for stdarg.h - if we cant find it, halt configure +AC_CHECK_HEADER(stdarg.h, , [AC_MSG_ERROR([** stdarg.h could not be found - librb will not compile without it **])]) + +AC_CHECK_TYPE([sa_family_t], [], +[AC_DEFINE(sa_family_t, [u_int16_t], [If system does not define sa_family_t, define it here.])], +[[#include +#include ]]) + + +dnl check for various functions... +AC_CHECK_FUNCS([snprintf vsnprintf socketpair gettimeofday writev sendmsg gmtime_r strtok_r usleep posix_spawn getexecname strlcpy strlcat strnlen strcasestr strcasecmp strncasecmp fstat signalfd select poll kevent port_create epoll_ctl arc4random getrusage timerfd_create]) + +AC_SEARCH_LIBS(dlinfo, dl, AC_DEFINE(HAVE_DLINFO, 1, [Define if you have dlinfo])) +AC_SEARCH_LIBS(nanosleep, rt posix4, AC_DEFINE(HAVE_NANOSLEEP, 1, [Define if you have nanosleep])) +AC_SEARCH_LIBS(timer_create, rt, AC_DEFINE(HAVE_TIMER_CREATE, 1, [Define if you have timer_create])) + +AC_DEFUN([RB_CHECK_TIMER_CREATE], + [AC_CACHE_CHECK([for a working timer_create(CLOCK_REALTIME)], + [rb__cv_timer_create_works], + [AC_TRY_RUN([ +#ifdef HAVE_TIME_H +#include +#endif +#ifdef HAVE_SIGNAL_H +#include +#endif +#ifdef HAVE_UNISTD_H +#include +#endif +int main(int argc, char *argv[]) +{ +#if HAVE_TIMER_CREATE + struct sigevent ev; + timer_t timer; + ev.sigev_notify = SIGEV_SIGNAL; + ev.sigev_signo = SIGVTALRM; + if (timer_create(CLOCK_REALTIME, &ev, &timer) != 0) { + return 1; + } +#else + return 1; +#endif + return 0; +} + ], + [rb__cv_timer_create_works=yes], + [rb__cv_timer_create_works=no], + [rb__cv_timer_create_works=no]) + ]) +case $rb__cv_timer_create_works in + yes) AC_DEFINE([USE_TIMER_CREATE], 1, + [Define to 1 if we can use timer_create(CLOCK_REALTIME,...)]);; +esac +]) + + + +AC_DEFUN([RB_CHECK_TIMERFD_CREATE], + [AC_CACHE_CHECK([for a working timerfd_create(CLOCK_REALTIME)], + [rb__cv_timerfd_create_works], + [AC_TRY_RUN([ +#ifdef HAVE_TIME_H +#include +#endif +#ifdef HAVE_SIGNAL_H +#include +#endif +#ifdef HAVE_UNISTD_H +#include +#endif +#ifdef HAVE_SYS_TIMERFD_H +#include +#endif +int main(int argc, char *argv[]) +{ +#if defined(HAVE_TIMERFD_CREATE) && defined(HAVE_SYS_TIMERFD_H) + if (timerfd_create(CLOCK_REALTIME, 0) < 0) { + return 1; + } +#else + return 1; +#endif + return 0; +} + ], + [rb__cv_timerfd_create_works=yes], + [rb__cv_timerfd_create_works=no], + [rb__cv_timerfd_create_works=no]) + ]) +case $rb__cv_timerfd_create_works in + yes) AC_DEFINE([USE_TIMERFD_CREATE], 1, + [Define to 1 if we can use timerfd_create(CLOCK_REALTIME,...)]);; +esac +]) + +RB_CHECK_TIMER_CREATE +RB_CHECK_TIMERFD_CREATE + +AC_FUNC_ALLOCA +AC_FUNC_VFORK +AC_FUNC_MMAP + +AC_MSG_CHECKING(for /dev/poll) +if test -c "/dev/poll"; then + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_DEVPOLL, [1], [Define to 1 if you have devpoll]) +else + AC_MSG_RESULT(no) +fi + + +if test "$is_mingw" = "yes"; then + AC_DEFINE(HAVE_WIN32, [1], [Define to 1 if you are on windows]) +fi + +dnl OpenSSL support +AC_MSG_CHECKING(for OpenSSL) +AC_ARG_ENABLE(openssl, +[AC_HELP_STRING([--enable-openssl[=DIR]],[Enable OpenSSL support (DIR optional).]) +AC_HELP_STRING([--disable-openssl],[Disable OpenSSL support.])], +[cf_enable_openssl=$enableval], +[cf_enable_openssl="auto"]) + +if test "$cf_enable_openssl" != "no" ; then + cf_openssl_basedir="" + if test "$cf_enable_openssl" != "auto" && + test "$cf_enable_openssl" != "yes" ; then + dnl Support for --enable-openssl=/some/place + cf_openssl_basedir="`echo ${cf_enable_openssl} | sed 's/\/$//'`" + else + dnl Do the auto-probe here. Check some common directory paths. + for dirs in /usr/local/ssl /usr/pkg /usr/local \ + /usr/local/openssl ; do + if test -f "${dirs}/include/openssl/opensslv.h" ; then + cf_openssl_basedir="${dirs}" + break + fi + done + unset dirs + fi + dnl Now check cf_openssl_found to see if we found anything. + if test ! -z "$cf_openssl_basedir"; then + if test -f "${cf_openssl_basedir}/include/openssl/opensslv.h" ; then + SSL_CFLAGS="-I${cf_openssl_basedir}/include" + SSL_LIBS="-L${cf_openssl_basedir}/lib" + else + dnl OpenSSL wasn't found in the directory specified. Naughty + dnl administrator... + cf_openssl_basedir="" + fi + else + dnl Check for stock FreeBSD 4.x and 5.x systems, since their files + dnl are in /usr/include and /usr/lib. In this case, we don't want to + dnl change INCLUDES or LIBS, but still want to enable OpenSSL. + dnl We can't do this check above, because some people want two versions + dnl of OpenSSL installed (stock FreeBSD 4.x/5.x and /usr/local/ssl) + dnl and they want /usr/local/ssl to have preference. + if test -f "/usr/include/openssl/opensslv.h" ; then + cf_openssl_basedir="/usr" + fi + fi + + dnl If we have a basedir defined, then everything is okay. Otherwise, + dnl we have a problem. + if test ! -z "$cf_openssl_basedir"; then + AC_MSG_RESULT($cf_openssl_basedir) + cf_enable_openssl="yes" + else + AC_MSG_RESULT([not found. Specify a correct path?]) + cf_enable_openssl="no" + fi + unset cf_openssl_basedir +else + dnl If --disable-openssl was specified + AC_MSG_RESULT(disabled) +fi + +save_CPPFLAGS="$CPPFLAGS" +CPPFLAGS="$CPPFLAGS $SSL_CFLAGS" +save_LIBS="$LIBS" +LIBS="$LIBS $SSL_LIBS" +if test "$cf_enable_openssl" != no; then + dnl Check OpenSSL version (must be 0.9.7 or above!) + AC_MSG_CHECKING(for OpenSSL 0.9.7 or above) + AC_RUN_IFELSE( + [AC_LANG_PROGRAM( + [#include + #include ], + [[if (OPENSSL_VERSION_NUMBER >= 0x00907000) + exit(0); else exit(1);]])], + cf_enable_openssl=yes, + cf_enable_openssl=no, + cf_enable_openssl=no) + + if test "$cf_enable_openssl" != no; then + AC_MSG_RESULT(found) + else + AC_MSG_RESULT(no - OpenSSL support disabled) + fi + +fi + + +if test "$cf_enable_openssl" != no; then + CPPFLAGS="$CPPFLAGS $SSL_LIBS" + AC_CHECK_LIB(crypto, RAND_status, + [cf_enable_openssl=yes], + [cf_enable_openssl=no]) +fi + +if test "$cf_enable_openssl" != no; then + CPPFLAGS="$CPPFLAGS $SSL_LIBS" + AC_CHECK_LIB(ssl, SSL_read, + [SSL_LIBS="$SSL_LIBS -lssl -lcrypto"], + [cf_enable_openssl=no], [-lcrypto]) +fi + + +dnl mbedTLS support +AC_ARG_ENABLE(mbedtls, +[AC_HELP_STRING([--enable-mbedtls], [Enable mbedTLS support.]) +AC_HELP_STRING([--disable-mbedtls], [Disable mbedTLS support.])], +[cf_enable_mbedtls=$enableval], +[cf_enable_mbedtls="auto"]) + +if test "$cf_enable_mbedtls" != no; then + save_CPPFLAGS="$CPPFLAGS" + save_LIBS="$LIBS" + LIBS="$LIBS $MBEDTLS_LIBS" + AC_CHECK_LIB(mbedtls, mbedtls_ssl_init, [ + MBEDTLS_LIBS="$MBEDTLS_LIBS -lmbedtls -lmbedx509 -lmbedcrypto" + cf_enable_mbedtls=yes + ], [cf_enable_mbedtls=no], [-lmbedx509 -lmbedcrypto]) +fi + +dnl GnuTLS support +AC_MSG_CHECKING(for GnuTLS) +AC_ARG_ENABLE(gnutls, +[AC_HELP_STRING([--enable-gnutls],[Enable GnuTLS support.]) +AC_HELP_STRING([--disable-gnutls],[Disable GnuTLS support.])], +[cf_enable_gnutls=$enableval], +[cf_enable_gnutls="auto"]) + +if test "$cf_enable_gnutls" != no; then + PKG_CHECK_MODULES(GNUTLS, [gnutls], [ + cf_enable_gnutls="yes" + ], [cf_enable_gnutls="no"]) +fi + +dnl mbed TLS is given highest preference when no specified TLS library is provided +if test "$cf_enable_openssl" = "auto" -a "$cf_enable_mbedtls" = "yes"; then + cf_enable_openssl="no" +fi + +if test "$cf_enable_gnutls" = "auto" -a "$cf_enable_openssl" = "yes" -a "$cf_enable_mbedtls" = "yes"; then + cf_enable_gnutls="no" +fi + +if test x"$cf_enable_openssl" != xno; then + AC_DEFINE(HAVE_OPENSSL,1,[Has OpenSSL]) + GNUTLS_CFLAGS="" + GNUTLS_LIBS="" + MBEDTLS_LIBS="" + MBEDTLS_CFLAGS="" + SSL_TYPE="openssl" +elif test x"$cf_enable_mbedtls" != xno; then + AC_DEFINE(HAVE_MBEDTLS, 1, [Has mbedTLS]) + SSL_LIBS="" + SSL_CFLAGS="" + GNUTLS_CFLAGS="" + GNUTLS_LIBS="" + SSL_TYPE="mbedtls" +elif test x"$cf_enable_gnutls" != xno; then + AC_DEFINE(HAVE_GNUTLS, 1, [Has GnuTLS]) + SSL_LIBS="" + SSL_CFLAGS="" + MBEDTLS_LIBS="" + MBEDTLS_CFLAGS="" + SSL_TYPE="gnutls" +fi + + + + +CPPFLAGS="$save_CPPFLAGS" +LIBS="$save_LIBS" + +dnl End OpenSSL detection + + + + +dnl Debug-related options +dnl ===================== + +AC_ARG_ENABLE(assert, +AC_HELP_STRING([--enable-assert],[Enable assert(). Choose between soft(warnings) and hard(aborts the daemon)]), +[assert=$enableval], [assert=no]) + +if test "$assert" = no; then + AC_DEFINE(NDEBUG, 1, [Define this to disable debugging support.]) +elif test "$assert" = soft; then + AC_DEFINE(SOFT_ASSERT, 1, [Define this to enable soft asserts.]) + AC_DEFINE(NDEBUG, 1, [Define this to disable debugging support.]) +elif test "$assert" = yes; then + assert = "hard"; +fi + +AC_MSG_CHECKING(if you want to do a profile build) +AC_ARG_ENABLE(profile, +AC_HELP_STRING([--enable-profile],[Enable profiling]), +[profile=$enableval], [profile=no]) + +if test "$profile" = yes; then + if test "$ac_cv_c_compiler_gnu" = yes; then + CFLAGS="$CFLAGS -pg -static" + AC_MSG_RESULT([yes, adding -pg -static]) + AC_DEFINE(RB_PROFILE, 1, [Defined to mark profiling is enabled]) + else + AC_MSG_RESULT([no, profile builds only work with gcc]) + fi +else + AC_MSG_RESULT(no) +fi + +AC_ARG_ENABLE(warnings, +AC_HELP_STRING([--enable-warnings],[Enable all sorts of warnings for debugging.]), +[CFLAGS="$CFLAGS -Wall -Wcast-qual -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wshadow -Wwrite-strings -W -Wno-unused -Wunused-function -Wunused-variable"],[]) + +AC_SUBST(LDFLAGS) +AC_SUBST(PICFLAGS) +AC_SUBST(CFLAGS) +AC_SUBST(SEDOBJ) +AC_SUBST(SSL_CFLAGS) +AC_SUBST(SSL_LIBS) +AC_SUBST(GNUTLS_CFLAGS) +AC_SUBST(GNUTLS_LIBS) +AC_SUBST(MBEDTLS_CFLAGS) +AC_SUBST(MBEDTLS_LIBS) + +if test "$prefix" = "NONE"; then + AC_DEFINE_UNQUOTED(RB_PREFIX, "$ac_default_prefix", [Prefix where librb is installed.]) + +else + +dnl Don't get bitten by Cygwin's stupidity if the user specified +dnl a custom prefix with a trailing slash + + prefix=`echo $prefix | sed 's/\/$//'` + AC_DEFINE_UNQUOTED(RB_PREFIX, "$prefix", [Prefix where librb is installed.]) + +fi + +AC_SUBST(RB_PREFIX) + -LT_INIT([dlopen disable-static]) -LT_CONFIG_LTDL_DIR([libltdl]) -LTDL_INIT PKG_PROG_PKG_CONFIG - build_ltdl=$with_included_ltdl AM_CONDITIONAL([BUILD_LTDL], [test x"$build_ltdl" = x"yes"]) @@ -81,20 +666,6 @@ if test ! -z "$CFLAGS"; then IRC_CFLAGS="$IRC_CFLAGS $CFLAGS" fi -AC_ISC_POSIX -AC_C_INLINE -AC_PROG_MAKE_SET -AC_PROG_INSTALL -AC_PATH_PROG(RM, rm) -AC_PATH_PROG(CP, cp) -AC_PATH_PROG(MV, mv) -AC_PATH_PROG(LN, ln) -AC_PATH_PROG(SED, sed) -AC_PATH_PROG(AR, ar) -AC_PATH_PROG(LD, ld) -AC_PATH_PROG(RANLIB, ranlib) -AC_PATH_PROG(TOUCH, touch) - AC_PROG_YACC dnl AC_PROG_YACC defaults to yacc unconditionally if nothing can be found @@ -171,9 +742,6 @@ if test x"$SUN" = xyes; then AC_SEARCH_LIBS(inet_ntoa, nsl,, [AC_MSG_ERROR([libnsl not found! Aborting.])]) fi -AC_ARG_ENABLE(ipv6, -AC_HELP_STRING([--enable-ipv6],[Enable IPv6 support]),[ipv6=$enableval],[ipv6=no]) - AC_SEARCH_LIBS(crypt, [crypt descrypt],,) CRYPT_LIB=$ac_cv_search_crypt @@ -539,23 +1107,6 @@ else AC_MSG_RESULT(no) fi -AC_DEFINE([NICKNAMEHISTORYLENGTH], 15000, [Size of the WHOWAS array.]) -AC_DEFINE([CHANNEL_HEAP_SIZE], 8192, [Size of the channel heap.]) -AC_DEFINE([BAN_HEAP_SIZE], 4096, [Size of the ban heap.]) -AC_DEFINE([CLIENT_HEAP_SIZE], 8192, [Size of the client heap.]) -AC_DEFINE([LCLIENT_HEAP_SIZE], 1024, [Size of the local client heap.]) -AC_DEFINE([PCLIENT_HEAP_SIZE], 256, [Size of the pre-client heap.]) -AC_DEFINE([USER_HEAP_SIZE], 8192, [Size of the user heap.]) -AC_DEFINE([DNODE_HEAP_SIZE], 8192, [Size of the dlink_node heap.]) -AC_DEFINE([TOPIC_HEAP_SIZE], 4096, [Size of the topic heap.]) -AC_DEFINE([LINEBUF_HEAP_SIZE], 2048, [Size of the linebuf heap.]) -AC_DEFINE([MEMBER_HEAP_SIZE], 32768, [Sizeof member heap.]) -AC_DEFINE([ND_HEAP_SIZE], 512, [Size of the nick delay heap.]) -AC_DEFINE([CONFITEM_HEAP_SIZE], 256, [Size of the confitem heap.]) -AC_DEFINE([MONITOR_HEAP_SIZE], 1024, [Size of the monitor heap.]) -AC_DEFINE([FD_HEAP_SIZE], 1024, [Size of fd heap.]) -AC_DEFINE([AWAY_HEAP_SIZE], 512, [Size of away heap.]) - AC_ARG_WITH(nicklen, AC_HELP_STRING([--with-nicklen=LENGTH],[Set the upper-bound nick length to LENGTH (default 31, max 50)]), [ @@ -660,40 +1211,20 @@ dnl a custom prefix with a trailing slash fi -AC_CONFIG_FILES( \ - Makefile \ - authd/Makefile \ - bandb/Makefile \ - ssld/Makefile \ - wsockd/Makefile \ - extensions/Makefile \ - ircd/Makefile \ - modules/Makefile \ - tools/Makefile \ - tools/genssl \ - doc/Makefile \ - help/Makefile \ -) AC_CONFIG_COMMANDS([tools/genssl_chmod], [chmod 755 tools/genssl]) AC_OUTPUT +dnl Make it look sexay! -if test "$cf_openssl_version_ok" = yes; then - openssl="yes" -else - openssl="no" -fi +echo +echo "Compiling $PACKAGE_NAME $PACKAGE_VERSION" +echo $RB_VERSION +echo $RB_DATESTR +echo -echo " -Configuration of ${BRANDING_NAME}-${BRANDING_VERSION}: - Install directory : $prefix +echo "Installing into: $prefix" - Ziplinks : $zlib - OpenSSL : $openssl - PCRE : $have_pcre - - Nickname length : $NICKLEN - Topic length : $TOPICLEN - -Use (g)make to compile $BRANDING_NAME, then (g)make install to install it. -" +echo "IPv6 support ................... $ipv6" +echo "Assert debugging ............... $assert" +echo "SSL Type........................ $SSL_TYPE" +echo diff --git a/extensions/Makefile.am b/extensions/Makefile.am index 50e03e94f..087cd91e7 100644 --- a/extensions/Makefile.am +++ b/extensions/Makefile.am @@ -1,7 +1,7 @@ -AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/librb/include $(LTDLINCL) +AM_CPPFLAGS = -I$(top_srcdir)/include $(LTDLINCL) AM_LDFLAGS = -module -export-dynamic -avoid-version -no-undefined -shared AM_LDFLAGS += -export-symbols-regex _mheader -LIBS += $(top_srcdir)/librb/src/librb.la $(top_srcdir)/ircd/libircd.la +LIBS += $(top_srcdir)/rb/librb.la $(top_srcdir)/ircd/libircd.la extensiondir=@moduledir@/extensions diff --git a/extensions/chm_adminonly.c b/extensions/chm_adminonly.c index 5bacf85e0..66bd8548a 100644 --- a/extensions/chm_adminonly.c +++ b/extensions/chm_adminonly.c @@ -1,14 +1,14 @@ -#include "stdinc.h" -#include "modules.h" -#include "hook.h" -#include "client.h" -#include "ircd.h" -#include "send.h" -#include "s_conf.h" -#include "s_user.h" -#include "s_serv.h" -#include "numeric.h" -#include "chmode.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include static const char chm_adminonly_desc[] = "Enables channel mode +A that blocks non-admins from joining a channel"; diff --git a/extensions/chm_insecure.c b/extensions/chm_insecure.c index fd6e36583..4077cf668 100644 --- a/extensions/chm_insecure.c +++ b/extensions/chm_insecure.c @@ -1,14 +1,14 @@ -#include "stdinc.h" -#include "modules.h" -#include "hook.h" -#include "client.h" -#include "ircd.h" -#include "send.h" -#include "s_conf.h" -#include "s_user.h" -#include "s_serv.h" -#include "numeric.h" -#include "chmode.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include static const char chm_insecure_desc[] = "Adds channel mode +U that allows non-SSL users to join a channel, " diff --git a/extensions/chm_nonotice.c b/extensions/chm_nonotice.c index 4241b319a..cc8ca0456 100644 --- a/extensions/chm_nonotice.c +++ b/extensions/chm_nonotice.c @@ -21,19 +21,19 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include "stdinc.h" -#include "modules.h" -#include "hook.h" -#include "client.h" -#include "ircd.h" -#include "send.h" -#include "s_conf.h" -#include "s_user.h" -#include "s_serv.h" -#include "numeric.h" -#include "chmode.h" -#include "messages.h" -#include "inline/stringops.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include static const char chm_nonotice_desc[] = "Adds channel mode +T which blocks notices to the channel."; diff --git a/extensions/chm_operonly.c b/extensions/chm_operonly.c index e61e4e5b8..d9ca658ac 100644 --- a/extensions/chm_operonly.c +++ b/extensions/chm_operonly.c @@ -1,14 +1,14 @@ -#include "stdinc.h" -#include "modules.h" -#include "hook.h" -#include "client.h" -#include "ircd.h" -#include "send.h" -#include "s_conf.h" -#include "s_user.h" -#include "s_serv.h" -#include "numeric.h" -#include "chmode.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include static const char chm_operonly_desc[] = "Adds channel mode +O which makes a channel operator-only"; diff --git a/extensions/chm_operonly_compat.c b/extensions/chm_operonly_compat.c index ab627822a..51c5d8adf 100644 --- a/extensions/chm_operonly_compat.c +++ b/extensions/chm_operonly_compat.c @@ -2,12 +2,12 @@ * Treat cmode +-O as +-iI $o. */ -#include "stdinc.h" -#include "modules.h" -#include "client.h" -#include "hook.h" -#include "ircd.h" -#include "chmode.h" +#include +#include +#include +#include +#include +#include static const char chm_operonly_compat[] = "Adds an emulated channel mode +O which is converted into mode +i and +I $o"; diff --git a/extensions/chm_operpeace.c b/extensions/chm_operpeace.c index 83f64e6c1..1abfb5602 100644 --- a/extensions/chm_operpeace.c +++ b/extensions/chm_operpeace.c @@ -3,20 +3,20 @@ * -- kaniini */ -#include "stdinc.h" -#include "modules.h" -#include "hook.h" -#include "client.h" -#include "ircd.h" -#include "send.h" -#include "hash.h" -#include "s_conf.h" -#include "s_user.h" -#include "s_serv.h" -#include "numeric.h" -#include "privilege.h" -#include "s_newconf.h" -#include "chmode.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include static const char chm_operpeace_desc[] = "Adds channel mode +M which prohibits operators from being kicked"; diff --git a/extensions/chm_quietunreg_compat.c b/extensions/chm_quietunreg_compat.c index c2a2ca5b6..906322d4d 100644 --- a/extensions/chm_quietunreg_compat.c +++ b/extensions/chm_quietunreg_compat.c @@ -3,12 +3,12 @@ * -- jilles */ -#include "stdinc.h" -#include "modules.h" -#include "client.h" -#include "hook.h" -#include "ircd.h" -#include "chmode.h" +#include +#include +#include +#include +#include +#include static const char chm_quietunreg_compat_desc[] = "Adds an emulated channel mode +R which is converted into mode +q $~a"; diff --git a/extensions/chm_spamfilter.c b/extensions/chm_spamfilter.c index fd0eaa2ad..a6162ccc2 100644 --- a/extensions/chm_spamfilter.c +++ b/extensions/chm_spamfilter.c @@ -29,14 +29,14 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include "stdinc.h" -#include "s_conf.h" -#include "modules.h" -#include "hook.h" -#include "send.h" -#include "chmode.h" -#include "newconf.h" -#include "substitution.h" +#include +#include +#include +#include +#include +#include +#include +#include #include "spamfilter.h" diff --git a/extensions/chm_sslonly.c b/extensions/chm_sslonly.c index 5bbc2cbf8..96488235a 100644 --- a/extensions/chm_sslonly.c +++ b/extensions/chm_sslonly.c @@ -1,14 +1,14 @@ -#include "stdinc.h" -#include "modules.h" -#include "hook.h" -#include "client.h" -#include "ircd.h" -#include "send.h" -#include "s_conf.h" -#include "s_user.h" -#include "s_serv.h" -#include "numeric.h" -#include "chmode.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include static const char chm_sslonly_desc[] = "Adds channel mode +S that bans non-SSL users from joing a channel"; diff --git a/extensions/chm_sslonly_compat.c b/extensions/chm_sslonly_compat.c index e961f2a6d..1b059d5b6 100644 --- a/extensions/chm_sslonly_compat.c +++ b/extensions/chm_sslonly_compat.c @@ -2,12 +2,12 @@ * Treat cmode +-S as +-b $~z. */ -#include "stdinc.h" -#include "modules.h" -#include "client.h" -#include "hook.h" -#include "ircd.h" -#include "chmode.h" +#include +#include +#include +#include +#include +#include static const char chm_sslonly_compat_desc[] = "Adds an emulated channel mode +S which is converted into mode +b $~z"; diff --git a/extensions/createauthonly.c b/extensions/createauthonly.c index dea11a0cc..5776d75e5 100644 --- a/extensions/createauthonly.c +++ b/extensions/createauthonly.c @@ -6,15 +6,15 @@ * -- nenolod */ -#include "stdinc.h" -#include "modules.h" -#include "client.h" -#include "hook.h" -#include "ircd.h" -#include "send.h" -#include "s_conf.h" -#include "snomask.h" -#include "numeric.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include static const char restrict_desc[] = "Restricts channel creation to authenticated users and IRC operators only"; diff --git a/extensions/createoperonly.c b/extensions/createoperonly.c index f763d676c..3926fc9a5 100644 --- a/extensions/createoperonly.c +++ b/extensions/createoperonly.c @@ -6,15 +6,15 @@ * -- nenolod */ -#include "stdinc.h" -#include "modules.h" -#include "client.h" -#include "hook.h" -#include "ircd.h" -#include "send.h" -#include "s_conf.h" -#include "snomask.h" -#include "numeric.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include static const char restrict_desc[] = "Restricts channel creation to IRC operators"; diff --git a/extensions/example_module.c b/extensions/example_module.c index a0b501f53..4dac1aa2e 100644 --- a/extensions/example_module.c +++ b/extensions/example_module.c @@ -18,12 +18,12 @@ */ /* List of ircd includes from ../include/ */ -#include "stdinc.h" -#include "modules.h" -#include "hook.h" -#include "client.h" -#include "ircd.h" -#include "send.h" +#include +#include +#include +#include +#include +#include /* This string describes the module. Always declare it a static const char[]. * It is preferred for stylistic reasons to put it first. diff --git a/extensions/extb_account.c b/extensions/extb_account.c index 82af58899..4b532c1c9 100644 --- a/extensions/extb_account.c +++ b/extensions/extb_account.c @@ -3,10 +3,10 @@ * -- jilles */ -#include "stdinc.h" -#include "modules.h" -#include "client.h" -#include "ircd.h" +#include +#include +#include +#include static const char extb_desc[] = "Account ($a) extban type"; diff --git a/extensions/extb_canjoin.c b/extensions/extb_canjoin.c index ab4378967..035b21e26 100644 --- a/extensions/extb_canjoin.c +++ b/extensions/extb_canjoin.c @@ -4,12 +4,12 @@ * -- nenolod/jilles */ -#include "stdinc.h" -#include "modules.h" -#include "client.h" -#include "channel.h" -#include "hash.h" -#include "ircd.h" +#include +#include +#include +#include +#include +#include static const char extb_desc[] = "Can join ($j) extban type - matches users who are or are not banned from a specified channel"; diff --git a/extensions/extb_channel.c b/extensions/extb_channel.c index 3225d0760..048c1e534 100644 --- a/extensions/extb_channel.c +++ b/extensions/extb_channel.c @@ -3,12 +3,12 @@ * -- jilles */ -#include "stdinc.h" -#include "modules.h" -#include "client.h" -#include "channel.h" -#include "hash.h" -#include "ircd.h" +#include +#include +#include +#include +#include +#include static const char extb_desc[] = "Channel ($c) extban type"; diff --git a/extensions/extb_combi.c b/extensions/extb_combi.c index c9f356428..38ab4b091 100644 --- a/extensions/extb_combi.c +++ b/extensions/extb_combi.c @@ -37,10 +37,10 @@ * I suspect it is, but have done no load testing. */ -#include "stdinc.h" -#include "modules.h" -#include "client.h" -#include "ircd.h" +#include +#include +#include +#include static const char extb_desc[] = "Combination ($&, $|) extban types"; diff --git a/extensions/extb_extgecos.c b/extensions/extb_extgecos.c index 7dbf73f17..8f1b16b28 100644 --- a/extensions/extb_extgecos.c +++ b/extensions/extb_extgecos.c @@ -4,10 +4,10 @@ * - nenolod */ -#include "stdinc.h" -#include "modules.h" -#include "client.h" -#include "ircd.h" +#include +#include +#include +#include static const char extb_desc[] = "Extended mask ($x) extban type"; diff --git a/extensions/extb_hostmask.c b/extensions/extb_hostmask.c index 9aa964de4..60fbc21dd 100644 --- a/extensions/extb_hostmask.c +++ b/extensions/extb_hostmask.c @@ -3,10 +3,10 @@ * -- kaniini */ -#include "stdinc.h" -#include "modules.h" -#include "client.h" -#include "ircd.h" +#include +#include +#include +#include static const char extb_desc[] = "Hostmask ($m) extban type"; diff --git a/extensions/extb_oper.c b/extensions/extb_oper.c index 72908b294..dbf5c1d91 100644 --- a/extensions/extb_oper.c +++ b/extensions/extb_oper.c @@ -3,12 +3,12 @@ * -- jilles */ -#include "stdinc.h" -#include "modules.h" -#include "client.h" -#include "privilege.h" -#include "s_newconf.h" -#include "ircd.h" +#include +#include +#include +#include +#include +#include static const char extb_desc[] = "Oper ($o) extban type"; diff --git a/extensions/extb_realname.c b/extensions/extb_realname.c index eed8a8078..816f6e8fa 100644 --- a/extensions/extb_realname.c +++ b/extensions/extb_realname.c @@ -3,10 +3,10 @@ * -- jilles */ -#include "stdinc.h" -#include "modules.h" -#include "client.h" -#include "ircd.h" +#include +#include +#include +#include static const char extb_desc[] = "Realname/GECOS ($r) extban type"; diff --git a/extensions/extb_server.c b/extensions/extb_server.c index b3e4e037f..4b4cd704c 100644 --- a/extensions/extb_server.c +++ b/extensions/extb_server.c @@ -3,10 +3,10 @@ * -- jilles */ -#include "stdinc.h" -#include "modules.h" -#include "client.h" -#include "ircd.h" +#include +#include +#include +#include static const char extb_desc[] = "Server ($s) extban type"; diff --git a/extensions/extb_ssl.c b/extensions/extb_ssl.c index 801d4e9be..c098f39c6 100644 --- a/extensions/extb_ssl.c +++ b/extensions/extb_ssl.c @@ -1,9 +1,9 @@ /* SSL extban type: matches ssl users */ -#include "stdinc.h" -#include "modules.h" -#include "client.h" -#include "ircd.h" +#include +#include +#include +#include static const char extb_desc[] = "SSL/TLS ($z) extban type"; diff --git a/extensions/extb_usermode.c b/extensions/extb_usermode.c index 87cba51ea..b56b7dc38 100644 --- a/extensions/extb_usermode.c +++ b/extensions/extb_usermode.c @@ -3,17 +3,17 @@ * -- nenolod */ -#include "stdinc.h" -#include "modules.h" -#include "hook.h" -#include "client.h" -#include "ircd.h" -#include "send.h" -#include "hash.h" -#include "s_conf.h" -#include "s_user.h" -#include "s_serv.h" -#include "numeric.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include static const char extb_desc[] = "Usermode ($m) extban type"; diff --git a/extensions/force_user_invis.c b/extensions/force_user_invis.c index 6a53ee5e8..ce222e71d 100644 --- a/extensions/force_user_invis.c +++ b/extensions/force_user_invis.c @@ -6,14 +6,14 @@ * Note that +i must be included in default_umodes */ -#include "stdinc.h" -#include "modules.h" -#include "client.h" -#include "hook.h" -#include "ircd.h" -#include "send.h" -#include "s_conf.h" -#include "s_newconf.h" +#include +#include +#include +#include +#include +#include +#include +#include static const char noi_desc[] = "Do not allow users to remove user mode +i unless they are operators"; diff --git a/extensions/helpops.c b/extensions/helpops.c index c2a7e00cf..9d49579b8 100644 --- a/extensions/helpops.c +++ b/extensions/helpops.c @@ -3,16 +3,16 @@ * -- kaniini */ -#include "stdinc.h" -#include "modules.h" -#include "client.h" -#include "hook.h" -#include "ircd.h" -#include "send.h" -#include "s_conf.h" -#include "s_user.h" -#include "s_newconf.h" -#include "numeric.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include static const char helpops_desc[] = "The helpops system as used by freenode"; diff --git a/extensions/hide_uncommon_channels.c b/extensions/hide_uncommon_channels.c index ff1d0cb6b..ac019b1b7 100644 --- a/extensions/hide_uncommon_channels.c +++ b/extensions/hide_uncommon_channels.c @@ -3,14 +3,14 @@ * -- kaniini */ -#include "stdinc.h" -#include "modules.h" -#include "client.h" -#include "hook.h" -#include "ircd.h" -#include "send.h" -#include "s_conf.h" -#include "s_newconf.h" +#include +#include +#include +#include +#include +#include +#include +#include static const char hide_desc[] = "Hides channel memberships not shared"; diff --git a/extensions/hurt.c b/extensions/hurt.c index 9f6ee7adc..30d4c8708 100644 --- a/extensions/hurt.c +++ b/extensions/hurt.c @@ -4,19 +4,19 @@ * Copyright (C) 2006 charybdis development team * All rights reserved */ -#include "stdinc.h" -#include "modules.h" -#include "hook.h" -#include "client.h" -#include "ircd.h" -#include "send.h" -#include "numeric.h" -#include "hostmask.h" -#include "s_conf.h" -#include "s_newconf.h" -#include "hash.h" -#include "messages.h" -#include "s_assert.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include /* {{{ Structures */ #define HURT_CUTOFF (10) /* protocol messages. */ diff --git a/extensions/ip_cloaking.c b/extensions/ip_cloaking.c index a650c8abd..f4ce078e0 100644 --- a/extensions/ip_cloaking.c +++ b/extensions/ip_cloaking.c @@ -5,17 +5,17 @@ * Written originally by nenolod, altered to use FNV by Elizabeth in 2008 */ -#include "stdinc.h" -#include "modules.h" -#include "hook.h" -#include "client.h" -#include "ircd.h" -#include "send.h" -#include "hash.h" -#include "s_conf.h" -#include "s_user.h" -#include "s_serv.h" -#include "numeric.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include static const char ip_cloaking_desc[] = "IP cloaking module that uses user mode +h"; diff --git a/extensions/ip_cloaking_3.0.c b/extensions/ip_cloaking_3.0.c index a1d16ca51..80a339002 100644 --- a/extensions/ip_cloaking_3.0.c +++ b/extensions/ip_cloaking_3.0.c @@ -1,14 +1,14 @@ -#include "stdinc.h" -#include "modules.h" -#include "hook.h" -#include "client.h" -#include "ircd.h" -#include "send.h" -#include "s_conf.h" -#include "s_user.h" -#include "s_serv.h" -#include "numeric.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include static const char ip_cloaking_desc[] = "The old IP cloaking mechanism version 3.0"; diff --git a/extensions/ip_cloaking_4.0.c b/extensions/ip_cloaking_4.0.c index 011fcc699..cd9abac4d 100644 --- a/extensions/ip_cloaking_4.0.c +++ b/extensions/ip_cloaking_4.0.c @@ -5,17 +5,17 @@ * Written originally by nenolod, altered to use FNV by Elizabeth in 2008 */ -#include "stdinc.h" -#include "modules.h" -#include "hook.h" -#include "client.h" -#include "ircd.h" -#include "send.h" -#include "hash.h" -#include "s_conf.h" -#include "s_user.h" -#include "s_serv.h" -#include "numeric.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include static const char ip_cloaking_desc[] = "New IP cloaking module that uses user mode +x instead of +h"; diff --git a/extensions/ip_cloaking_old.c b/extensions/ip_cloaking_old.c index ca4f91114..38d45b6b4 100644 --- a/extensions/ip_cloaking_old.c +++ b/extensions/ip_cloaking_old.c @@ -1,14 +1,14 @@ -#include "stdinc.h" -#include "modules.h" -#include "hook.h" -#include "client.h" -#include "ircd.h" -#include "send.h" -#include "s_conf.h" -#include "s_user.h" -#include "s_serv.h" -#include "numeric.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include static const char ip_cloaking_desc[] = "Very old IP cloaking mechanism"; diff --git a/extensions/m_adminwall.c b/extensions/m_adminwall.c index d5dbcb7c1..ff27d18d5 100644 --- a/extensions/m_adminwall.c +++ b/extensions/m_adminwall.c @@ -22,20 +22,20 @@ * USA */ -#include "stdinc.h" -#include "client.h" -#include "ircd.h" -#include "match.h" -#include "numeric.h" -#include "send.h" -#include "s_user.h" -#include "s_conf.h" -#include "s_newconf.h" -#include "msg.h" -#include "parse.h" -#include "modules.h" -#include "s_serv.h" -#include "messages.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include static const char adminwall_desc[] = "Provides the ADMINWALL command to send a message to all administrators"; diff --git a/extensions/m_echotags.c b/extensions/m_echotags.c index bbf78aed1..9a42361f1 100644 --- a/extensions/m_echotags.c +++ b/extensions/m_echotags.c @@ -1,8 +1,8 @@ -#include "stdinc.h" -#include "modules.h" -#include "client.h" -#include "ircd.h" -#include "send.h" +#include +#include +#include +#include +#include static void m_echotags(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[]); diff --git a/extensions/m_extendchans.c b/extensions/m_extendchans.c index d9e887ee6..d6aa676f9 100644 --- a/extensions/m_extendchans.c +++ b/extensions/m_extendchans.c @@ -24,12 +24,12 @@ * USA */ -#include "stdinc.h" -#include "client.h" -#include "modules.h" -#include "s_newconf.h" -#include "send.h" -#include "numeric.h" +#include +#include +#include +#include +#include +#include static const char extendchans_desc[] = "Allow an oper or service to let a given user join more channels"; diff --git a/extensions/m_findforwards.c b/extensions/m_findforwards.c index 422197bfe..a30ea7598 100644 --- a/extensions/m_findforwards.c +++ b/extensions/m_findforwards.c @@ -17,22 +17,22 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include "stdinc.h" -#include "channel.h" -#include "client.h" -#include "hash.h" -#include "match.h" -#include "ircd.h" -#include "numeric.h" -#include "s_user.h" -#include "s_conf.h" -#include "s_newconf.h" -#include "send.h" -#include "msg.h" -#include "parse.h" -#include "modules.h" -#include "packet.h" -#include "messages.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include static const char findfowards_desc[] = "Allows operators to find forwards to a given channel"; diff --git a/extensions/m_identify.c b/extensions/m_identify.c index aebcd3616..91d4f8f79 100644 --- a/extensions/m_identify.c +++ b/extensions/m_identify.c @@ -29,19 +29,19 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include "stdinc.h" -#include "client.h" -#include "ircd.h" -#include "match.h" -#include "numeric.h" -#include "s_conf.h" -#include "logger.h" -#include "s_serv.h" -#include "send.h" -#include "msg.h" -#include "parse.h" -#include "modules.h" -#include "messages.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #define SVS_chanserv_NICK "ChanServ" #define SVS_nickserv_NICK "NickServ" diff --git a/extensions/m_locops.c b/extensions/m_locops.c index a63df47b0..33bbc132e 100644 --- a/extensions/m_locops.c +++ b/extensions/m_locops.c @@ -22,20 +22,20 @@ * USA */ -#include "stdinc.h" -#include "client.h" -#include "ircd.h" -#include "match.h" -#include "numeric.h" -#include "send.h" -#include "s_user.h" -#include "s_conf.h" -#include "s_newconf.h" -#include "hash.h" -#include "msg.h" -#include "parse.h" -#include "modules.h" -#include "s_serv.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include static const char locops_desc[] = "Provides the LOCOPS command to send a message to all local operators"; diff --git a/extensions/m_mkpasswd.c b/extensions/m_mkpasswd.c index 66d06413d..41140558e 100644 --- a/extensions/m_mkpasswd.c +++ b/extensions/m_mkpasswd.c @@ -5,13 +5,13 @@ * You can use this code in any way as long as these names remain. */ -#include "stdinc.h" -#include "client.h" -#include "numeric.h" -#include "s_conf.h" -#include "modules.h" -#include "messages.h" -#include "send.h" +#include +#include +#include +#include +#include +#include +#include #include diff --git a/extensions/m_ojoin.c b/extensions/m_ojoin.c index d49c6ee97..c8da7a715 100644 --- a/extensions/m_ojoin.c +++ b/extensions/m_ojoin.c @@ -17,23 +17,23 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include "stdinc.h" -#include "channel.h" -#include "client.h" -#include "ircd.h" -#include "numeric.h" -#include "logger.h" -#include "s_serv.h" -#include "s_conf.h" -#include "s_newconf.h" -#include "send.h" -#include "whowas.h" -#include "match.h" -#include "hash.h" -#include "msg.h" -#include "parse.h" -#include "modules.h" -#include "messages.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include static const char ojoin_desc[] = "Allow admins to forcibly join channels with the OJOIN command"; diff --git a/extensions/m_okick.c b/extensions/m_okick.c index f4a25a701..c00c423ee 100644 --- a/extensions/m_okick.c +++ b/extensions/m_okick.c @@ -21,22 +21,22 @@ * USA */ -#include "stdinc.h" -#include "channel.h" -#include "client.h" -#include "match.h" -#include "ircd.h" -#include "numeric.h" -#include "send.h" -#include "msg.h" -#include "modules.h" -#include "parse.h" -#include "hash.h" -#include "packet.h" -#include "s_conf.h" -#include "s_serv.h" -#include "messages.h" -#include "logger.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include static const char okick_desc[] = "Allow admins to forcibly kick users from channels with the OKICK command"; diff --git a/extensions/m_omode.c b/extensions/m_omode.c index 87194e41c..0d6cd3097 100644 --- a/extensions/m_omode.c +++ b/extensions/m_omode.c @@ -23,24 +23,24 @@ * USA */ -#include "stdinc.h" -#include "channel.h" -#include "client.h" -#include "hash.h" -#include "match.h" -#include "ircd.h" -#include "numeric.h" -#include "s_user.h" -#include "s_conf.h" -#include "s_newconf.h" -#include "s_serv.h" -#include "send.h" -#include "msg.h" -#include "parse.h" -#include "modules.h" -#include "packet.h" -#include "messages.h" -#include "logger.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include static const char omode_desc[] = "Allow admins to forcibly change modes on channels with the OMODE command"; diff --git a/extensions/m_opme.c b/extensions/m_opme.c index 4cb8baa1e..10f440e71 100644 --- a/extensions/m_opme.c +++ b/extensions/m_opme.c @@ -16,23 +16,23 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include "stdinc.h" -#include "channel.h" -#include "client.h" -#include "ircd.h" -#include "numeric.h" -#include "logger.h" -#include "s_serv.h" -#include "send.h" -#include "whowas.h" -#include "match.h" -#include "hash.h" -#include "msg.h" -#include "parse.h" -#include "modules.h" -#include "s_conf.h" -#include "s_newconf.h" -#include "messages.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include static const char opme_desc[] = "Allow admins to op themselves on opless channels"; diff --git a/extensions/m_remove.c b/extensions/m_remove.c index 169273a71..a0e68aaae 100644 --- a/extensions/m_remove.c +++ b/extensions/m_remove.c @@ -22,22 +22,22 @@ * USA */ -#include "stdinc.h" -#include "channel.h" -#include "client.h" -#include "match.h" -#include "ircd.h" -#include "numeric.h" -#include "send.h" -#include "msg.h" -#include "modules.h" -#include "parse.h" -#include "hash.h" -#include "packet.h" -#include "s_serv.h" -#include "s_conf.h" -#include "hook.h" -#include "messages.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include static const char description[] = "Provides the REMOVE command, an alternative to KICK"; diff --git a/extensions/m_roleplay.c b/extensions/m_roleplay.c index a21709b7e..282cf8b56 100644 --- a/extensions/m_roleplay.c +++ b/extensions/m_roleplay.c @@ -14,20 +14,20 @@ */ -#include "stdinc.h" -#include "ircd.h" -#include "client.h" -#include "modules.h" -#include "send.h" -#include "numeric.h" -#include "hash.h" -#include "s_serv.h" -#include "inline/stringops.h" -#include "chmode.h" -#include "tgchange.h" -#include "channel.h" -#include "packet.h" -#include "messages.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include static const char roleplay_desc[] = "Adds a roleplaying system that allows faked nicknames to talk in a channel set +N"; diff --git a/extensions/m_sendbans.c b/extensions/m_sendbans.c index a6e155122..1e39f6bda 100644 --- a/extensions/m_sendbans.c +++ b/extensions/m_sendbans.c @@ -29,20 +29,19 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include "stdinc.h" -#include "client.h" -#include "ircd.h" -#include "match.h" -#include "numeric.h" -#include "s_conf.h" -#include "s_serv.h" -#include "s_newconf.h" -#include "send.h" -#include "msg.h" -#include "hash.h" -#include "modules.h" -#include "messages.h" -#include "rb_radixtree.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include static const char sendbands_desc[] = "Adds the ability to send all permanent RESVs and XLINEs to given server"; diff --git a/extensions/m_webirc.c b/extensions/m_webirc.c index 99f66b5b6..10c882338 100644 --- a/extensions/m_webirc.c +++ b/extensions/m_webirc.c @@ -38,20 +38,20 @@ * cgiirc.config */ -#include "stdinc.h" -#include "client.h" /* client struct */ -#include "match.h" -#include "hostmask.h" -#include "send.h" /* sendto_one */ -#include "numeric.h" /* ERR_xxx */ -#include "ircd.h" /* me */ -#include "msg.h" -#include "parse.h" -#include "modules.h" -#include "s_serv.h" -#include "hash.h" -#include "s_conf.h" -#include "reject.h" +#include +#include /* client struct */ +#include +#include +#include /* sendto_one */ +#include /* ERR_xxx */ +#include /* me */ +#include +#include +#include +#include +#include +#include +#include static const char webirc_desc[] = "Adds support for the WebIRC system"; diff --git a/extensions/no_kill_services.c b/extensions/no_kill_services.c index 15f6365c2..7c80c7398 100644 --- a/extensions/no_kill_services.c +++ b/extensions/no_kill_services.c @@ -6,19 +6,19 @@ * Licensed under the WTFPLv2 */ -#include "stdinc.h" -#include "modules.h" -#include "hook.h" -#include "client.h" -#include "ircd.h" -#include "send.h" -#include "hash.h" -#include "s_conf.h" -#include "s_user.h" -#include "s_serv.h" -#include "numeric.h" -#include "privilege.h" -#include "s_newconf.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include static const char nokill_desc[] = "Prevents operators from killing services"; diff --git a/extensions/no_locops.c b/extensions/no_locops.c index 7fc7d1b6a..537e39994 100644 --- a/extensions/no_locops.c +++ b/extensions/no_locops.c @@ -3,14 +3,14 @@ * -- jilles */ -#include "stdinc.h" -#include "modules.h" -#include "client.h" -#include "hook.h" -#include "ircd.h" -#include "send.h" -#include "s_conf.h" -#include "s_newconf.h" +#include +#include +#include +#include +#include +#include +#include +#include static const char no_locops_desc[] = "Disables local operators"; diff --git a/extensions/no_oper_invis.c b/extensions/no_oper_invis.c index def1b0169..169afe54e 100644 --- a/extensions/no_oper_invis.c +++ b/extensions/no_oper_invis.c @@ -4,14 +4,14 @@ * -- jilles */ -#include "stdinc.h" -#include "modules.h" -#include "client.h" -#include "hook.h" -#include "ircd.h" -#include "send.h" -#include "s_conf.h" -#include "s_newconf.h" +#include +#include +#include +#include +#include +#include +#include +#include static const char noi_desc[] = "Disallow operators from setting user mode +i on themselves"; diff --git a/extensions/override.c b/extensions/override.c index 312318b24..f1751c377 100644 --- a/extensions/override.c +++ b/extensions/override.c @@ -8,19 +8,19 @@ * able to use this extension. */ -#include "stdinc.h" -#include "modules.h" -#include "hook.h" -#include "client.h" -#include "ircd.h" -#include "send.h" -#include "hash.h" -#include "s_conf.h" -#include "s_user.h" -#include "s_serv.h" -#include "numeric.h" -#include "privilege.h" -#include "s_newconf.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include static const char override_desc[] = "Adds user mode +p, an operator-only user mode that grants temporary privileges to override anything"; diff --git a/extensions/restrict-unauthenticated.c b/extensions/restrict-unauthenticated.c index 16267a22e..73936a92b 100644 --- a/extensions/restrict-unauthenticated.c +++ b/extensions/restrict-unauthenticated.c @@ -2,19 +2,19 @@ * restrict unauthenticated users from doing anything as channel op */ -#include "stdinc.h" -#include "modules.h" -#include "hook.h" -#include "client.h" -#include "ircd.h" -#include "send.h" -#include "hash.h" -#include "s_conf.h" -#include "s_user.h" -#include "s_serv.h" -#include "numeric.h" -#include "privilege.h" -#include "s_newconf.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include static const char restrict_desc[] = "Restrict unautenticated users from doing anything as channel ops"; diff --git a/extensions/sno_channelcreate.c b/extensions/sno_channelcreate.c index 4259bf94e..0841075ac 100644 --- a/extensions/sno_channelcreate.c +++ b/extensions/sno_channelcreate.c @@ -2,15 +2,14 @@ * Channel creation notices */ -#include "stdinc.h" -#include "modules.h" -#include "client.h" -#include "hook.h" -#include "ircd.h" -#include "send.h" -#include "s_conf.h" -#include "snomask.h" -#include "rb_lib.h" +#include +#include +#include +#include +#include +#include +#include +#include static const char sno_desc[] = "Adds server notice mask +l that allows operators to receive channel creation notices"; diff --git a/extensions/sno_farconnect.c b/extensions/sno_farconnect.c index 787806588..4fcd1c524 100644 --- a/extensions/sno_farconnect.c +++ b/extensions/sno_farconnect.c @@ -6,14 +6,14 @@ * -- jilles */ -#include "stdinc.h" -#include "modules.h" -#include "client.h" -#include "hook.h" -#include "ircd.h" -#include "send.h" -#include "s_conf.h" -#include "snomask.h" +#include +#include +#include +#include +#include +#include +#include +#include static const char sno_desc[] = "Adds server notice mask +F that allows operators to receive notices for connections on other servers"; diff --git a/extensions/sno_globalkline.c b/extensions/sno_globalkline.c index 0b3285b2a..b8e285b97 100644 --- a/extensions/sno_globalkline.c +++ b/extensions/sno_globalkline.c @@ -7,13 +7,13 @@ * more data across servers -- jilles */ -#include "stdinc.h" -#include "modules.h" -#include "client.h" -#include "hook.h" -#include "ircd.h" -#include "send.h" -#include "s_conf.h" +#include +#include +#include +#include +#include +#include +#include static const char sno_desc[] = "Adds server notices for global XLINEs, KLINEs, and DLINEs"; diff --git a/extensions/sno_globalnickchange.c b/extensions/sno_globalnickchange.c index 0e338c5cc..a32f15c4c 100644 --- a/extensions/sno_globalnickchange.c +++ b/extensions/sno_globalnickchange.c @@ -2,14 +2,14 @@ * Remote client nick change notices. */ -#include "stdinc.h" -#include "modules.h" -#include "client.h" -#include "hook.h" -#include "ircd.h" -#include "send.h" -#include "s_conf.h" -#include "snomask.h" +#include +#include +#include +#include +#include +#include +#include +#include static const char sno_desc[] = "Adds server notices for remote nick changes"; diff --git a/extensions/sno_globaloper.c b/extensions/sno_globaloper.c index ea5476c29..7331346be 100644 --- a/extensions/sno_globaloper.c +++ b/extensions/sno_globaloper.c @@ -2,14 +2,14 @@ * Remote oper up notices. */ -#include "stdinc.h" -#include "modules.h" -#include "client.h" -#include "hook.h" -#include "ircd.h" -#include "send.h" -#include "s_conf.h" -#include "snomask.h" +#include +#include +#include +#include +#include +#include +#include +#include static const char sno_desc[] = "Adds server notices for remote oper up"; diff --git a/extensions/sno_whois.c b/extensions/sno_whois.c index f5c69d92c..dc3885b1d 100644 --- a/extensions/sno_whois.c +++ b/extensions/sno_whois.c @@ -6,12 +6,12 @@ * (you need to put ~servnotice in oper_only_umodes for this to work). */ -#include "stdinc.h" -#include "modules.h" -#include "hook.h" -#include "client.h" -#include "ircd.h" -#include "send.h" +#include +#include +#include +#include +#include +#include /* undefine this to allow anyone to receive whois notifications */ #define OPERONLY diff --git a/extensions/spamfilter_expr.c b/extensions/spamfilter_expr.c index c8b9f2421..cd2630127 100644 --- a/extensions/spamfilter_expr.c +++ b/extensions/spamfilter_expr.c @@ -29,15 +29,15 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include "stdinc.h" -#include "s_conf.h" -#include "numeric.h" -#include "modules.h" -#include "hook.h" -#include "send.h" -#include "s_serv.h" -#include "hash.h" -#include "newconf.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include #include "spamfilter.h" #define PCRE2_STATIC 1 diff --git a/extensions/spamfilter_nicks.c b/extensions/spamfilter_nicks.c index 8c18a2010..cb9fd5710 100644 --- a/extensions/spamfilter_nicks.c +++ b/extensions/spamfilter_nicks.c @@ -29,13 +29,13 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include "stdinc.h" -#include "modules.h" -#include "hook.h" -#include "client.h" -#include "send.h" -#include "hash.h" -#include "newconf.h" +#include +#include +#include +#include +#include +#include +#include #include "spamfilter.h" diff --git a/extensions/spy_admin_notice.c b/extensions/spy_admin_notice.c index 8d4770634..977f12565 100644 --- a/extensions/spy_admin_notice.c +++ b/extensions/spy_admin_notice.c @@ -19,12 +19,12 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ -#include "stdinc.h" -#include "modules.h" -#include "hook.h" -#include "client.h" -#include "ircd.h" -#include "send.h" +#include +#include +#include +#include +#include +#include static const char spy_desc[] = "Sends a notice when someone uses ADMIN"; diff --git a/extensions/spy_info_notice.c b/extensions/spy_info_notice.c index 01d608958..af6069e68 100644 --- a/extensions/spy_info_notice.c +++ b/extensions/spy_info_notice.c @@ -19,12 +19,12 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ -#include "stdinc.h" -#include "modules.h" -#include "hook.h" -#include "client.h" -#include "ircd.h" -#include "send.h" +#include +#include +#include +#include +#include +#include static const char spy_desc[] = "Sends a notice when someone uses INFO"; diff --git a/extensions/spy_links_notice.c b/extensions/spy_links_notice.c index 17b5d0e90..78b7d357b 100644 --- a/extensions/spy_links_notice.c +++ b/extensions/spy_links_notice.c @@ -19,12 +19,12 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ -#include "stdinc.h" -#include "modules.h" -#include "hook.h" -#include "client.h" -#include "ircd.h" -#include "send.h" +#include +#include +#include +#include +#include +#include static const char spy_desc[] = "Sends a notice when someone uses LINKS"; diff --git a/extensions/spy_motd_notice.c b/extensions/spy_motd_notice.c index 1a6c123ed..8feaf8fc8 100644 --- a/extensions/spy_motd_notice.c +++ b/extensions/spy_motd_notice.c @@ -19,12 +19,12 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ -#include "stdinc.h" -#include "modules.h" -#include "hook.h" -#include "client.h" -#include "ircd.h" -#include "send.h" +#include +#include +#include +#include +#include +#include static const char spy_desc[] = "Sends a notice when someone looks at the MOTD"; diff --git a/extensions/spy_stats_notice.c b/extensions/spy_stats_notice.c index 6bc231417..c90236ec6 100644 --- a/extensions/spy_stats_notice.c +++ b/extensions/spy_stats_notice.c @@ -19,12 +19,12 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ -#include "stdinc.h" -#include "modules.h" -#include "hook.h" -#include "client.h" -#include "ircd.h" -#include "send.h" +#include +#include +#include +#include +#include +#include static const char spy_desc[] = "Sends a notice when someone uses STATS"; diff --git a/extensions/spy_stats_p_notice.c b/extensions/spy_stats_p_notice.c index c068a252e..438abf160 100644 --- a/extensions/spy_stats_p_notice.c +++ b/extensions/spy_stats_p_notice.c @@ -19,12 +19,12 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ -#include "stdinc.h" -#include "modules.h" -#include "hook.h" -#include "client.h" -#include "ircd.h" -#include "send.h" +#include +#include +#include +#include +#include +#include static const char spy_desc[] = "Sends a notice when someone looks at the operator list"; diff --git a/extensions/spy_trace_notice.c b/extensions/spy_trace_notice.c index e4f5e567a..f15ecbcd8 100644 --- a/extensions/spy_trace_notice.c +++ b/extensions/spy_trace_notice.c @@ -19,12 +19,12 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ -#include "stdinc.h" -#include "modules.h" -#include "hook.h" -#include "client.h" -#include "ircd.h" -#include "send.h" +#include +#include +#include +#include +#include +#include static const char spy_desc[] = "Sends a notice when someone uses TRACE or LTRACE"; diff --git a/extensions/umode_noctcp.c b/extensions/umode_noctcp.c index bb1b6490e..4eaad660e 100644 --- a/extensions/umode_noctcp.c +++ b/extensions/umode_noctcp.c @@ -20,15 +20,15 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include "stdinc.h" -#include "modules.h" -#include "hook.h" -#include "client.h" -#include "ircd.h" -#include "send.h" -#include "s_user.h" -#include "numeric.h" -#include "inline/stringops.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include static const char umode_noctcp_desc[] = "Adds user mode +C which blocks CTCPs to the user."; diff --git a/include/ircd/.gitignore b/include/ircd/.gitignore new file mode 100644 index 000000000..cbdd902ff --- /dev/null +++ b/include/ircd/.gitignore @@ -0,0 +1,2 @@ +setup.h* +serno.h diff --git a/include/authproc.h b/include/ircd/authproc.h similarity index 99% rename from include/authproc.h rename to include/ircd/authproc.h index bfa747515..bf23159c9 100644 --- a/include/authproc.h +++ b/include/ircd/authproc.h @@ -27,7 +27,6 @@ #define CHARYBDIS_AUTHD_H #include "stdinc.h" -#include "rb_dictionary.h" #include "client.h" struct BlacklistStats diff --git a/include/bandbi.h b/include/ircd/bandbi.h similarity index 100% rename from include/bandbi.h rename to include/ircd/bandbi.h diff --git a/include/cache.h b/include/ircd/cache.h similarity index 97% rename from include/cache.h rename to include/ircd/cache.h index 095354d8e..fd609411b 100644 --- a/include/cache.h +++ b/include/ircd/cache.h @@ -1,8 +1,6 @@ #ifndef INCLUDED_CACHE_H #define INCLUDED_CACHE_H -#include "rb_dictionary.h" - #define HELP_MAX 100 #define CACHEFILELEN 30 diff --git a/include/capability.h b/include/ircd/capability.h similarity index 98% rename from include/capability.h rename to include/ircd/capability.h index 76e58c974..c77b20e63 100644 --- a/include/capability.h +++ b/include/ircd/capability.h @@ -22,7 +22,6 @@ #define __CAPABILITY_H__ #include "stdinc.h" -#include "rb_dictionary.h" struct CapabilityIndex { const char *name; diff --git a/include/certfp.h b/include/ircd/certfp.h similarity index 100% rename from include/certfp.h rename to include/ircd/certfp.h diff --git a/include/channel.h b/include/ircd/channel.h similarity index 99% rename from include/channel.h rename to include/ircd/channel.h index b279060cf..894cbdbff 100644 --- a/include/channel.h +++ b/include/ircd/channel.h @@ -25,7 +25,7 @@ #ifndef INCLUDED_channel_h #define INCLUDED_channel_h -#include "setup.h" +#include "stdinc.h" #include "chmode.h" /* channel status flags */ diff --git a/include/chmode.h b/include/ircd/chmode.h similarity index 100% rename from include/chmode.h rename to include/ircd/chmode.h diff --git a/include/class.h b/include/ircd/class.h similarity index 100% rename from include/class.h rename to include/ircd/class.h diff --git a/include/client.h b/include/ircd/client.h similarity index 99% rename from include/client.h rename to include/ircd/client.h index 708bf69dc..592130423 100644 --- a/include/client.h +++ b/include/ircd/client.h @@ -26,9 +26,8 @@ #ifndef INCLUDED_client_h #define INCLUDED_client_h +#include "stdinc.h" #include "defaults.h" - -#include "ircd_defs.h" #include "channel.h" #include "dns.h" #include "snomask.h" diff --git a/include/defaults.h b/include/ircd/defaults.h similarity index 98% rename from include/defaults.h rename to include/ircd/defaults.h index 4e36981df..d31c78919 100644 --- a/include/defaults.h +++ b/include/ircd/defaults.h @@ -30,7 +30,7 @@ * Do not mess with these values unless you know what you are doing! */ -#include "setup.h" +#include "stdinc.h" /* Below are the elements for default paths. */ typedef enum { @@ -102,9 +102,9 @@ extern const char *ircd_paths[IRCD_PATH_COUNT]; */ #define DPATH IRCD_PREFIX -#define BINPATH IRCD_PREFIX "/bin/" +#define BINPATH IRCD_PREFIX "/bin" #define MODPATH MODULE_DIR -#define AUTOMODPATH MODULE_DIR "/autoload/" +#define AUTOMODPATH MODULE_DIR "/autoload" #define ETCPATH ETC_DIR #define LOGPATH LOG_DIR #define UHPATH HELP_DIR "/users" diff --git a/include/dns.h b/include/ircd/dns.h similarity index 100% rename from include/dns.h rename to include/ircd/dns.h diff --git a/include/hash.h b/include/ircd/hash.h similarity index 98% rename from include/hash.h rename to include/ircd/hash.h index 88bf7a54e..4098a8ebd 100644 --- a/include/hash.h +++ b/include/ircd/hash.h @@ -25,8 +25,8 @@ #ifndef INCLUDED_hash_h #define INCLUDED_hash_h -#include "rb_dictionary.h" -#include "rb_radixtree.h" +#include +#include extern rb_dictionary *nd_dict; extern rb_radixtree *resv_tree; diff --git a/include/hook.h b/include/ircd/hook.h similarity index 100% rename from include/hook.h rename to include/ircd/hook.h diff --git a/include/hostmask.h b/include/ircd/hostmask.h similarity index 100% rename from include/hostmask.h rename to include/ircd/hostmask.h diff --git a/include/inline/stringops.h b/include/ircd/inline/stringops.h similarity index 100% rename from include/inline/stringops.h rename to include/ircd/inline/stringops.h diff --git a/include/ircd.h b/include/ircd/ircd.h similarity index 100% rename from include/ircd.h rename to include/ircd/ircd.h diff --git a/include/ircd_defs.h b/include/ircd/ircd_defs.h similarity index 100% rename from include/ircd_defs.h rename to include/ircd/ircd_defs.h diff --git a/include/ircd_getopt.h b/include/ircd/ircd_getopt.h similarity index 100% rename from include/ircd_getopt.h rename to include/ircd/ircd_getopt.h diff --git a/include/ircd_linker.h b/include/ircd/ircd_linker.h similarity index 100% rename from include/ircd_linker.h rename to include/ircd/ircd_linker.h diff --git a/include/ircd_signal.h b/include/ircd/ircd_signal.h similarity index 100% rename from include/ircd_signal.h rename to include/ircd/ircd_signal.h diff --git a/include/listener.h b/include/ircd/listener.h similarity index 98% rename from include/listener.h rename to include/ircd/listener.h index 48b37f470..03400053c 100644 --- a/include/listener.h +++ b/include/ircd/listener.h @@ -25,7 +25,7 @@ #ifndef INCLUDED_listener_h #define INCLUDED_listener_h -#include "ircd_defs.h" +#include "stdinc.h" struct Client; diff --git a/include/logger.h b/include/ircd/logger.h similarity index 100% rename from include/logger.h rename to include/ircd/logger.h diff --git a/include/m_info.h b/include/ircd/m_info.h similarity index 100% rename from include/m_info.h rename to include/ircd/m_info.h diff --git a/include/match.h b/include/ircd/match.h similarity index 99% rename from include/match.h rename to include/ircd/match.h index 151ad4bf6..63d1d6745 100644 --- a/include/match.h +++ b/include/ircd/match.h @@ -25,8 +25,7 @@ #ifndef INCLUDED_match_h #define INCLUDED_match_h -#include "setup.h" -#include "ircd_defs.h" +#include "stdinc.h" /* * match - compare name with mask, mask may contain * and ? as wildcards diff --git a/include/messages.h b/include/ircd/messages.h similarity index 100% rename from include/messages.h rename to include/ircd/messages.h diff --git a/include/modules.h b/include/ircd/modules.h similarity index 98% rename from include/modules.h rename to include/ircd/modules.h index 60fad5183..0b37c8f6b 100644 --- a/include/modules.h +++ b/include/ircd/modules.h @@ -24,9 +24,8 @@ #ifndef INCLUDED_modules_h #define INCLUDED_modules_h -#include "serno.h" +#include "stdinc.h" #include "defaults.h" -#include "setup.h" #include "parse.h" #define MAPI_CHARYBDIS 2 @@ -118,7 +117,7 @@ struct mapi_mheader_av2 struct mapi_mheader_av1 _mheader = { MAPI_V1, reg, unreg, cl, hl, hfnlist, v} #define DECLARE_MODULE_AV2(name, reg, unreg, cl, hl, hfnlist, caplist, v, desc) \ - struct mapi_mheader_av2 _mheader = { MAPI_V2, reg, unreg, cl, hl, hfnlist, caplist, v, desc, DATECODE} + struct mapi_mheader_av2 _mheader = { MAPI_V2, reg, unreg, cl, hl, hfnlist, caplist, v, desc, RB_DATECODE} /*** @@ -166,7 +165,7 @@ struct mapi_mheader_av3 _mheader = \ { \ MAPI_V3, (struct mapi_av3_attr *[]) \ { \ - MOD_ATTR { "time", DATECODE }, \ + MOD_ATTR { "time", RB_DATECODE },\ __VA_ARGS__, \ NULL \ } \ diff --git a/include/monitor.h b/include/ircd/monitor.h similarity index 100% rename from include/monitor.h rename to include/ircd/monitor.h diff --git a/include/msg.h b/include/ircd/msg.h similarity index 100% rename from include/msg.h rename to include/ircd/msg.h diff --git a/include/msgbuf.h b/include/ircd/msgbuf.h similarity index 100% rename from include/msgbuf.h rename to include/ircd/msgbuf.h diff --git a/include/newconf.h b/include/ircd/newconf.h similarity index 100% rename from include/newconf.h rename to include/ircd/newconf.h diff --git a/include/numeric.h b/include/ircd/numeric.h similarity index 100% rename from include/numeric.h rename to include/ircd/numeric.h diff --git a/include/operhash.h b/include/ircd/operhash.h similarity index 100% rename from include/operhash.h rename to include/ircd/operhash.h diff --git a/include/packet.h b/include/ircd/packet.h similarity index 100% rename from include/packet.h rename to include/ircd/packet.h diff --git a/include/parse.h b/include/ircd/parse.h similarity index 98% rename from include/parse.h rename to include/ircd/parse.h index a60068dd8..d225faf5e 100644 --- a/include/parse.h +++ b/include/ircd/parse.h @@ -25,7 +25,7 @@ #ifndef INCLUDED_parse_h_h #define INCLUDED_parse_h_h -#include "rb_dictionary.h" +#include struct Message; struct Client; diff --git a/include/patchlevel.h b/include/ircd/patchlevel.h similarity index 98% rename from include/patchlevel.h rename to include/ircd/patchlevel.h index 49701c91e..3e28dda2c 100644 --- a/include/patchlevel.h +++ b/include/ircd/patchlevel.h @@ -22,7 +22,7 @@ * USA */ -#include "setup.h" +#include "stdinc.h" #ifndef PATCHLEVEL #define PATCHLEVEL BRANDING_NAME "-" BRANDING_VERSION diff --git a/include/privilege.h b/include/ircd/privilege.h similarity index 100% rename from include/privilege.h rename to include/ircd/privilege.h diff --git a/include/ratelimit.h b/include/ircd/ratelimit.h similarity index 100% rename from include/ratelimit.h rename to include/ircd/ratelimit.h diff --git a/include/reject.h b/include/ircd/reject.h similarity index 100% rename from include/reject.h rename to include/ircd/reject.h diff --git a/include/restart.h b/include/ircd/restart.h similarity index 100% rename from include/restart.h rename to include/ircd/restart.h diff --git a/include/s_assert.h b/include/ircd/s_assert.h similarity index 100% rename from include/s_assert.h rename to include/ircd/s_assert.h diff --git a/include/s_conf.h b/include/ircd/s_conf.h similarity index 99% rename from include/s_conf.h rename to include/ircd/s_conf.h index 4c3bd5eed..ce0f62802 100644 --- a/include/s_conf.h +++ b/include/ircd/s_conf.h @@ -24,7 +24,7 @@ #ifndef INCLUDED_s_conf_h #define INCLUDED_s_conf_h -#include "setup.h" +#include "stdinc.h" #ifdef HAVE_LIBCRYPTO #include diff --git a/include/s_newconf.h b/include/ircd/s_newconf.h similarity index 99% rename from include/s_newconf.h rename to include/ircd/s_newconf.h index 3866eae50..877605f0d 100644 --- a/include/s_newconf.h +++ b/include/ircd/s_newconf.h @@ -33,7 +33,7 @@ #ifndef INCLUDED_s_newconf_h #define INCLUDED_s_newconf_h -#include "setup.h" +#include "stdinc.h" #include "privilege.h" #ifdef HAVE_LIBCRYPTO diff --git a/include/s_serv.h b/include/ircd/s_serv.h similarity index 100% rename from include/s_serv.h rename to include/ircd/s_serv.h diff --git a/include/s_stats.h b/include/ircd/s_stats.h similarity index 100% rename from include/s_stats.h rename to include/ircd/s_stats.h diff --git a/include/s_user.h b/include/ircd/s_user.h similarity index 100% rename from include/s_user.h rename to include/ircd/s_user.h diff --git a/include/scache.h b/include/ircd/scache.h similarity index 100% rename from include/scache.h rename to include/ircd/scache.h diff --git a/include/send.h b/include/ircd/send.h similarity index 99% rename from include/send.h rename to include/ircd/send.h index 695ec5634..a4b9aa74f 100644 --- a/include/send.h +++ b/include/ircd/send.h @@ -25,7 +25,7 @@ #ifndef INCLUDED_send_h #define INCLUDED_send_h -#include "rb_lib.h" +#include #include "ircd_defs.h" struct Client; diff --git a/include/snomask.h b/include/ircd/snomask.h similarity index 100% rename from include/snomask.h rename to include/ircd/snomask.h diff --git a/include/sslproc.h b/include/ircd/sslproc.h similarity index 100% rename from include/sslproc.h rename to include/ircd/sslproc.h diff --git a/include/stdinc.h b/include/ircd/stdinc.h similarity index 99% rename from include/stdinc.h rename to include/ircd/stdinc.h index ccae3f813..1f7b6294d 100644 --- a/include/stdinc.h +++ b/include/ircd/stdinc.h @@ -21,7 +21,7 @@ * */ -#include "rb_lib.h" +#include #include "ircd_defs.h" /* Needed for some reasons here -- dwr */ /* AIX requires this to be the first thing in the file. */ diff --git a/include/substitution.h b/include/ircd/substitution.h similarity index 100% rename from include/substitution.h rename to include/ircd/substitution.h diff --git a/include/supported.h b/include/ircd/supported.h similarity index 100% rename from include/supported.h rename to include/ircd/supported.h diff --git a/include/tgchange.h b/include/ircd/tgchange.h similarity index 100% rename from include/tgchange.h rename to include/ircd/tgchange.h diff --git a/include/whowas.h b/include/ircd/whowas.h similarity index 98% rename from include/whowas.h rename to include/ircd/whowas.h index 9d050ab0f..64f4b2136 100644 --- a/include/whowas.h +++ b/include/ircd/whowas.h @@ -24,11 +24,9 @@ #ifndef INCLUDED_whowas_h #define INCLUDED_whowas_h -#include "ircd_defs.h" +#include "stdinc.h" #include "client.h" -#include "setup.h" - struct User; struct Client; diff --git a/include/wsproc.h b/include/ircd/wsproc.h similarity index 100% rename from include/wsproc.h rename to include/ircd/wsproc.h diff --git a/include/rb/.gitignore b/include/rb/.gitignore new file mode 100644 index 000000000..e8daa4398 --- /dev/null +++ b/include/rb/.gitignore @@ -0,0 +1 @@ +config.h* diff --git a/librb/include/arc4random.h b/include/rb/arc4random.h similarity index 100% rename from librb/include/arc4random.h rename to include/rb/arc4random.h diff --git a/librb/include/rb_balloc.h b/include/rb/balloc.h similarity index 92% rename from librb/include/rb_balloc.h rename to include/rb/balloc.h index ff6652001..fc15d0027 100644 --- a/librb/include/rb_balloc.h +++ b/include/rb/balloc.h @@ -24,12 +24,11 @@ */ #ifndef RB_LIB_H -# error "Do not use balloc.h directly" +#error "Do not use balloc.h directly" #endif -#ifndef INCLUDED_balloc_h -#define INCLUDED_balloc_h - +#ifndef _RB_BALLOC_H +#define _RB_BALLOC_H 1 struct rb_bh; typedef struct rb_bh rb_bh; @@ -47,4 +46,4 @@ void rb_bh_usage(rb_bh *bh, size_t *bused, size_t *bfree, size_t *bmemusage, con void rb_bh_usage_all(rb_bh_usage_cb *cb, void *data); void rb_bh_total_usage(size_t *total_alloc, size_t *total_used); -#endif /* INCLUDED_balloc_h */ +#endif // _RB_BALLOC_H diff --git a/librb/include/rb_commio.h b/include/rb/commio.h similarity index 100% rename from librb/include/rb_commio.h rename to include/rb/commio.h diff --git a/librb/include/commio-int.h b/include/rb/commio_int.h similarity index 87% rename from librb/include/commio-int.h rename to include/rb/commio_int.h index cd573fef2..9ea36c96f 100644 --- a/librb/include/commio-int.h +++ b/include/rb/commio_int.h @@ -23,8 +23,8 @@ * */ -#ifndef _COMMIO_INT_H -#define _COMMIO_INT_H 1 +#ifndef _RB_COMMIO_INT_H +#define _RB_COMMIO_INT_H 1 #define RB_FD_HASH_BITS 12 #define RB_FD_HASH_SIZE (1UL << RB_FD_HASH_BITS) @@ -32,35 +32,6 @@ #define FD_DESC_SZ 128 /* hostlen + comment */ -#define rb_hash_fd(x) ((x ^ (x >> RB_FD_HASH_BITS) ^ (x >> (RB_FD_HASH_BITS * 2))) & RB_FD_HASH_MASK) - -#ifdef HAVE_WRITEV -#ifndef UIO_MAXIOV -# if defined(__FreeBSD__) || defined(__APPLE__) || defined(__NetBSD__) - /* FreeBSD 4.7 defines it in sys/uio.h only if _KERNEL is specified */ -# define RB_UIO_MAXIOV 1024 -# elif defined(__sgi) - /* IRIX 6.5 has sysconf(_SC_IOV_MAX) which might return 512 or bigger */ -# define RB_UIO_MAXIOV 512 -# elif defined(__sun) - /* Solaris (and SunOS?) defines IOV_MAX instead */ -# ifndef IOV_MAX -# define RB_UIO_MAXIOV 16 -# else -# define RB_UIO_MAXIOV IOV_MAX -# endif - -# elif defined(IOV_MAX) -# define RB_UIO_MAXIOV IOV_MAX -# else -# define RB_UIO_MAXIOV 16 -# endif -#else -#define RB_UIO_MAXIOV UIO_MAXIOV -#endif -#else -#define RB_UIO_MAXIOV 16 -#endif struct conndata { /* We don't need the host here ? */ @@ -234,5 +205,6 @@ void rb_setselect_win32(rb_fde_t *F, unsigned int type, PF * handler, void *clie int rb_init_netio_win32(void); int rb_select_win32(long); int rb_setup_fd_win32(rb_fde_t *F); -#endif + +#endif // _RB_COMMIO_INT_H diff --git a/librb/include/rb_dictionary.h b/include/rb/dictionary.h similarity index 99% rename from librb/include/rb_dictionary.h rename to include/rb/dictionary.h index 9a84ceed4..119eb65a4 100644 --- a/librb/include/rb_dictionary.h +++ b/include/rb/dictionary.h @@ -25,8 +25,6 @@ #ifndef __RB_DICTIONARY_H__ #define __RB_DICTIONARY_H__ -#include "librb-config.h" - typedef struct rb_dictionary rb_dictionary; typedef struct rb_dictionary_element rb_dictionary_element; typedef struct rb_dictionary_iter rb_dictionary_iter; diff --git a/librb/include/rb_dlink.h b/include/rb/dlink.h similarity index 100% rename from librb/include/rb_dlink.h rename to include/rb/dlink.h diff --git a/librb/include/rb_event.h b/include/rb/event.h similarity index 100% rename from librb/include/rb_event.h rename to include/rb/event.h diff --git a/librb/include/event-int.h b/include/rb/event_int.h similarity index 93% rename from librb/include/event-int.h rename to include/rb/event_int.h index 4cabd3169..311252fb6 100644 --- a/librb/include/event-int.h +++ b/include/rb/event_int.h @@ -22,6 +22,9 @@ * */ +#ifndef _RB_EVENT_INT_H +#define _RB_EVENT_INT_H 1 + struct ev_entry { rb_dlink_node node; @@ -35,3 +38,5 @@ struct ev_entry void *comm_ptr; }; void rb_event_io_register_all(void); + +#endif // _RB_EVENT_INT_H diff --git a/librb/include/rb_helper.h b/include/rb/helper.h similarity index 100% rename from librb/include/rb_helper.h rename to include/rb/helper.h diff --git a/librb/include/rb_linebuf.h b/include/rb/linebuf.h similarity index 100% rename from librb/include/rb_linebuf.h rename to include/rb/linebuf.h diff --git a/librb/include/rb_memory.h b/include/rb/memory.h similarity index 99% rename from librb/include/rb_memory.h rename to include/rb/memory.h index 0b61204ec..eaba9bfda 100644 --- a/librb/include/rb_memory.h +++ b/include/rb/memory.h @@ -30,8 +30,6 @@ #ifndef _RB_MEMORY_H #define _RB_MEMORY_H -#include - #define RB_UNIQUE_PTR(deleter) __attribute__((cleanup(deleter))) #define RB_AUTO_PTR RB_UNIQUE_PTR(rb_raii_free) diff --git a/librb/include/rb_patricia.h b/include/rb/patricia.h similarity index 100% rename from librb/include/rb_patricia.h rename to include/rb/patricia.h diff --git a/librb/include/rb_radixtree.h b/include/rb/radixtree.h similarity index 100% rename from librb/include/rb_radixtree.h rename to include/rb/radixtree.h diff --git a/librb/include/rb_rawbuf.h b/include/rb/rawbuf.h similarity index 100% rename from librb/include/rb_rawbuf.h rename to include/rb/rawbuf.h diff --git a/include/rb/rb.h b/include/rb/rb.h new file mode 100644 index 000000000..2b1280810 --- /dev/null +++ b/include/rb/rb.h @@ -0,0 +1,68 @@ +#ifndef _RB_H +#define _RB_H +#define RB_LIB_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include "config.h" +#include "include.h" +#include "system.h" + + +typedef socklen_t rb_socklen_t; +typedef void log_cb(const char *buffer); +typedef void restart_cb(const char *buffer); +typedef void die_cb(const char *buffer); + +char *rb_ctime(const time_t, char *, size_t); +char *rb_date(const time_t, char *, size_t); +void rb_lib_log(const char *, ...); +void rb_lib_restart(const char *, ...) __attribute__((noreturn)); +void rb_lib_die(const char *, ...); +void rb_set_time(void); +const char *rb_lib_version(void); +void rb_lib_init(log_cb * xilog, restart_cb * irestart, die_cb * idie, int closeall, int maxfds, size_t dh_size, size_t fd_heap_size); +void rb_lib_loop(long delay) __attribute__((noreturn)); +time_t rb_current_time(void); +const struct timeval *rb_current_time_tv(void); +pid_t rb_spawn_process(const char *, const char **); +char *rb_strtok_r(char *, const char *, char **); +int rb_gettimeofday(struct timeval *, void *); +void rb_sleep(unsigned int seconds, unsigned int useconds); +char *rb_crypt(const char *, const char *); +unsigned char *rb_base64_encode(const unsigned char *str, int length); +unsigned char *rb_base64_decode(const unsigned char *str, int length, int *ret); +int rb_kill(pid_t, int); +char *rb_strerror(int); +int rb_setenv(const char *, const char *, int); +pid_t rb_waitpid(pid_t pid, int *status, int options); +pid_t rb_getpid(void); +//unsigned int rb_geteuid(void); +void *const *rb_backtrace(int *len); // writes to and returns static vector (*len indicates element count) +const char *const *rb_backtrace_symbols(int *len); // translates rb_backtrace(), all static +void rb_backtrace_log_symbols(void); // rb_backtrace_symbols piped to rb_lib_log() + + +#include "tools.h" +#include "dlink.h" +#include "memory.h" +#include "commio.h" +#include "balloc.h" +#include "linebuf.h" +#include "event.h" +#include "helper.h" +#include "rawbuf.h" +#include "patricia.h" +#include "dictionary.h" +#include "radixtree.h" + +#ifdef __cplusplus +} // extern "C" +#endif + +#include "cpp.h" + + +#endif // _RB_H diff --git a/librb/include/commio-ssl.h b/include/rb/ssl.h similarity index 97% rename from librb/include/commio-ssl.h rename to include/rb/ssl.h index cb6bda7a4..9acabb8d0 100644 --- a/librb/include/commio-ssl.h +++ b/include/rb/ssl.h @@ -21,8 +21,8 @@ * */ -#ifndef _COMMIO_SSL_H -#define _COMMIO_SSL_H +#ifndef _RB_SSL_H +#define _RB_SSL_H 1 int rb_setup_ssl_server(const char *cert, const char *keyfile, const char *dhfile, const char *cipher_list); int rb_init_ssl(void); diff --git a/librb/include/rb_lib.h b/include/rb/system.h similarity index 72% rename from librb/include/rb_lib.h rename to include/rb/system.h index 4a5d76c73..c83d6f0ef 100644 --- a/librb/include/rb_lib.h +++ b/include/rb/system.h @@ -1,14 +1,10 @@ -#ifndef RB_LIB_H -#define RB_LIB_H 1 +#ifndef _RB_SYSTEM_H +#define _RB_SYSTEM_H 1 -#include -#include -#include -#include -#include -#include -#include -#include + +#ifdef HAVE_IPV6 + #define RB_IPV6 1 +#endif #ifdef HAVE_STDBOOL_H @@ -238,59 +234,40 @@ while(0) #endif -typedef void log_cb(const char *buffer); -typedef void restart_cb(const char *buffer); -typedef void die_cb(const char *buffer); - -char *rb_ctime(const time_t, char *, size_t); -char *rb_date(const time_t, char *, size_t); -void rb_lib_log(const char *, ...); -void rb_lib_restart(const char *, ...) __attribute__((noreturn)); -void rb_lib_die(const char *, ...); -void rb_set_time(void); -const char *rb_lib_version(void); - -void rb_lib_init(log_cb * xilog, restart_cb * irestart, die_cb * idie, int closeall, int maxfds, - size_t dh_size, size_t fd_heap_size); -void rb_lib_loop(long delay) __attribute__((noreturn)); - -time_t rb_current_time(void); -const struct timeval *rb_current_time_tv(void); -pid_t rb_spawn_process(const char *, const char **); - -char *rb_strtok_r(char *, const char *, char **); - -int rb_gettimeofday(struct timeval *, void *); - -void rb_sleep(unsigned int seconds, unsigned int useconds); -char *rb_crypt(const char *, const char *); - -unsigned char *rb_base64_encode(const unsigned char *str, int length); -unsigned char *rb_base64_decode(const unsigned char *str, int length, int *ret); -int rb_kill(pid_t, int); -char *rb_strerror(int); - -int rb_setenv(const char *, const char *, int); - -pid_t rb_waitpid(pid_t pid, int *status, int options); -pid_t rb_getpid(void); -//unsigned int rb_geteuid(void); - -void *const *rb_backtrace(int *len); // writes to and returns static vector (*len indicates element count) -const char *const *rb_backtrace_symbols(int *len); // translates rb_backtrace(), all static -void rb_backtrace_log_symbols(void); // rb_backtrace_symbols piped to rb_lib_log() - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - +#ifdef HAVE_STRUCT_SOCKADDR_STORAGE + #define rb_sockaddr_storage sockaddr_storage +#else + struct rb_sockaddr_storage { uint8_t _padding[128]; }; #endif + +#define rb_hash_fd(x) ((x ^ (x >> RB_FD_HASH_BITS) ^ (x >> (RB_FD_HASH_BITS * 2))) & RB_FD_HASH_MASK) + +#ifdef HAVE_WRITEV +#ifndef UIO_MAXIOV +# if defined(__FreeBSD__) || defined(__APPLE__) || defined(__NetBSD__) + /* FreeBSD 4.7 defines it in sys/uio.h only if _KERNEL is specified */ +# define RB_UIO_MAXIOV 1024 +# elif defined(__sgi) + /* IRIX 6.5 has sysconf(_SC_IOV_MAX) which might return 512 or bigger */ +# define RB_UIO_MAXIOV 512 +# elif defined(__sun) + /* Solaris (and SunOS?) defines IOV_MAX instead */ +# ifndef IOV_MAX +# define RB_UIO_MAXIOV 16 +# else +# define RB_UIO_MAXIOV IOV_MAX +# endif + +# elif defined(IOV_MAX) +# define RB_UIO_MAXIOV IOV_MAX +# else +# define RB_UIO_MAXIOV 16 +# endif +#else +#define RB_UIO_MAXIOV UIO_MAXIOV +#endif +#else +#define RB_UIO_MAXIOV 16 +#endif + +#endif // _RB_SYSTEM_H diff --git a/librb/include/rb_tools.h b/include/rb/tools.h similarity index 100% rename from librb/include/rb_tools.h rename to include/rb/tools.h diff --git a/ircd/Makefile.am b/ircd/Makefile.am index d4b1e31b7..d0ecf086d 100644 --- a/ircd/Makefile.am +++ b/ircd/Makefile.am @@ -3,17 +3,12 @@ AUTOMAKE_OPTIONS = foreign prefix = @prefix@ libircddir = @libdir@ -AM_CPPFLAGS = @LTDLINCL@ -I$(top_srcdir)/include -I$(top_srcdir)/librb/include -AM_LDFLAGS = -L$(top_srcdir)/librb/src -export-dynamic -avoid-version -no-undefined +AM_CPPFLAGS = @LTDLINCL@ -I$(top_srcdir)/include +AM_LDFLAGS = -L$(top_srcdir)/rb -export-dynamic -avoid-version -no-undefined AM_YFLAGS = -d BUILT_SOURCES = ircd_parser.h version.c -version.c: version.c.SH ../CREDITS ../include/patchlevel.h ../include/serno.h - $(SHELL) version.c.SH - $(CP) version.c version.c.last - touch version.c.SH - if MINGW EXTRA_FLAGS = -Wl,--enable-runtime-pseudo-reloc -export-symbols-regex '*' endif @@ -66,13 +61,10 @@ libircd_la_SOURCES = \ whowas.c \ wsproc.c libircd_la_LDFLAGS = $(EXTRA_FLAGS) -avoid-version -no-undefined -libircd_la_LIBADD = @LIBLTDL@ -L$(top_srcdir)/librb/src -lrb +libircd_la_LIBADD = @LIBLTDL@ -L$(top_srcdir)/rb -lrb libircd_LTLIBRARIES = libircd.la -bin_PROGRAMS = charybdis -charybdis_SOURCES = main.c -charybdis_LDFLAGS = $(EXTRA_FLAGS) -dlopen self -charybdis_LDADD = libircd.la -L$(top_srcdir)/librb/src -lrb - -install-exec-hook: install-libircdLTLIBRARIES - $(RM) -f version.c +clean-local: + rm -f ircd_lexer.c + rm -f ircd_parser.c + rm -f ircd_parser.h diff --git a/ircd/authproc.c b/ircd/authproc.c index 00fec3e0d..d06823907 100644 --- a/ircd/authproc.c +++ b/ircd/authproc.c @@ -22,23 +22,22 @@ * USA */ -#include "stdinc.h" -#include "rb_lib.h" -#include "client.h" -#include "ircd_defs.h" -#include "parse.h" -#include "authproc.h" -#include "match.h" -#include "logger.h" -#include "s_conf.h" -#include "s_stats.h" -#include "client.h" -#include "packet.h" -#include "hash.h" -#include "send.h" -#include "numeric.h" -#include "msg.h" -#include "dns.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include typedef void (*authd_cb_t)(int, char **); diff --git a/ircd/bandbi.c b/ircd/bandbi.c index 567f30fd7..82cefefae 100644 --- a/ircd/bandbi.c +++ b/ircd/bandbi.c @@ -28,23 +28,22 @@ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ -#include "stdinc.h" -#include "rb_lib.h" -#include "client.h" -#include "s_conf.h" -#include "logger.h" -#include "match.h" -#include "bandbi.h" -#include "parse.h" -#include "channel.h" -#include "hostmask.h" -#include "hash.h" -#include "s_newconf.h" -#include "reject.h" -#include "send.h" -#include "ircd.h" -#include "msg.h" /* XXX: MAXPARA */ -#include "operhash.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include /* XXX: MAXPARA */ +#include static void bandb_handle_failure(rb_helper *helper, char **parv, int parc) __attribute__((noreturn)); diff --git a/ircd/cache.c b/ircd/cache.c index 40b21dee2..76b97af02 100644 --- a/ircd/cache.c +++ b/ircd/cache.c @@ -30,15 +30,13 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include "stdinc.h" -#include "ircd_defs.h" -#include "s_conf.h" -#include "client.h" -#include "hash.h" -#include "cache.h" -#include "rb_dictionary.h" -#include "numeric.h" -#include "send.h" +#include +#include +#include +#include +#include +#include +#include struct cachefile *user_motd = NULL; struct cachefile *oper_motd = NULL; diff --git a/ircd/capability.c b/ircd/capability.c index f82821d9a..423337af2 100644 --- a/ircd/capability.c +++ b/ircd/capability.c @@ -18,10 +18,9 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include "stdinc.h" -#include "capability.h" -#include "rb_dictionary.h" -#include "s_assert.h" +#include +#include +#include static rb_dlink_list capability_indexes = { NULL, NULL, 0 }; diff --git a/ircd/channel.c b/ircd/channel.c index 8f0b094e4..01c22be5c 100644 --- a/ircd/channel.c +++ b/ircd/channel.c @@ -22,23 +22,23 @@ * USA */ -#include "stdinc.h" -#include "channel.h" -#include "chmode.h" -#include "client.h" -#include "hash.h" -#include "hook.h" -#include "match.h" -#include "ircd.h" -#include "numeric.h" -#include "s_serv.h" /* captab */ -#include "s_user.h" -#include "send.h" -#include "whowas.h" -#include "s_conf.h" /* ConfigFileEntry, ConfigChannel */ -#include "s_newconf.h" -#include "logger.h" -#include "s_assert.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include /* captab */ +#include +#include +#include +#include /* ConfigFileEntry, ConfigChannel */ +#include +#include +#include struct config_channel_entry ConfigChannel; rb_dlink_list global_channel_list; diff --git a/ircd/chmode.c b/ircd/chmode.c index f29073d2b..89ae452b0 100644 --- a/ircd/chmode.c +++ b/ircd/chmode.c @@ -23,24 +23,24 @@ * USA */ -#include "stdinc.h" -#include "channel.h" -#include "client.h" -#include "hash.h" -#include "hook.h" -#include "match.h" -#include "ircd.h" -#include "numeric.h" -#include "s_serv.h" /* captab */ -#include "s_user.h" -#include "send.h" -#include "whowas.h" -#include "s_conf.h" /* ConfigFileEntry, ConfigChannel */ -#include "s_newconf.h" -#include "logger.h" -#include "chmode.h" -#include "s_assert.h" -#include "parse.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include /* captab */ +#include +#include +#include +#include /* ConfigFileEntry, ConfigChannel */ +#include +#include +#include +#include +#include /* bitmasks for error returns, so we send once per call */ #define SM_ERR_NOTS 0x00000001 /* No TS on channel */ diff --git a/ircd/class.c b/ircd/class.c index 0381f2cf6..290562968 100644 --- a/ircd/class.c +++ b/ircd/class.c @@ -22,17 +22,16 @@ * USA */ -#include "stdinc.h" -#include "defaults.h" - -#include "class.h" -#include "client.h" -#include "ircd.h" -#include "numeric.h" -#include "s_conf.h" -#include "s_newconf.h" -#include "send.h" -#include "match.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #define BAD_PING -2 diff --git a/ircd/client.c b/ircd/client.c index 9ec53b95c..3cf830491 100644 --- a/ircd/client.c +++ b/ircd/client.c @@ -22,37 +22,36 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ -#include "stdinc.h" -#include "defaults.h" +#include +#include -#include "client.h" -#include "class.h" -#include "hash.h" -#include "match.h" -#include "ircd.h" -#include "numeric.h" -#include "packet.h" -#include "authproc.h" -#include "s_conf.h" -#include "s_newconf.h" -#include "logger.h" -#include "s_serv.h" -#include "s_stats.h" -#include "send.h" -#include "whowas.h" -#include "s_user.h" -#include "hash.h" -#include "hostmask.h" -#include "listener.h" -#include "hook.h" -#include "msg.h" -#include "monitor.h" -#include "reject.h" -#include "scache.h" -#include "rb_dictionary.h" -#include "sslproc.h" -#include "wsproc.h" -#include "s_assert.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #define DEBUG_EXITED_CLIENTS diff --git a/ircd/dns.c b/ircd/dns.c index fa3c530a8..82b59d049 100644 --- a/ircd/dns.c +++ b/ircd/dns.c @@ -22,20 +22,18 @@ * USA */ -#include "stdinc.h" -#include "rb_lib.h" -#include "client.h" -#include "ircd_defs.h" -#include "parse.h" -#include "dns.h" -#include "match.h" -#include "logger.h" -#include "s_conf.h" -#include "client.h" -#include "send.h" -#include "numeric.h" -#include "msg.h" -#include "hash.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #define DNS_HOST_IPV4 ((char)'4') #define DNS_HOST_IPV6 ((char)'6') diff --git a/ircd/extban.c b/ircd/extban.c index 69603f140..409fbfcf7 100644 --- a/ircd/extban.c +++ b/ircd/extban.c @@ -20,9 +20,9 @@ * USA */ -#include "stdinc.h" -#include "channel.h" -#include "client.h" +#include +#include +#include ExtbanFunc extban_table[256] = { NULL }; diff --git a/ircd/getopt.c b/ircd/getopt.c index f7c6c826c..b7d30f8b7 100644 --- a/ircd/getopt.c +++ b/ircd/getopt.c @@ -22,9 +22,8 @@ * USA */ -#include "stdinc.h" - -#include "ircd_getopt.h" +#include +#include # define OPTCHAR '-' diff --git a/ircd/hash.c b/ircd/hash.c index 4341dbbdc..dee174952 100644 --- a/ircd/hash.c +++ b/ircd/hash.c @@ -22,22 +22,19 @@ * USA */ -#include "stdinc.h" -#include "ircd_defs.h" -#include "s_conf.h" -#include "channel.h" -#include "client.h" -#include "hash.h" -#include "match.h" -#include "ircd.h" -#include "numeric.h" -#include "send.h" -#include "msg.h" -#include "cache.h" -#include "s_newconf.h" -#include "s_assert.h" -#include "rb_dictionary.h" -#include "rb_radixtree.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include rb_dictionary *client_connid_tree = NULL; rb_radixtree *client_id_tree = NULL; diff --git a/ircd/hook.c b/ircd/hook.c index a15afdd04..2354fb2f2 100644 --- a/ircd/hook.c +++ b/ircd/hook.c @@ -34,9 +34,9 @@ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ -#include "stdinc.h" -#include "hook.h" -#include "match.h" +#include +#include +#include hook *hooks; diff --git a/ircd/hostmask.c b/ircd/hostmask.c index 059c07c77..3a892e4b3 100644 --- a/ircd/hostmask.c +++ b/ircd/hostmask.c @@ -23,13 +23,12 @@ * USA */ -#include "stdinc.h" -#include "ircd_defs.h" -#include "s_conf.h" -#include "hostmask.h" -#include "numeric.h" -#include "send.h" -#include "match.h" +#include +#include +#include +#include +#include +#include #ifdef RB_IPV6 static unsigned long hash_ipv6(struct sockaddr *, int); diff --git a/ircd/ircd.c b/ircd/ircd.c index c3c002be9..156f47506 100644 --- a/ircd/ircd.c +++ b/ircd/ircd.c @@ -23,48 +23,45 @@ * USA */ -#include "rb_lib.h" -#include "stdinc.h" -#include "setup.h" -#include "defaults.h" -#include "ircd.h" -#include "channel.h" -#include "class.h" -#include "client.h" -#include "hash.h" -#include "match.h" -#include "ircd_signal.h" -#include "msg.h" /* msgtab */ -#include "hostmask.h" -#include "numeric.h" -#include "parse.h" -#include "restart.h" -#include "s_conf.h" -#include "logger.h" -#include "s_serv.h" /* try_connections */ -#include "s_user.h" -#include "s_stats.h" -#include "scache.h" -#include "send.h" -#include "supported.h" -#include "whowas.h" -#include "modules.h" -#include "hook.h" -#include "ircd_getopt.h" -#include "newconf.h" -#include "reject.h" -#include "s_newconf.h" -#include "cache.h" -#include "monitor.h" -#include "patchlevel.h" -#include "serno.h" -#include "sslproc.h" -#include "wsproc.h" -#include "chmode.h" -#include "privilege.h" -#include "bandbi.h" -#include "authproc.h" -#include "operhash.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include /* msgtab */ +#include +#include +#include +#include +#include +#include +#include /* try_connections */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include static void ircd_die_cb(const char *str) __attribute__((noreturn)); diff --git a/ircd/ircd_lexer.l b/ircd/ircd_lexer.l index 46514cbfd..b2401a476 100644 --- a/ircd/ircd_lexer.l +++ b/ircd/ircd_lexer.l @@ -31,12 +31,12 @@ #define WE_ARE_MEMORY_C -#include "stdinc.h" -#include "ircd_defs.h" -#include "defaults.h" -#include "logger.h" -#include "s_conf.h" -#include "newconf.h" +#include +#include +#include +#include +#include +#include #include "ircd_parser.h" diff --git a/ircd/ircd_parser.y b/ircd/ircd_parser.y index 86ce21eb8..6951e91c5 100644 --- a/ircd/ircd_parser.y +++ b/ircd/ircd_parser.y @@ -11,13 +11,11 @@ #include #include #define WE_ARE_MEMORY_C -#include "stdinc.h" -#include "setup.h" -#include "ircd_defs.h" -#include "defaults.h" -#include "client.h" -#include "modules.h" -#include "newconf.h" +#include +#include +#include +#include +#include #define YY_NO_UNPUT diff --git a/ircd/ircd_signal.c b/ircd/ircd_signal.c index 2c4070c1f..8e4dec3ba 100644 --- a/ircd/ircd_signal.c +++ b/ircd/ircd_signal.c @@ -18,14 +18,14 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include "stdinc.h" -#include "ircd_signal.h" -#include "ircd.h" /* dorehash */ -#include "restart.h" /* server_reboot */ -#include "logger.h" -#include "s_conf.h" -#include "client.h" -#include "send.h" +#include +#include +#include /* dorehash */ +#include /* server_reboot */ +#include +#include +#include +#include #ifndef _WIN32 diff --git a/ircd/listener.c b/ircd/listener.c index ba4a11505..bfd03acc8 100644 --- a/ircd/listener.c +++ b/ircd/listener.c @@ -22,26 +22,24 @@ * USA */ -#include "stdinc.h" -#include "setup.h" -#include "listener.h" -#include "client.h" -#include "match.h" -#include "ircd.h" -#include "ircd_defs.h" -#include "numeric.h" -#include "s_conf.h" -#include "s_newconf.h" -#include "s_stats.h" -#include "send.h" -#include "authproc.h" -#include "reject.h" -#include "hostmask.h" -#include "sslproc.h" -#include "wsproc.h" -#include "hash.h" -#include "s_assert.h" -#include "logger.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #if defined(NO_IN6ADDR_ANY) && defined(RB_IPV6) static const struct in6_addr in6addr_any = diff --git a/ircd/logger.c b/ircd/logger.c index ff7697a40..915baae49 100644 --- a/ircd/logger.c +++ b/ircd/logger.c @@ -32,13 +32,12 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include "stdinc.h" -#include "ircd_defs.h" -#include "logger.h" -#include "s_conf.h" -#include "send.h" -#include "client.h" -#include "s_serv.h" +#include +#include +#include +#include +#include +#include static FILE *log_main; static FILE *log_user; diff --git a/ircd/main.c b/ircd/main.c deleted file mode 100644 index 16771ed48..000000000 --- a/ircd/main.c +++ /dev/null @@ -1,9 +0,0 @@ -/* This file is in the public domain. */ - -extern int charybdis_main(int argc, const char *argv[]); - -int -main(int argc, const char *argv[]) -{ - return charybdis_main(argc, argv); -} diff --git a/ircd/match.c b/ircd/match.c index 165baeabc..9ca2ca8b8 100644 --- a/ircd/match.c +++ b/ircd/match.c @@ -17,12 +17,12 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * */ -#include "stdinc.h" -#include "defaults.h" -#include "client.h" -#include "ircd.h" -#include "match.h" -#include "s_assert.h" +#include +#include +#include +#include +#include +#include /* * Compare if a given string (name) matches the given diff --git a/ircd/modules.c b/ircd/modules.c index 6e4b9e4fb..6f27a7091 100644 --- a/ircd/modules.c +++ b/ircd/modules.c @@ -22,20 +22,19 @@ * USA */ -#include "stdinc.h" -#include "modules.h" -#include "logger.h" -#include "ircd.h" -#include "client.h" -#include "send.h" -#include "s_conf.h" -#include "s_newconf.h" -#include "numeric.h" -#include "parse.h" -#include "ircd_defs.h" -#include "match.h" -#include "s_serv.h" -#include "capability.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include diff --git a/ircd/monitor.c b/ircd/monitor.c index ff15bcd4d..8125784e4 100644 --- a/ircd/monitor.c +++ b/ircd/monitor.c @@ -29,13 +29,12 @@ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ -#include "stdinc.h" -#include "client.h" -#include "monitor.h" -#include "hash.h" -#include "numeric.h" -#include "send.h" -#include "rb_radixtree.h" +#include +#include +#include +#include +#include +#include static rb_radixtree *monitor_tree; diff --git a/ircd/msgbuf.c b/ircd/msgbuf.c index 50538d270..8a249e719 100644 --- a/ircd/msgbuf.c +++ b/ircd/msgbuf.c @@ -19,11 +19,10 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include "stdinc.h" -#include "ircd_defs.h" -#include "msgbuf.h" -#include "client.h" -#include "ircd.h" +#include +#include +#include +#include /* * parse a message into a MsgBuf. diff --git a/ircd/newconf.c b/ircd/newconf.c index 0c89e2520..cc1a3caed 100644 --- a/ircd/newconf.c +++ b/ircd/newconf.c @@ -1,34 +1,33 @@ /* This code is in the public domain. */ -#include "stdinc.h" +#include #ifdef HAVE_LIBCRYPTO #include #include #endif -#include "newconf.h" -#include "ircd_defs.h" -#include "logger.h" -#include "s_conf.h" -#include "s_user.h" -#include "s_newconf.h" -#include "send.h" -#include "setup.h" -#include "modules.h" -#include "listener.h" -#include "hostmask.h" -#include "s_serv.h" -#include "hash.h" -#include "cache.h" -#include "ircd.h" -#include "snomask.h" -#include "sslproc.h" -#include "wsproc.h" -#include "privilege.h" -#include "chmode.h" -#include "certfp.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #define CF_TYPE(x) ((x) & CF_MTYPE) diff --git a/ircd/operhash.c b/ircd/operhash.c index 6d1948e6e..fbee05786 100644 --- a/ircd/operhash.c +++ b/ircd/operhash.c @@ -30,12 +30,10 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include -#include "stdinc.h" -#include "match.h" -#include "hash.h" -#include "operhash.h" -#include "rb_radixtree.h" +#include +#include +#include +#include static rb_radixtree *operhash_tree = NULL; diff --git a/ircd/packet.c b/ircd/packet.c index ef8de04d6..77210418e 100644 --- a/ircd/packet.c +++ b/ircd/packet.c @@ -21,17 +21,17 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ -#include "stdinc.h" -#include "s_conf.h" -#include "s_serv.h" -#include "client.h" -#include "ircd.h" -#include "parse.h" -#include "packet.h" -#include "match.h" -#include "hook.h" -#include "send.h" -#include "s_assert.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include static char readBuf[READBUF_SIZE]; static void client_dopacket(struct Client *client_p, char *buffer, size_t length); diff --git a/ircd/parse.c b/ircd/parse.c index d6f83b430..d8f34d615 100644 --- a/ircd/parse.c +++ b/ircd/parse.c @@ -23,23 +23,23 @@ * USA */ -#include "stdinc.h" -#include "parse.h" -#include "client.h" -#include "channel.h" -#include "hash.h" -#include "match.h" -#include "ircd.h" -#include "numeric.h" -#include "logger.h" -#include "s_stats.h" -#include "send.h" -#include "msg.h" -#include "msgbuf.h" -#include "s_conf.h" -#include "s_serv.h" -#include "packet.h" -#include "s_assert.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include rb_dictionary *cmd_dict = NULL; rb_dictionary *alias_dict = NULL; diff --git a/ircd/privilege.c b/ircd/privilege.c index d81bf8f3a..6c3216504 100644 --- a/ircd/privilege.c +++ b/ircd/privilege.c @@ -21,13 +21,13 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include -#include "s_conf.h" -#include "privilege.h" -#include "numeric.h" -#include "s_assert.h" -#include "logger.h" -#include "send.h" +#include +#include +#include +#include +#include +#include +#include static rb_dlink_list privilegeset_list = {NULL, NULL, 0}; diff --git a/ircd/ratelimit.c b/ircd/ratelimit.c index 80a3701c9..0c90d29be 100644 --- a/ircd/ratelimit.c +++ b/ircd/ratelimit.c @@ -21,11 +21,11 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include "stdinc.h" -#include "s_conf.h" -#include "s_stats.h" -#include "ratelimit.h" -#include "s_assert.h" +#include +#include +#include +#include +#include /* * ratelimit_client(struct Client *client_p, int penalty) diff --git a/ircd/reject.c b/ircd/reject.c index 90f4f1e84..081d86c43 100644 --- a/ircd/reject.c +++ b/ircd/reject.c @@ -21,18 +21,18 @@ * USA */ -#include "stdinc.h" -#include "client.h" -#include "s_conf.h" -#include "reject.h" -#include "s_stats.h" -#include "ircd.h" -#include "send.h" -#include "numeric.h" -#include "parse.h" -#include "hostmask.h" -#include "match.h" -#include "hash.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include static rb_patricia_tree_t *reject_tree; static rb_dlink_list delay_exit; diff --git a/ircd/restart.c b/ircd/restart.c index 2db2a2ec1..9bbf60244 100644 --- a/ircd/restart.c +++ b/ircd/restart.c @@ -22,14 +22,14 @@ * USA */ -#include "stdinc.h" -#include "restart.h" -#include "ircd.h" -#include "send.h" -#include "logger.h" -#include "s_conf.h" -#include "client.h" -#include "ircd_signal.h" +#include +#include +#include +#include +#include +#include +#include +#include /* external var */ extern char * const *myargv; diff --git a/ircd/s_conf.c b/ircd/s_conf.c index d907f05f9..f07745c7a 100644 --- a/ircd/s_conf.c +++ b/ircd/s_conf.c @@ -22,36 +22,35 @@ * USA */ -#include "stdinc.h" -#include "ircd_defs.h" -#include "s_conf.h" -#include "s_newconf.h" -#include "newconf.h" -#include "s_serv.h" -#include "s_stats.h" -#include "channel.h" -#include "class.h" -#include "client.h" -#include "hash.h" -#include "match.h" -#include "ircd.h" -#include "listener.h" -#include "hostmask.h" -#include "modules.h" -#include "numeric.h" -#include "logger.h" -#include "send.h" -#include "reject.h" -#include "cache.h" -#include "privilege.h" -#include "sslproc.h" -#include "wsproc.h" -#include "bandbi.h" -#include "operhash.h" -#include "chmode.h" -#include "hook.h" -#include "s_assert.h" -#include "authproc.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include struct config_server_hide ConfigServerHide; diff --git a/ircd/s_newconf.c b/ircd/s_newconf.c index 9ae02b571..8ff1ab795 100644 --- a/ircd/s_newconf.c +++ b/ircd/s_newconf.c @@ -30,21 +30,18 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include "stdinc.h" -#include "ircd_defs.h" -#include "s_conf.h" -#include "s_newconf.h" -#include "client.h" -#include "s_serv.h" -#include "send.h" -#include "hostmask.h" -#include "newconf.h" -#include "hash.h" -#include "rb_dictionary.h" -#include "rb_radixtree.h" -#include "s_assert.h" -#include "logger.h" -#include "dns.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include rb_dlink_list shared_conf_list; rb_dlink_list cluster_conf_list; diff --git a/ircd/s_serv.c b/ircd/s_serv.c index eba860ec2..e84a159b3 100644 --- a/ircd/s_serv.c +++ b/ircd/s_serv.c @@ -22,36 +22,37 @@ * USA */ -#include "stdinc.h" +#include #ifdef HAVE_LIBCRYPTO #include #endif -#include "s_serv.h" -#include "class.h" -#include "client.h" -#include "hash.h" -#include "match.h" -#include "ircd.h" -#include "ircd_defs.h" -#include "numeric.h" -#include "packet.h" -#include "s_conf.h" -#include "s_newconf.h" -#include "logger.h" -#include "s_stats.h" -#include "s_user.h" -#include "scache.h" -#include "send.h" -#include "client.h" -#include "channel.h" /* chcap_usage_counts stuff... */ -#include "hook.h" -#include "msg.h" -#include "reject.h" -#include "sslproc.h" -#include "capability.h" -#include "s_assert.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include /* chcap_usage_counts stuff... */ +#include +#include +#include +#include +#include +#include int MaxConnectionCount = 1; int MaxClientCount = 1; diff --git a/ircd/s_user.c b/ircd/s_user.c index 28f395222..610709d22 100644 --- a/ircd/s_user.c +++ b/ircd/s_user.c @@ -22,35 +22,35 @@ * USA */ -#include "stdinc.h" -#include "s_user.h" -#include "channel.h" -#include "class.h" -#include "client.h" -#include "hash.h" -#include "match.h" -#include "ircd.h" -#include "listener.h" -#include "msg.h" -#include "numeric.h" -#include "s_conf.h" -#include "s_newconf.h" -#include "logger.h" -#include "s_serv.h" -#include "s_stats.h" -#include "scache.h" -#include "send.h" -#include "supported.h" -#include "whowas.h" -#include "packet.h" -#include "reject.h" -#include "cache.h" -#include "hook.h" -#include "monitor.h" -#include "snomask.h" -#include "substitution.h" -#include "chmode.h" -#include "s_assert.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include static void report_and_set_user_flags(struct Client *, struct ConfItem *); void user_welcome(struct Client *source_p); diff --git a/ircd/scache.c b/ircd/scache.c index 93f5acdc7..c42edf473 100644 --- a/ircd/scache.c +++ b/ircd/scache.c @@ -22,16 +22,15 @@ * USA */ -#include "stdinc.h" -#include "client.h" -#include "match.h" -#include "ircd.h" -#include "numeric.h" -#include "send.h" -#include "scache.h" -#include "s_conf.h" -#include "s_assert.h" -#include "rb_radixtree.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include /* * ircd used to store full servernames in anUser as well as in the diff --git a/ircd/send.c b/ircd/send.c index 29f308581..ce36b3a7a 100644 --- a/ircd/send.c +++ b/ircd/send.c @@ -22,21 +22,20 @@ * USA */ -#include "stdinc.h" -#include "send.h" -#include "channel.h" -#include "class.h" -#include "client.h" -#include "match.h" -#include "ircd.h" -#include "numeric.h" -#include "s_serv.h" -#include "s_conf.h" -#include "s_newconf.h" -#include "logger.h" -#include "hook.h" -#include "monitor.h" -#include "msgbuf.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include /* send the message to the link the target is attached to */ #define send_linebuf(a,b) _send_linebuf((a->from ? a->from : a) ,b) diff --git a/ircd/snomask.c b/ircd/snomask.c index d3986c2b6..d8c3a57a6 100644 --- a/ircd/snomask.c +++ b/ircd/snomask.c @@ -31,9 +31,9 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include "stdinc.h" -#include "client.h" -#include "snomask.h" +#include +#include +#include /* *INDENT-OFF* */ int snomask_modes[256] = { diff --git a/ircd/sslproc.c b/ircd/sslproc.c index b8d551bbe..370b2b1a7 100644 --- a/ircd/sslproc.c +++ b/ircd/sslproc.c @@ -19,21 +19,18 @@ * USA */ -#include -#include "stdinc.h" - - -#include "s_conf.h" -#include "logger.h" -#include "listener.h" -#include "sslproc.h" -#include "s_serv.h" -#include "ircd.h" -#include "hash.h" -#include "client.h" -#include "send.h" -#include "packet.h" -#include "certfp.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #define ZIPSTATS_TIME 60 diff --git a/ircd/substitution.c b/ircd/substitution.c index 593bbd1d8..316ed727a 100644 --- a/ircd/substitution.c +++ b/ircd/substitution.c @@ -31,12 +31,12 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include "stdinc.h" -#include "s_user.h" -#include "snomask.h" -#include "match.h" -#include "substitution.h" -#include "s_assert.h" +#include +#include +#include +#include +#include +#include /* * Simple mappings for $foo -> 'bar'. diff --git a/ircd/supported.c b/ircd/supported.c index ab61f54fc..29b447253 100644 --- a/ircd/supported.c +++ b/ircd/supported.c @@ -70,15 +70,15 @@ * All unknown/unlisted modes are treated as type D. */ -#include "stdinc.h" -#include "client.h" -#include "numeric.h" -#include "ircd.h" -#include "s_conf.h" -#include "s_user.h" -#include "supported.h" -#include "chmode.h" -#include "send.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include rb_dlink_list isupportlist; diff --git a/ircd/tgchange.c b/ircd/tgchange.c index 0db3a1948..201847174 100644 --- a/ircd/tgchange.c +++ b/ircd/tgchange.c @@ -22,16 +22,16 @@ * USA */ -#include "stdinc.h" -#include "tgchange.h" -#include "channel.h" -#include "client.h" -#include "s_stats.h" -#include "hash.h" -#include "s_conf.h" -#include "s_newconf.h" -#include "s_serv.h" -#include "send.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include static int add_hashed_target(struct Client *source_p, uint32_t hashv); diff --git a/ircd/version.c b/ircd/version.c new file mode 100644 index 000000000..14c99a115 --- /dev/null +++ b/ircd/version.c @@ -0,0 +1,46 @@ +/* + * librb: a library used by charybdis and other things + * src/version.c + * + * Copyright (C) 1990 Chelsea Ashley Dyerman + * Copyright (C) 2008 ircd-ratbox development team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include + +const char *ircd_version = RB_VERSION; +const char *ircd_datestr = RB_DATESTR; +const time_t ircd_datecode = RB_DATECODE; + +const char *creation = RB_DATESTR; +const char *serno = RB_DATESTR; +const time_t datecode = RB_DATECODE; + +const char *infotext[] = +{ +"IRCd", +"Based on the original code written by Jarkko Oikarinen", +"Copyright (c) 1988-1991 University of Oulu, Computing Center", +"Copyright (c) 1996-2001 Hybrid Development Team", +"Copyright (c) 2002-2009 ircd-ratbox Development Team", +"Copyright (c) 2005-2016 charybdis development team", +" ", +"This program is free software; you can redistribute it and/or", +"modify it under the terms of the GNU General Public License as", +"published by the Free Software Foundation; either version 2, or", +"(at your option) any later version.", +}; diff --git a/ircd/version.c.SH b/ircd/version.c.SH deleted file mode 100644 index 1eccf4501..000000000 --- a/ircd/version.c.SH +++ /dev/null @@ -1,83 +0,0 @@ -#!/bin/sh - -spitshell=cat -package=charybdis - -echo "Extracting $package/src/version.c..." - -if test -r version.c.last -then - generation=`sed -n 's/^const char \*generation = \"\(.*\)\";/\1/p' < version.c.last` - if test ! "$generation" ; then generation=0; fi -else - generation=0 -fi - -generation=`expr $generation + 1` - -if test "$EXTERNAL_BUILD_TIMESTAMP" = ''; then - creation=`LC_ALL=C date | \ -awk '{if (NF == 6) \ - { print $1 " " $2 " " $3 " " $6 " at " $4 " " $5 } \ -else \ - { print $1 " " $2 " " $3 " " $7 " at " $4 " " $5 " " $6 }}'` -else - creation="$EXTERNAL_BUILD_TIMESTAMP" -fi - -$spitshell >version.c <> version.c -$spitshell >>version.c < +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include struct whowas_top { diff --git a/ircd/wsproc.c b/ircd/wsproc.c index 2a0d34ace..c6fb7f404 100644 --- a/ircd/wsproc.c +++ b/ircd/wsproc.c @@ -19,20 +19,17 @@ * USA */ -#include -#include "stdinc.h" - - -#include "s_conf.h" -#include "logger.h" -#include "listener.h" -#include "wsproc.h" -#include "s_serv.h" -#include "ircd.h" -#include "hash.h" -#include "client.h" -#include "send.h" -#include "packet.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include static void ws_read_ctl(rb_fde_t * F, void *data); static int wsockd_count; diff --git a/librb/COPYING b/librb/COPYING deleted file mode 100644 index ac131e6d9..000000000 --- a/librb/COPYING +++ /dev/null @@ -1,340 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. diff --git a/librb/CREDITS b/librb/CREDITS deleted file mode 100644 index e9715a517..000000000 --- a/librb/CREDITS +++ /dev/null @@ -1,2 +0,0 @@ -librb was based on ircd-ratbox's libratbox. This contains various utility -functions. See the CREDITS in Charybdis for more information. diff --git a/librb/Makefile.am b/librb/Makefile.am deleted file mode 100644 index 6b9a006ca..000000000 --- a/librb/Makefile.am +++ /dev/null @@ -1,22 +0,0 @@ -AUTOMAKE_OPTIONS = foreign - -SUBDIRS = src - -pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = librb.pc - -BUILT_SOURCES = include/serno.h - -# NOTE: you'll want to change the below if you are unbundling -include/serno.h: - @if [ -f ../include/serno.h ]; then \ - cp ../include/serno.h include/; \ - else \ - echo '#define SERNO "unknown"' >include/serno.h; \ - echo '#define DATECODE 0UL' >>include/serno.h; \ - fi - -clean-local: - rm -f include/serno.h - rm -f src/version.c - rm -f src/version.c.last diff --git a/librb/TODO b/librb/TODO deleted file mode 100644 index a008a86c4..000000000 --- a/librb/TODO +++ /dev/null @@ -1,2 +0,0 @@ -1. Make i/o loop engines interchangable at run time. -2. Finish TODO list diff --git a/librb/acinclude.m4 b/librb/acinclude.m4 deleted file mode 100644 index eaa270e06..000000000 --- a/librb/acinclude.m4 +++ /dev/null @@ -1,172 +0,0 @@ -AC_DEFUN([AC_DEFINE_DIR], [ - test "x$prefix" = xNONE && prefix="$ac_default_prefix" - test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - last_ac_define_dir=`eval echo [$]$2` - ac_define_dir=`eval echo [$]last_ac_define_dir` - ac_define_dir_counter=0 - while test "x[$]last_ac_define_dir" != "x[$]ac_define_dir"; do - last_ac_define_dir="[$]ac_define_dir" - ac_define_dir=`eval echo [$]last_ac_define_dir` - AS_VAR_ARITH([ac_define_dir_counter], [$ac_define_dir_counter + 1]) - AS_VAR_IF([ac_define_dir_counter], [128], - [AC_MSG_ERROR([detected recusive directory expansion when expanding $1=[$]$2: [$]ac_define_dir]) - break]) - done - $1="$ac_define_dir" - AC_SUBST($1) - ifelse($3, , - AC_DEFINE_UNQUOTED($1, "$ac_define_dir"), - AC_DEFINE_UNQUOTED($1, "$ac_define_dir", $3)) -]) - -AC_DEFUN([AC_SUBST_DIR], [ - ifelse($2,,,$1="[$]$2") - $1=`( - test "x$prefix" = xNONE && prefix="$ac_default_prefix" - test "x$exec_prefix" = xNONE && exec_prefix="${prefix}" - eval echo \""[$]$1"\" - )` - AC_SUBST($1) -]) - - -dnl IPv6 support macros..pretty much swiped from wget - -dnl RB_PROTO_INET6 - -AC_DEFUN([RB_PROTO_INET6],[ - AC_CACHE_CHECK([for INET6 protocol support], [rb_cv_proto_inet6],[ - AC_TRY_CPP([ -#ifndef _WIN32 -#include -#include -#else -#include -#include -#endif - -#ifndef PF_INET6 -#error Missing PF_INET6 -#endif -#ifndef AF_INET6 -#error Mlssing AF_INET6 -#endif - ],[ - rb_cv_proto_inet6=yes - ],[ - rb_cv_proto_inet6=no - ]) - ]) - - if test "X$rb_cv_proto_inet6" = "Xyes"; then : - $1 - else : - $2 - fi -]) - - -AC_DEFUN([RB_TYPE_STRUCT_SOCKADDR_IN6],[ - rb_have_sockaddr_in6= - AC_CHECK_TYPES([struct sockaddr_in6],[ - rb_have_sockaddr_in6=yes - ],[ - rb_have_sockaddr_in6=no - ],[ -#ifndef _WIN32 -#include -#include -#include -#else -#include -#include -#endif - ]) - - if test "X$rb_have_sockaddr_in6" = "Xyes"; then : - $1 - else : - $2 - fi -]) - - -AC_DEFUN([RB_CHECK_TIMER_CREATE], - [AC_CACHE_CHECK([for a working timer_create(CLOCK_REALTIME)], - [rb__cv_timer_create_works], - [AC_TRY_RUN([ -#ifdef HAVE_TIME_H -#include -#endif -#ifdef HAVE_SIGNAL_H -#include -#endif -#ifdef HAVE_UNISTD_H -#include -#endif -int main(int argc, char *argv[]) -{ -#if HAVE_TIMER_CREATE - struct sigevent ev; - timer_t timer; - ev.sigev_notify = SIGEV_SIGNAL; - ev.sigev_signo = SIGVTALRM; - if (timer_create(CLOCK_REALTIME, &ev, &timer) != 0) { - return 1; - } -#else - return 1; -#endif - return 0; -} - ], - [rb__cv_timer_create_works=yes], - [rb__cv_timer_create_works=no], - [rb__cv_timer_create_works=no]) - ]) -case $rb__cv_timer_create_works in - yes) AC_DEFINE([USE_TIMER_CREATE], 1, - [Define to 1 if we can use timer_create(CLOCK_REALTIME,...)]);; -esac -]) - - - -AC_DEFUN([RB_CHECK_TIMERFD_CREATE], - [AC_CACHE_CHECK([for a working timerfd_create(CLOCK_REALTIME)], - [rb__cv_timerfd_create_works], - [AC_TRY_RUN([ -#ifdef HAVE_TIME_H -#include -#endif -#ifdef HAVE_SIGNAL_H -#include -#endif -#ifdef HAVE_UNISTD_H -#include -#endif -#ifdef HAVE_SYS_TIMERFD_H -#include -#endif -int main(int argc, char *argv[]) -{ -#if defined(HAVE_TIMERFD_CREATE) && defined(HAVE_SYS_TIMERFD_H) - if (timerfd_create(CLOCK_REALTIME, 0) < 0) { - return 1; - } -#else - return 1; -#endif - return 0; -} - ], - [rb__cv_timerfd_create_works=yes], - [rb__cv_timerfd_create_works=no], - [rb__cv_timerfd_create_works=no]) - ]) -case $rb__cv_timerfd_create_works in - yes) AC_DEFINE([USE_TIMERFD_CREATE], 1, - [Define to 1 if we can use timerfd_create(CLOCK_REALTIME,...)]);; -esac -]) - diff --git a/librb/autogen.sh b/librb/autogen.sh deleted file mode 100755 index 11a107675..000000000 --- a/librb/autogen.sh +++ /dev/null @@ -1,89 +0,0 @@ -#! /bin/sh - -TOP_DIR=$(dirname $0) -LAST_DIR=$PWD - -if test ! -f $TOP_DIR/configure.ac ; then - echo "You must execute this script from the top level directory." - exit 1 -fi - -AUTOCONF=${AUTOCONF:-autoconf} -ACLOCAL=${ACLOCAL:-aclocal} -AUTOMAKE=${AUTOMAKE:-automake} -AUTOHEADER=${AUTOHEADER:-autoheader} -LIBTOOLIZE=${LIBTOOLIZE:-libtoolize} -#SHTOOLIZE=${SHTOOLIZE:-shtoolize} - -dump_help_screen () -{ - echo "Usage: $0 [options]" - echo - echo "options:" - echo " -n skip CVS changelog creation" - echo " -h,--help show this help screen" - echo - exit 0 -} - -parse_options () -{ - while test "$1" != "" ; do - case $1 in - -h|--help) - dump_help_screen - ;; - -n) - SKIP_CVS_CHANGELOG=yes - ;; - *) - echo Invalid argument - $1 - dump_help_screen - ;; - esac - shift - done -} - -run_or_die () -{ - COMMAND=$1 - - # check for empty commands - if test -z "$COMMAND" ; then - echo "*warning* no command specified" - return 1 - fi - - shift; - - OPTIONS="$@" - - # print a message - echo -n "*info* running $COMMAND" - if test -n "$OPTIONS" ; then - echo " ($OPTIONS)" - else - echo - fi - - # run or die - $COMMAND $OPTIONS ; RESULT=$? - if test $RESULT -ne 0 ; then - echo "*error* $COMMAND failed. (exit code = $RESULT)" - exit 1 - fi - - return 0 -} - -parse_options "$@" - -cd $TOP_DIR - -run_or_die $ACLOCAL -I ../m4 -run_or_die $LIBTOOLIZE --force --copy -run_or_die $AUTOHEADER -run_or_die $AUTOCONF -run_or_die $AUTOMAKE --add-missing --copy -#run_or_die $SHTOOLIZE all diff --git a/librb/configure.ac b/librb/configure.ac deleted file mode 100644 index 13ea7d192..000000000 --- a/librb/configure.ac +++ /dev/null @@ -1,698 +0,0 @@ -dnl Process this file with autoconf to produce a configure script. - -dnl TODO: clean up all the OpenSSL and shared module checking stuff; -dnl the most major changes have already been made and it looks like -dnl said functions need to be just about as complex as they already are. - -AC_PREREQ(2.63) -AUTOMAKE_OPTIONS = 1.10 -dnl Sneaky way to get an Id tag into the configure script -AC_INIT([librb],[devel]) -AM_INIT_AUTOMAKE([subdir-objects]) -AM_SILENT_RULES([yes]) - -AM_CONFIG_HEADER(include/librb_config.h) - -AC_PREFIX_DEFAULT(/usr/local/librb) -AC_GNU_SOURCE - -dnl Checks for programs. -AC_PROG_CC_C99 - -if test x"$ac_cv_prog_cc_c99" = "xno"; then - AC_ERROR([charybdis requires a C99 capable compiler]) -fi - -AC_PROG_CXX -AX_CXX_COMPILE_STDCXX_14([ext], [mandatory]) - -AC_PROG_INSTALL -AC_PROG_EGREP -AC_PROG_SED - -F77=no -GCJ=no - -AM_DISABLE_STATIC -AM_ENABLE_SHARED -AM_MAINTAINER_MODE - -AC_ISC_POSIX -AC_C_INLINE -AC_C_CONST -AC_C_BIGENDIAN -AC_PROG_MAKE_SET -AC_PROG_INSTALL -AC_PATH_PROG(AUTOMAKE, automake) -AC_PATH_PROG(ACLOCAL, aclocal) -AC_PATH_PROG(AUTOHEADER, autoheader) -AC_PATH_PROG(AS, as) -AC_PATH_PROG(RM, rm) -AC_PATH_PROG(CP, cp) -AC_PATH_PROG(MV, mv) -AC_PATH_PROG(LN, ln) -AC_PATH_PROG(TOUCH, touch) -AC_LANG(C) - -AC_PROG_LIBTOOL - -LIBTOOL="$LIBTOOL --silent" - -case "$host_os" in -*cygwin*) - AC_DEFINE_UNQUOTED(CYGWIN,1,[This is a Cygwin system]) - AC_DEFINE_UNQUOTED(WINDOWS,1,[This is a Windows system]) - ;; -*mingw* | *msys*) - AC_DEFINE_UNQUOTED(MINGW,1,[This is a MinGW system]) - AC_DEFINE_UNQUOTED(WINDOWS,1,[This is a Windows system]) - AC_CHECK_HEADER(windows.h, , [AC_MSG_ERROR([** MinGW and no windows.h. I give up.])]) - AC_CHECK_HEADER(winsock2.h, , [AC_MSG_ERROR([** MinGW and no winsock2.h. I give up.])]) - AC_DEFINE_UNQUOTED(HAVE_WINSOCK2_H, 1, [Have WINSOCK2_H]) - AC_DEFINE_UNQUOTED(HAVE_WINSOCK_H, 1, [Have WINSOCK_H]) - LIBS="$LIBS -lws2_32 -liphlpapi" - is_mingw="yes" - ;; -*interix*) - CPPFLAGS="$CFLAGS -D_ALL_SOURCE -D_XOPEN_SOURCE=500" - ;; -*solaris*) - CPPFLAGS="$CFLAGS -D_POSIX_PTHREAD_SEMANTICS -D_XPG4_2" - ;; -*) - ;; -esac - -AM_CONDITIONAL([MINGW], [test "$is_mingw" = "yes"]) - - -# backwards support for IRC_CFLAGS -CFLAGS="$IRC_CFLAGS $CFLAGS -Wall" - -dnl use directory structure of cached as default (hack) -if test "$libexecdir" = '${exec_prefix}/libexec' && - test "$localstatedir" = '${prefix}/var'; then - libexecdir='${bindir}' - localstatedir='${prefix}' -fi - -AC_TYPE_PID_T -AC_TYPE_SIZE_T -AC_TYPE_SSIZE_T -AC_TYPE_UID_T - - -dnl Checks for header files. -AC_HEADER_STDC - -AC_CHECK_HEADERS([crypt.h unistd.h sys/socket.h sys/stat.h sys/time.h time.h netinet/in.h netinet/tcp.h arpa/inet.h errno.h sys/uio.h spawn.h sys/poll.h sys/epoll.h sys/select.h sys/devpoll.h sys/event.h port.h signal.h sys/signalfd.h sys/timerfd.h execinfo.h]) -AC_HEADER_TIME - -dnl Networking Functions -dnl ==================== - -AC_SEARCH_LIBS(socket, [socket],,) - - -AC_CHECK_MEMBER([struct sockaddr.sa_len], [AC_DEFINE(SOCKADDR_IN_HAS_LEN, 1, [Define to 1 if sockaddr has a 'sa_len' -member.])],,[[ -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_SYS_SOCKET_H -#include -#endif -#ifdef HAVE_WINSOCK2_H -#include -#endif -]]) - -AC_CHECK_TYPE([socklen_t], rb_cv_socklen_t=socklen_t,[ - AC_MSG_CHECKING([for socklen_t equivalent]) - AC_CACHE_VAL([rb_cv_socklen_t], - [ - # Systems have either "struct sockaddr *" or - # "void *" as the second argument to getpeername - rb_cv_socklen_t= - for arg2 in "struct sockaddr" void; do - for t in int size_t unsigned long "unsigned long"; do - AC_TRY_COMPILE([ -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_SYS_SOCKET_H -#include -#endif -#ifdef HAVE_WINSOCK2_H -#include -#include -#endif -int getpeername (int, $arg2 *, $t *); -],[ -$t len; -getpeername(0,0,&len); -],[ - rb_cv_socklen_t="$t" - break -]) - done - done - - if test "x$rb_cv_socklen_t" = x; then - AC_MSG_WARN([Cannot find a type to use in place of socklen_t using int]) - rb_cv_socklen_t=int - fi - ]) - AC_MSG_RESULT($rb_cv_socklen_t)], - [#include -#include ]) - -rb_socklen_t=$rb_cv_socklen_t - - - - - -AC_ARG_ENABLE(ipv6,AC_HELP_STRING([--disable-ipv6],[Disable IPv6 support]),[ipv6=$enableval],[ipv6=yes]) - -if test x$ipv6 != xyes; then - have_v6="no" -else - -have_v6=yes -RB_PROTO_INET6([], [ - AC_MSG_NOTICE([Disabling IPv6 support: PF_INET6 not found]) - have_v6=no - ]) - - if test "X$have_v6" = "Xyes"; then - RB_TYPE_STRUCT_SOCKADDR_IN6([], [ - AC_MSG_NOTICE([Disabling IPv6 support: struct sockaddr_in6 not found]) - have_v6=no - ]) - fi - -fi - -AC_CHECK_TYPES([struct sockaddr_storage],[ - rb_have_sockaddr_storage=yes - ],[], [ - #include - #include - ]) - - -dnl Check for stdarg.h - if we cant find it, halt configure -AC_CHECK_HEADER(stdarg.h, , [AC_MSG_ERROR([** stdarg.h could not be found - librb will not compile without it **])]) - -AC_CHECK_TYPE([sa_family_t], [], -[AC_DEFINE(sa_family_t, [u_int16_t], [If system does not define sa_family_t, define it here.])], -[[#include -#include ]]) - - -dnl check for various functions... -AC_CHECK_FUNCS([snprintf vsnprintf socketpair gettimeofday writev sendmsg gmtime_r strtok_r usleep posix_spawn getexecname strlcpy strlcat strnlen strcasestr strcasecmp strncasecmp fstat signalfd select poll kevent port_create epoll_ctl arc4random getrusage timerfd_create]) - -AC_SEARCH_LIBS(dlinfo, dl, AC_DEFINE(HAVE_DLINFO, 1, [Define if you have dlinfo])) -AC_SEARCH_LIBS(nanosleep, rt posix4, AC_DEFINE(HAVE_NANOSLEEP, 1, [Define if you have nanosleep])) -AC_SEARCH_LIBS(timer_create, rt, AC_DEFINE(HAVE_TIMER_CREATE, 1, [Define if you have timer_create])) -RB_CHECK_TIMER_CREATE -RB_CHECK_TIMERFD_CREATE - -AC_FUNC_ALLOCA -AC_FUNC_VFORK -AC_FUNC_MMAP - -AC_MSG_CHECKING(for /dev/poll) -if test -c "/dev/poll"; then - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_DEVPOLL, [1], [Define to 1 if you have devpoll]) -else - AC_MSG_RESULT(no) -fi - - -if test "$is_mingw" = "yes"; then - AC_DEFINE(HAVE_WIN32, [1], [Define to 1 if you are on windows]) -fi - - -dnl OpenSSL support -AC_MSG_CHECKING(for OpenSSL) -AC_ARG_ENABLE(openssl, -[AC_HELP_STRING([--enable-openssl[=DIR]],[Enable OpenSSL support (DIR optional).]) -AC_HELP_STRING([--disable-openssl],[Disable OpenSSL support.])], -[cf_enable_openssl=$enableval], -[cf_enable_openssl="auto"]) - -if test "$cf_enable_openssl" != "no" ; then - cf_openssl_basedir="" - if test "$cf_enable_openssl" != "auto" && - test "$cf_enable_openssl" != "yes" ; then - dnl Support for --enable-openssl=/some/place - cf_openssl_basedir="`echo ${cf_enable_openssl} | sed 's/\/$//'`" - else - dnl Do the auto-probe here. Check some common directory paths. - for dirs in /usr/local/ssl /usr/pkg /usr/local \ - /usr/local/openssl ; do - if test -f "${dirs}/include/openssl/opensslv.h" ; then - cf_openssl_basedir="${dirs}" - break - fi - done - unset dirs - fi - dnl Now check cf_openssl_found to see if we found anything. - if test ! -z "$cf_openssl_basedir"; then - if test -f "${cf_openssl_basedir}/include/openssl/opensslv.h" ; then - SSL_CFLAGS="-I${cf_openssl_basedir}/include" - SSL_LIBS="-L${cf_openssl_basedir}/lib" - else - dnl OpenSSL wasn't found in the directory specified. Naughty - dnl administrator... - cf_openssl_basedir="" - fi - else - dnl Check for stock FreeBSD 4.x and 5.x systems, since their files - dnl are in /usr/include and /usr/lib. In this case, we don't want to - dnl change INCLUDES or LIBS, but still want to enable OpenSSL. - dnl We can't do this check above, because some people want two versions - dnl of OpenSSL installed (stock FreeBSD 4.x/5.x and /usr/local/ssl) - dnl and they want /usr/local/ssl to have preference. - if test -f "/usr/include/openssl/opensslv.h" ; then - cf_openssl_basedir="/usr" - fi - fi - - dnl If we have a basedir defined, then everything is okay. Otherwise, - dnl we have a problem. - if test ! -z "$cf_openssl_basedir"; then - AC_MSG_RESULT($cf_openssl_basedir) - cf_enable_openssl="yes" - else - AC_MSG_RESULT([not found. Specify a correct path?]) - cf_enable_openssl="no" - fi - unset cf_openssl_basedir -else - dnl If --disable-openssl was specified - AC_MSG_RESULT(disabled) -fi - -save_CPPFLAGS="$CPPFLAGS" -CPPFLAGS="$CPPFLAGS $SSL_CFLAGS" -save_LIBS="$LIBS" -LIBS="$LIBS $SSL_LIBS" -if test "$cf_enable_openssl" != no; then - dnl Check OpenSSL version (must be 0.9.7 or above!) - AC_MSG_CHECKING(for OpenSSL 0.9.7 or above) - AC_RUN_IFELSE( - [AC_LANG_PROGRAM( - [#include - #include ], - [[if (OPENSSL_VERSION_NUMBER >= 0x00907000) - exit(0); else exit(1);]])], - cf_enable_openssl=yes, - cf_enable_openssl=no, - cf_enable_openssl=no) - - if test "$cf_enable_openssl" != no; then - AC_MSG_RESULT(found) - else - AC_MSG_RESULT(no - OpenSSL support disabled) - fi - -fi - - -if test "$cf_enable_openssl" != no; then - CPPFLAGS="$CPPFLAGS $SSL_LIBS" - AC_CHECK_LIB(crypto, RAND_status, - [cf_enable_openssl=yes], - [cf_enable_openssl=no]) -fi - -if test "$cf_enable_openssl" != no; then - CPPFLAGS="$CPPFLAGS $SSL_LIBS" - AC_CHECK_LIB(ssl, SSL_read, - [SSL_LIBS="$SSL_LIBS -lssl -lcrypto"], - [cf_enable_openssl=no], [-lcrypto]) -fi - - -dnl mbedTLS support -AC_ARG_ENABLE(mbedtls, -[AC_HELP_STRING([--enable-mbedtls], [Enable mbedTLS support.]) -AC_HELP_STRING([--disable-mbedtls], [Disable mbedTLS support.])], -[cf_enable_mbedtls=$enableval], -[cf_enable_mbedtls="auto"]) - -if test "$cf_enable_mbedtls" != no; then - save_CPPFLAGS="$CPPFLAGS" - save_LIBS="$LIBS" - LIBS="$LIBS $MBEDTLS_LIBS" - AC_CHECK_LIB(mbedtls, mbedtls_ssl_init, [ - MBEDTLS_LIBS="$MBEDTLS_LIBS -lmbedtls -lmbedx509 -lmbedcrypto" - cf_enable_mbedtls=yes - ], [cf_enable_mbedtls=no], [-lmbedx509 -lmbedcrypto]) -fi - -dnl GnuTLS support -AC_MSG_CHECKING(for GnuTLS) -AC_ARG_ENABLE(gnutls, -[AC_HELP_STRING([--enable-gnutls],[Enable GnuTLS support.]) -AC_HELP_STRING([--disable-gnutls],[Disable GnuTLS support.])], -[cf_enable_gnutls=$enableval], -[cf_enable_gnutls="auto"]) - -if test "$cf_enable_gnutls" != no; then - PKG_CHECK_MODULES(GNUTLS, [gnutls], [ - cf_enable_gnutls="yes" - ], [cf_enable_gnutls="no"]) -fi - -dnl mbed TLS is given highest preference when no specified TLS library is provided -if test "$cf_enable_openssl" = "auto" -a "$cf_enable_mbedtls" = "yes"; then - cf_enable_openssl="no" -fi - -if test "$cf_enable_gnutls" = "auto" -a "$cf_enable_openssl" = "yes" -a "$cf_enable_mbedtls" = "yes"; then - cf_enable_gnutls="no" -fi - -if test x"$cf_enable_openssl" != xno; then - AC_DEFINE(HAVE_OPENSSL,1,[Has OpenSSL]) - GNUTLS_CFLAGS="" - GNUTLS_LIBS="" - MBEDTLS_LIBS="" - MBEDTLS_CFLAGS="" - SSL_TYPE="openssl" -elif test x"$cf_enable_mbedtls" != xno; then - AC_DEFINE(HAVE_MBEDTLS, 1, [Has mbedTLS]) - SSL_LIBS="" - SSL_CFLAGS="" - GNUTLS_CFLAGS="" - GNUTLS_LIBS="" - SSL_TYPE="mbedtls" -elif test x"$cf_enable_gnutls" != xno; then - AC_DEFINE(HAVE_GNUTLS, 1, [Has GnuTLS]) - SSL_LIBS="" - SSL_CFLAGS="" - MBEDTLS_LIBS="" - MBEDTLS_CFLAGS="" - SSL_TYPE="gnutls" -fi - - - - -CPPFLAGS="$save_CPPFLAGS" -LIBS="$save_LIBS" - -dnl End OpenSSL detection - - - - -dnl Debug-related options -dnl ===================== - -AC_ARG_ENABLE(assert, -AC_HELP_STRING([--enable-assert],[Enable assert(). Choose between soft(warnings) and hard(aborts the daemon)]), -[assert=$enableval], [assert=no]) - -if test "$assert" = no; then - AC_DEFINE(NDEBUG, 1, [Define this to disable debugging support.]) -elif test "$assert" = soft; then - AC_DEFINE(SOFT_ASSERT, 1, [Define this to enable soft asserts.]) - AC_DEFINE(NDEBUG, 1, [Define this to disable debugging support.]) -elif test "$assert" = yes; then - assert = "hard"; -fi - -AC_MSG_CHECKING(if you want to do a profile build) -AC_ARG_ENABLE(profile, -AC_HELP_STRING([--enable-profile],[Enable profiling]), -[profile=$enableval], [profile=no]) - -if test "$profile" = yes; then - if test "$ac_cv_c_compiler_gnu" = yes; then - CFLAGS="$CFLAGS -pg -static" - AC_MSG_RESULT([yes, adding -pg -static]) - AC_DEFINE(RB_PROFILE, 1, [Defined to mark profiling is enabled]) - else - AC_MSG_RESULT([no, profile builds only work with gcc]) - fi -else - AC_MSG_RESULT(no) -fi - -AC_ARG_ENABLE(warnings, -AC_HELP_STRING([--enable-warnings],[Enable all sorts of warnings for debugging.]), -[CFLAGS="$CFLAGS -Wall -Werror -Wcast-qual -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wshadow -Wwrite-strings -W -Wno-unused -Wunused-function -Wunused-variable"],[]) - -AC_SUBST(LDFLAGS) -AC_SUBST(PICFLAGS) -AC_SUBST(CFLAGS) -AC_SUBST(SEDOBJ) -AC_SUBST(SSL_CFLAGS) -AC_SUBST(SSL_LIBS) -AC_SUBST(GNUTLS_CFLAGS) -AC_SUBST(GNUTLS_LIBS) -AC_SUBST(MBEDTLS_CFLAGS) -AC_SUBST(MBEDTLS_LIBS) - -if test "$prefix" = "NONE"; then - AC_DEFINE_UNQUOTED(RB_PREFIX, "$ac_default_prefix", [Prefix where librb is installed.]) - -else - -dnl Don't get bitten by Cygwin's stupidity if the user specified -dnl a custom prefix with a trailing slash - - prefix=`echo $prefix | sed 's/\/$//'` - AC_DEFINE_UNQUOTED(RB_PREFIX, "$prefix", [Prefix where librb is installed.]) - -fi - -AC_SUBST(RB_PREFIX) - -AC_CONFIG_COMMANDS([include/librb-config.h], -[ - outfile=include/librb-config.h.tmp - cat > $outfile <<\_______EOF -/* - * librb-config.h: librb config file. Please modify configure.ac - */ - -#ifndef __LIBRB_CONFIG_H -#define __LIBRB_CONFIG_H - -_______EOF - -if test "x$rb_have_ipv6" = "xyes"; then - echo "#define RB_IPV6 1" >> $outfile -fi - -if test "x$rb_windows_h" = "xyes"; then - echo '#define WIN32_LEAN_AND_MEAN 1' >> $outfile - echo '#include ' >> $outfile - echo '#include ' >> $outfile - echo '#include ' >> $outfile - echo '#include ' >> $outfile -fi - -if test "x$rb_alloca_h" = "xyes"; then - echo '#define RB_HAVE_ALLOCA_H 1' >> $outfile -fi - -if test "x$rb_header_stdc" = "xyes"; then - echo '#include ' >> $outfile - echo '#include ' >> $outfile -elif test "x$rb_header_stdlib" = "xyes"; then - echo '#include ' >> $outfile -fi - -if test "x$rb_header_string_h" = "xyes"; then - echo '#include ' >> $outfile -fi - -if test "x$rb_stdint_h" = "xyes"; then - echo '#include ' >> $outfile -fi - -if test "x$rb_inttypes_h" = "xyes"; then - echo '#include ' >> $outfile -fi - -if test "x$rb_sys_types_h" = "xyes"; then - echo '#include ' >> $outfile -fi -if test "x$rb_sys_time_h" = "xyes"; then - echo '#include ' >> $outfile -fi -if test "x$rb_sys_stat_h" = "xyes"; then - echo '#include ' >> $outfile -fi -if test "x$rb_time_h" = "xyes"; then - echo '#include ' >> $outfile -fi - -if test "x$rb_sys_socket_h" = "xyes"; then - echo '#include ' >> $outfile -fi - -if test "x$rb_netinet_in_h" = "xyes"; then - echo '#include ' >> $outfile -fi - -if test "x$rb_netinet_tcp_h" == "xyes"; then - echo '#include ' >> $outfile -fi - -if test "x$rb_arpa_inet_h" = "xyes"; then - echo '#include ' >> $outfile -fi - -if test "x$rb_unistd_h" = "xyes"; then - echo '#include ' >> $outfile -fi - -if test "x$rb_crypt_h" = "xyes"; then - echo '#include ' >> $outfile -fi - -if test "x$rb_errno_h" = "xyes"; then - echo '#include ' >> $outfile -fi - -echo "typedef $rb_socklen_t rb_socklen_t;" >> $outfile - - -if test "x$rb_sockaddr_sa_len" = "xyes"; then - echo '#define RB_SOCKADDR_HAS_SA_LEN 1' >> $outfile -fi - -if test "x$rb_sockaddr_storage" = "xyes"; then - echo '#define rb_sockaddr_storage sockaddr_storage' >> $outfile -else - echo 'struct rb_sockaddr_storage { uint8_t _padding[[128]]; };' >> $outfile -fi - -cat >> $outfile <<\_______EOF -#endif /* __LIBRB_CONFIG_H */ -_______EOF - -if cmp -s $outfile include/librb-config.h; then - AC_MSG_NOTICE([include/librb-config.h is unchanged]) - ${rb_rm} -f $outfile -else - ${rb_mv} $outfile include/librb-config.h -fi - -],[ - if test x$ac_cv_header_stdc = xyes; then - rb_header_stdc=yes - fi - if test x$ac_cv_header_stdlib_h = xyes; then - rb_header_stdlib_h=yes - fi - if test x$ac_cv_header_string_h = xyes; then - rb_header_string_h=yes - fi - if test x$ac_cv_header_memory_h = xyes; then - rb_header_memory_h=yes - fi - if test "x${ac_cv_working_alloca_h+set}" = xset ; then - rb_alloca_h="$ac_cv_working_alloca_h" - else - rb_alloc_h="$ac_cv_header_alloca_h" - fi - if test x$ac_cv_member_struct_sockaddr_sa_len = xyes; then - rb_sockaddr_sa_len=yes - fi - if test x$ac_cv_header_sys_socket_h = xyes; then - rb_sys_socket_h=yes - fi - if test x$ac_cv_header_sys_types_h = xyes; then - rb_sys_types_h=yes - fi - if test x$ac_cv_header_sys_stat_h = xyes; then - rb_sys_stat_h=yes - fi - if test x$ac_cv_header_sys_time_h = xyes; then - rb_sys_time_h=yes - fi - if test x$ac_cv_header_time = xyes; then - rb_time_h=yes - fi - - if test x$ac_cv_header_stdint_h = xyes; then - rb_stdint_h=yes - fi - if test x$ac_cv_header_inttypes_h = xyes; then - rb_inttypes_h=yes - fi - if test x$ac_cv_header_netinet_in_h = xyes; then - rb_netinet_in_h=yes - fi - if test x$ac_cv_header_netinet_tcp_h = xyes; then - rb_netinet_tcp_h=yes - fi - - if test x$ac_cv_header_crypt_h = xyes; then - rb_crypt_h=yes - fi - if test x$ac_cv_header_errno_h = xyes; then - rb_errno_h=yes - fi - if test x$ac_cv_header_unistd_h = xyes; then - rb_unistd_h=yes - fi - if test x$ac_cv_header_windows_h = xyes; then - rb_windows_h=yes - fi - if test x$ac_cv_header_winsock2_h = xyes; then - rb_winsock2_h=yes - fi - - rb_socklen_t=$rb_socklen_t - - if test "x$rb_have_sockaddr_storage" = "xyes"; then - rb_sockaddr_storage="yes" - else - rb_sockaddr_storage="no" - fi - - rb_have_ipv6="$have_v6" - - rb_mv="$MV" - rb_rm="$RM" - -] - - -) - - -AC_CONFIG_FILES( \ - src/Makefile \ - Makefile \ - librb.pc -) - -AC_OUTPUT - -dnl Make it look sexay! - -echo -echo "Compiling $PACKAGE_NAME $PACKAGE_VERSION" -echo - -echo "Installing into: $prefix" - -echo "IPv6 support ................... $have_v6" -echo "Assert debugging ............... $assert" -echo "SSL Type........................ $SSL_TYPE" -echo diff --git a/librb/install-sh b/librb/install-sh deleted file mode 100755 index 0b0fdcbba..000000000 --- a/librb/install-sh +++ /dev/null @@ -1,501 +0,0 @@ -#!/bin/sh -# install - install a program, script, or datafile - -scriptversion=2013-12-25.23; # UTC - -# This originates from X11R5 (mit/util/scripts/install.sh), which was -# later released in X11R6 (xc/config/util/install.sh) with the -# following copyright and license. -# -# Copyright (C) 1994 X Consortium -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to -# deal in the Software without restriction, including without limitation the -# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -# sell copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- -# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -# -# Except as contained in this notice, the name of the X Consortium shall not -# be used in advertising or otherwise to promote the sale, use or other deal- -# ings in this Software without prior written authorization from the X Consor- -# tium. -# -# -# FSF changes to this file are in the public domain. -# -# Calling this script install-sh is preferred over install.sh, to prevent -# 'make' implicit rules from creating a file called install from it -# when there is no Makefile. -# -# This script is compatible with the BSD install script, but was written -# from scratch. - -tab=' ' -nl=' -' -IFS=" $tab$nl" - -# Set DOITPROG to "echo" to test this script. - -doit=${DOITPROG-} -doit_exec=${doit:-exec} - -# Put in absolute file names if you don't have them in your path; -# or use environment vars. - -chgrpprog=${CHGRPPROG-chgrp} -chmodprog=${CHMODPROG-chmod} -chownprog=${CHOWNPROG-chown} -cmpprog=${CMPPROG-cmp} -cpprog=${CPPROG-cp} -mkdirprog=${MKDIRPROG-mkdir} -mvprog=${MVPROG-mv} -rmprog=${RMPROG-rm} -stripprog=${STRIPPROG-strip} - -posix_mkdir= - -# Desired mode of installed file. -mode=0755 - -chgrpcmd= -chmodcmd=$chmodprog -chowncmd= -mvcmd=$mvprog -rmcmd="$rmprog -f" -stripcmd= - -src= -dst= -dir_arg= -dst_arg= - -copy_on_change=false -is_target_a_directory=possibly - -usage="\ -Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE - or: $0 [OPTION]... SRCFILES... DIRECTORY - or: $0 [OPTION]... -t DIRECTORY SRCFILES... - or: $0 [OPTION]... -d DIRECTORIES... - -In the 1st form, copy SRCFILE to DSTFILE. -In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. -In the 4th, create DIRECTORIES. - -Options: - --help display this help and exit. - --version display version info and exit. - - -c (ignored) - -C install only if different (preserve the last data modification time) - -d create directories instead of installing files. - -g GROUP $chgrpprog installed files to GROUP. - -m MODE $chmodprog installed files to MODE. - -o USER $chownprog installed files to USER. - -s $stripprog installed files. - -t DIRECTORY install into DIRECTORY. - -T report an error if DSTFILE is a directory. - -Environment variables override the default commands: - CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG - RMPROG STRIPPROG -" - -while test $# -ne 0; do - case $1 in - -c) ;; - - -C) copy_on_change=true;; - - -d) dir_arg=true;; - - -g) chgrpcmd="$chgrpprog $2" - shift;; - - --help) echo "$usage"; exit $?;; - - -m) mode=$2 - case $mode in - *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*) - echo "$0: invalid mode: $mode" >&2 - exit 1;; - esac - shift;; - - -o) chowncmd="$chownprog $2" - shift;; - - -s) stripcmd=$stripprog;; - - -t) - is_target_a_directory=always - dst_arg=$2 - # Protect names problematic for 'test' and other utilities. - case $dst_arg in - -* | [=\(\)!]) dst_arg=./$dst_arg;; - esac - shift;; - - -T) is_target_a_directory=never;; - - --version) echo "$0 $scriptversion"; exit $?;; - - --) shift - break;; - - -*) echo "$0: invalid option: $1" >&2 - exit 1;; - - *) break;; - esac - shift -done - -# We allow the use of options -d and -T together, by making -d -# take the precedence; this is for compatibility with GNU install. - -if test -n "$dir_arg"; then - if test -n "$dst_arg"; then - echo "$0: target directory not allowed when installing a directory." >&2 - exit 1 - fi -fi - -if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then - # When -d is used, all remaining arguments are directories to create. - # When -t is used, the destination is already specified. - # Otherwise, the last argument is the destination. Remove it from $@. - for arg - do - if test -n "$dst_arg"; then - # $@ is not empty: it contains at least $arg. - set fnord "$@" "$dst_arg" - shift # fnord - fi - shift # arg - dst_arg=$arg - # Protect names problematic for 'test' and other utilities. - case $dst_arg in - -* | [=\(\)!]) dst_arg=./$dst_arg;; - esac - done -fi - -if test $# -eq 0; then - if test -z "$dir_arg"; then - echo "$0: no input file specified." >&2 - exit 1 - fi - # It's OK to call 'install-sh -d' without argument. - # This can happen when creating conditional directories. - exit 0 -fi - -if test -z "$dir_arg"; then - if test $# -gt 1 || test "$is_target_a_directory" = always; then - if test ! -d "$dst_arg"; then - echo "$0: $dst_arg: Is not a directory." >&2 - exit 1 - fi - fi -fi - -if test -z "$dir_arg"; then - do_exit='(exit $ret); exit $ret' - trap "ret=129; $do_exit" 1 - trap "ret=130; $do_exit" 2 - trap "ret=141; $do_exit" 13 - trap "ret=143; $do_exit" 15 - - # Set umask so as not to create temps with too-generous modes. - # However, 'strip' requires both read and write access to temps. - case $mode in - # Optimize common cases. - *644) cp_umask=133;; - *755) cp_umask=22;; - - *[0-7]) - if test -z "$stripcmd"; then - u_plus_rw= - else - u_plus_rw='% 200' - fi - cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; - *) - if test -z "$stripcmd"; then - u_plus_rw= - else - u_plus_rw=,u+rw - fi - cp_umask=$mode$u_plus_rw;; - esac -fi - -for src -do - # Protect names problematic for 'test' and other utilities. - case $src in - -* | [=\(\)!]) src=./$src;; - esac - - if test -n "$dir_arg"; then - dst=$src - dstdir=$dst - test -d "$dstdir" - dstdir_status=$? - else - - # Waiting for this to be detected by the "$cpprog $src $dsttmp" command - # might cause directories to be created, which would be especially bad - # if $src (and thus $dsttmp) contains '*'. - if test ! -f "$src" && test ! -d "$src"; then - echo "$0: $src does not exist." >&2 - exit 1 - fi - - if test -z "$dst_arg"; then - echo "$0: no destination specified." >&2 - exit 1 - fi - dst=$dst_arg - - # If destination is a directory, append the input filename; won't work - # if double slashes aren't ignored. - if test -d "$dst"; then - if test "$is_target_a_directory" = never; then - echo "$0: $dst_arg: Is a directory" >&2 - exit 1 - fi - dstdir=$dst - dst=$dstdir/`basename "$src"` - dstdir_status=0 - else - dstdir=`dirname "$dst"` - test -d "$dstdir" - dstdir_status=$? - fi - fi - - obsolete_mkdir_used=false - - if test $dstdir_status != 0; then - case $posix_mkdir in - '') - # Create intermediate dirs using mode 755 as modified by the umask. - # This is like FreeBSD 'install' as of 1997-10-28. - umask=`umask` - case $stripcmd.$umask in - # Optimize common cases. - *[2367][2367]) mkdir_umask=$umask;; - .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; - - *[0-7]) - mkdir_umask=`expr $umask + 22 \ - - $umask % 100 % 40 + $umask % 20 \ - - $umask % 10 % 4 + $umask % 2 - `;; - *) mkdir_umask=$umask,go-w;; - esac - - # With -d, create the new directory with the user-specified mode. - # Otherwise, rely on $mkdir_umask. - if test -n "$dir_arg"; then - mkdir_mode=-m$mode - else - mkdir_mode= - fi - - posix_mkdir=false - case $umask in - *[123567][0-7][0-7]) - # POSIX mkdir -p sets u+wx bits regardless of umask, which - # is incompatible with FreeBSD 'install' when (umask & 300) != 0. - ;; - *) - tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ - trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 - - if (umask $mkdir_umask && - exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 - then - if test -z "$dir_arg" || { - # Check for POSIX incompatibilities with -m. - # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or - # other-writable bit of parent directory when it shouldn't. - # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. - ls_ld_tmpdir=`ls -ld "$tmpdir"` - case $ls_ld_tmpdir in - d????-?r-*) different_mode=700;; - d????-?--*) different_mode=755;; - *) false;; - esac && - $mkdirprog -m$different_mode -p -- "$tmpdir" && { - ls_ld_tmpdir_1=`ls -ld "$tmpdir"` - test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" - } - } - then posix_mkdir=: - fi - rmdir "$tmpdir/d" "$tmpdir" - else - # Remove any dirs left behind by ancient mkdir implementations. - rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null - fi - trap '' 0;; - esac;; - esac - - if - $posix_mkdir && ( - umask $mkdir_umask && - $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" - ) - then : - else - - # The umask is ridiculous, or mkdir does not conform to POSIX, - # or it failed possibly due to a race condition. Create the - # directory the slow way, step by step, checking for races as we go. - - case $dstdir in - /*) prefix='/';; - [-=\(\)!]*) prefix='./';; - *) prefix='';; - esac - - oIFS=$IFS - IFS=/ - set -f - set fnord $dstdir - shift - set +f - IFS=$oIFS - - prefixes= - - for d - do - test X"$d" = X && continue - - prefix=$prefix$d - if test -d "$prefix"; then - prefixes= - else - if $posix_mkdir; then - (umask=$mkdir_umask && - $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break - # Don't fail if two instances are running concurrently. - test -d "$prefix" || exit 1 - else - case $prefix in - *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; - *) qprefix=$prefix;; - esac - prefixes="$prefixes '$qprefix'" - fi - fi - prefix=$prefix/ - done - - if test -n "$prefixes"; then - # Don't fail if two instances are running concurrently. - (umask $mkdir_umask && - eval "\$doit_exec \$mkdirprog $prefixes") || - test -d "$dstdir" || exit 1 - obsolete_mkdir_used=true - fi - fi - fi - - if test -n "$dir_arg"; then - { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && - { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && - { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || - test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 - else - - # Make a couple of temp file names in the proper directory. - dsttmp=$dstdir/_inst.$$_ - rmtmp=$dstdir/_rm.$$_ - - # Trap to clean up those temp files at exit. - trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 - - # Copy the file name to the temp name. - (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && - - # and set any options; do chmod last to preserve setuid bits. - # - # If any of these fail, we abort the whole thing. If we want to - # ignore errors from any of these, just make sure not to ignore - # errors from the above "$doit $cpprog $src $dsttmp" command. - # - { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && - { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && - { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && - { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && - - # If -C, don't bother to copy if it wouldn't change the file. - if $copy_on_change && - old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && - new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && - set -f && - set X $old && old=:$2:$4:$5:$6 && - set X $new && new=:$2:$4:$5:$6 && - set +f && - test "$old" = "$new" && - $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 - then - rm -f "$dsttmp" - else - # Rename the file to the real destination. - $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || - - # The rename failed, perhaps because mv can't rename something else - # to itself, or perhaps because mv is so ancient that it does not - # support -f. - { - # Now remove or move aside any old file at destination location. - # We try this two ways since rm can't unlink itself on some - # systems and the destination file might be busy for other - # reasons. In this case, the final cleanup might fail but the new - # file should still install successfully. - { - test ! -f "$dst" || - $doit $rmcmd -f "$dst" 2>/dev/null || - { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && - { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } - } || - { echo "$0: cannot unlink or rename $dst" >&2 - (exit 1); exit 1 - } - } && - - # Now rename the file to the real destination. - $doit $mvcmd "$dsttmp" "$dst" - } - fi || exit 1 - - trap '' 0 - fi -done - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" -# time-stamp-end: "; # UTC" -# End: diff --git a/librb/librb.pc.in b/librb/librb.pc.in deleted file mode 100644 index a2fd7da0e..000000000 --- a/librb/librb.pc.in +++ /dev/null @@ -1,14 +0,0 @@ -prefix=@prefix@ -exec_prefix=@exec_prefix@ -datarootdir=@datarootdir@ -data_dir=@datadir@/@PACKAGE_NAME@ - -version=@PACKAGE_VERSION@ -include_dir=@includedir@/librb -lib_dir=@libdir@ - -Name: librb -Description: Portable runtime for charybdis and other things, based on libratbox -Version: @PACKAGE_VERSION@ -Libs: -L${lib_dir} -lrb -Cflags: -I${include_dir} diff --git a/modules/Makefile.am b/modules/Makefile.am index 826538210..d7e20ac7f 100644 --- a/modules/Makefile.am +++ b/modules/Makefile.am @@ -1,9 +1,10 @@ AUTOMAKE_OPTIONS = subdir-objects -AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/librb/include $(LTDLINCL) +AM_CPPFLAGS = -I$(top_srcdir)/include $(LTDLINCL) AM_LDFLAGS = -module -export-dynamic -avoid-version -no-undefined -shared AM_LDFLAGS += -export-symbols-regex _mheader LIBS += $(top_srcdir)/ircd/libircd.la +LIBS += $(top_srcdir)/rb/librb.la auto_load_moddir=@moduledir@/autoload diff --git a/modules/cap_account_tag.c b/modules/cap_account_tag.c index 85e8dab21..718ac69db 100644 --- a/modules/cap_account_tag.c +++ b/modules/cap_account_tag.c @@ -21,18 +21,18 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include "stdinc.h" -#include "modules.h" -#include "hook.h" -#include "client.h" -#include "ircd.h" -#include "send.h" -#include "s_conf.h" -#include "s_user.h" -#include "s_serv.h" -#include "numeric.h" -#include "chmode.h" -#include "inline/stringops.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include static const char cap_account_tag_desc[] = "Provides the account-tag client capability"; diff --git a/modules/cap_server_time.c b/modules/cap_server_time.c index 73fce0170..42085c980 100644 --- a/modules/cap_server_time.c +++ b/modules/cap_server_time.c @@ -21,18 +21,18 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include "stdinc.h" -#include "modules.h" -#include "hook.h" -#include "client.h" -#include "ircd.h" -#include "send.h" -#include "s_conf.h" -#include "s_user.h" -#include "s_serv.h" -#include "numeric.h" -#include "chmode.h" -#include "inline/stringops.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include static const char cap_server_time_desc[] = "Provides the server-time client capability"; diff --git a/modules/chm_nocolour.c b/modules/chm_nocolour.c index b8c86371c..664caccce 100644 --- a/modules/chm_nocolour.c +++ b/modules/chm_nocolour.c @@ -21,18 +21,18 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include "stdinc.h" -#include "modules.h" -#include "hook.h" -#include "client.h" -#include "ircd.h" -#include "send.h" -#include "s_conf.h" -#include "s_user.h" -#include "s_serv.h" -#include "numeric.h" -#include "chmode.h" -#include "inline/stringops.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include static const char chm_nocolour_desc[] = "Enables channel mode +c that filters colours and formatting from a channel"; diff --git a/modules/chm_noctcp.c b/modules/chm_noctcp.c index dd76ab097..3638d7e46 100644 --- a/modules/chm_noctcp.c +++ b/modules/chm_noctcp.c @@ -21,18 +21,18 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include "stdinc.h" -#include "modules.h" -#include "hook.h" -#include "client.h" -#include "ircd.h" -#include "send.h" -#include "s_conf.h" -#include "s_user.h" -#include "s_serv.h" -#include "numeric.h" -#include "chmode.h" -#include "inline/stringops.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include static const char chm_noctcp_desc[] = "Adds channel mode +C, which blocks CTCP messages from a channel (except ACTION)"; diff --git a/modules/core/m_ban.c b/modules/core/m_ban.c index 94c18f2dc..1a76395dc 100644 --- a/modules/core/m_ban.c +++ b/modules/core/m_ban.c @@ -27,23 +27,23 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include "stdinc.h" -#include "send.h" -#include "channel.h" -#include "client.h" -#include "defaults.h" -#include "ircd.h" -#include "match.h" -#include "s_conf.h" -#include "s_newconf.h" -#include "msg.h" -#include "modules.h" -#include "hash.h" -#include "s_serv.h" -#include "operhash.h" -#include "reject.h" -#include "hostmask.h" -#include "logger.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include static const char ban_desc[] = "Provides the TS6 BAN command for propagating network-wide bans"; diff --git a/modules/core/m_die.c b/modules/core/m_die.c index 8ac865f9e..1a209dd04 100644 --- a/modules/core/m_die.c +++ b/modules/core/m_die.c @@ -22,19 +22,19 @@ * USA */ -#include "stdinc.h" -#include "client.h" -#include "ircd.h" -#include "match.h" -#include "numeric.h" -#include "logger.h" -#include "s_conf.h" -#include "send.h" -#include "msg.h" -#include "parse.h" -#include "modules.h" -#include "s_newconf.h" -#include "hash.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include static const char die_desc[] = "Provides the DIE command to allow an operator to shutdown a server"; diff --git a/modules/core/m_error.c b/modules/core/m_error.c index 4ef168811..9c4081fc0 100644 --- a/modules/core/m_error.c +++ b/modules/core/m_error.c @@ -22,15 +22,15 @@ * USA */ -#include "stdinc.h" -#include "client.h" -#include "ircd.h" -#include "numeric.h" -#include "send.h" -#include "msg.h" -#include "modules.h" -#include "logger.h" -#include "s_conf.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include static const char error_desc[] = "Provides the ERROR command for clients and servers"; diff --git a/modules/core/m_join.c b/modules/core/m_join.c index f74d7dd5b..bbaa901eb 100644 --- a/modules/core/m_join.c +++ b/modules/core/m_join.c @@ -22,24 +22,24 @@ * USA */ -#include "stdinc.h" -#include "channel.h" -#include "client.h" -#include "hash.h" -#include "match.h" -#include "ircd.h" -#include "numeric.h" -#include "send.h" -#include "s_serv.h" -#include "s_conf.h" -#include "s_newconf.h" -#include "msg.h" -#include "parse.h" -#include "modules.h" -#include "packet.h" -#include "chmode.h" -#include "ratelimit.h" -#include "s_assert.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include static const char join_desc[] = "Provides the JOIN and TS6 SJOIN commands to facilitate joining and creating channels"; diff --git a/modules/core/m_kick.c b/modules/core/m_kick.c index e592a5530..7284388eb 100644 --- a/modules/core/m_kick.c +++ b/modules/core/m_kick.c @@ -22,20 +22,20 @@ * USA */ -#include "stdinc.h" -#include "channel.h" -#include "client.h" -#include "match.h" -#include "ircd.h" -#include "numeric.h" -#include "send.h" -#include "msg.h" -#include "modules.h" -#include "parse.h" -#include "hash.h" -#include "packet.h" -#include "s_serv.h" -#include "hook.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include static const char kick_desc[] = "Provides the KICK command to remove a user from a channel"; diff --git a/modules/core/m_kill.c b/modules/core/m_kill.c index dd4e71d52..1ec664532 100644 --- a/modules/core/m_kill.c +++ b/modules/core/m_kill.c @@ -22,21 +22,21 @@ * USA */ -#include "stdinc.h" -#include "client.h" -#include "hash.h" /* for find_client() */ -#include "ircd.h" -#include "numeric.h" -#include "logger.h" -#include "s_serv.h" -#include "s_conf.h" -#include "send.h" -#include "whowas.h" -#include "match.h" -#include "msg.h" -#include "parse.h" -#include "modules.h" -#include "s_newconf.h" +#include +#include +#include /* for find_client() */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include static const char kill_desc[] = "Provides the KILL command to remove a user from the network"; diff --git a/modules/core/m_message.c b/modules/core/m_message.c index 1ee4da033..cb6190436 100644 --- a/modules/core/m_message.c +++ b/modules/core/m_message.c @@ -22,26 +22,26 @@ * USA */ -#include "stdinc.h" -#include "client.h" -#include "ircd.h" -#include "numeric.h" -#include "s_conf.h" -#include "s_serv.h" -#include "msg.h" -#include "parse.h" -#include "modules.h" -#include "channel.h" -#include "match.h" -#include "hash.h" -#include "class.h" -#include "msg.h" -#include "packet.h" -#include "send.h" -#include "s_newconf.h" -#include "s_stats.h" -#include "tgchange.h" -#include "inline/stringops.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include static const char message_desc[] = "Provides the PRIVMSG and NOTICE commands to send messages to users and channels"; diff --git a/modules/core/m_mode.c b/modules/core/m_mode.c index 848d0b45f..7dd708d50 100644 --- a/modules/core/m_mode.c +++ b/modules/core/m_mode.c @@ -22,23 +22,23 @@ * USA */ -#include "stdinc.h" -#include "channel.h" -#include "client.h" -#include "hash.h" -#include "match.h" -#include "ircd.h" -#include "numeric.h" -#include "s_user.h" -#include "s_conf.h" -#include "s_serv.h" -#include "logger.h" -#include "send.h" -#include "msg.h" -#include "parse.h" -#include "modules.h" -#include "packet.h" -#include "s_newconf.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include static const char mode_desc[] = "Provides the MODE and MLOCK client and server commands, and TS6 server-to-server TMODE and BMASK commands"; diff --git a/modules/core/m_modules.c b/modules/core/m_modules.c index 408a3cae9..f28f0b756 100644 --- a/modules/core/m_modules.c +++ b/modules/core/m_modules.c @@ -18,21 +18,21 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include "stdinc.h" -#include "client.h" -#include "parse.h" -#include "msg.h" -#include "modules.h" -#include "s_newconf.h" -#include "s_conf.h" -#include "s_serv.h" -#include "hash.h" -#include "ircd.h" -#include "match.h" -#include "numeric.h" -#include "send.h" -#include "packet.h" -#include "logger.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include static const char modules_desc[] = "Provides module management commands"; diff --git a/modules/core/m_nick.c b/modules/core/m_nick.c index 81f916ec3..481300ddd 100644 --- a/modules/core/m_nick.c +++ b/modules/core/m_nick.c @@ -22,29 +22,29 @@ * USA */ -#include "stdinc.h" -#include "client.h" -#include "hash.h" -#include "match.h" -#include "ircd.h" -#include "numeric.h" -#include "s_conf.h" -#include "s_stats.h" -#include "s_user.h" -#include "hash.h" -#include "whowas.h" -#include "s_serv.h" -#include "send.h" -#include "channel.h" -#include "logger.h" -#include "msg.h" -#include "parse.h" -#include "modules.h" -#include "packet.h" -#include "scache.h" -#include "s_newconf.h" -#include "monitor.h" -#include "s_assert.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include /* Give all UID nicks the same TS. This ensures nick TS is always the same on * all servers for each nick-user pair, also if a user with a UID nick changes diff --git a/modules/core/m_part.c b/modules/core/m_part.c index 094f39f10..0d370f5f0 100644 --- a/modules/core/m_part.c +++ b/modules/core/m_part.c @@ -22,22 +22,22 @@ * USA */ -#include "stdinc.h" -#include "channel.h" -#include "client.h" -#include "hash.h" -#include "match.h" -#include "ircd.h" -#include "numeric.h" -#include "send.h" -#include "s_serv.h" -#include "msg.h" -#include "parse.h" -#include "modules.h" -#include "s_conf.h" -#include "packet.h" -#include "inline/stringops.h" -#include "hook.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include static const char part_desc[] = "Provides the PART command to leave a channel"; diff --git a/modules/core/m_quit.c b/modules/core/m_quit.c index f1851dde5..b9eb5d8b9 100644 --- a/modules/core/m_quit.c +++ b/modules/core/m_quit.c @@ -22,17 +22,17 @@ * USA */ -#include "stdinc.h" -#include "client.h" -#include "ircd.h" -#include "numeric.h" -#include "s_serv.h" -#include "send.h" -#include "msg.h" -#include "parse.h" -#include "modules.h" -#include "s_conf.h" -#include "inline/stringops.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include static const char quit_desc[] = "Provides the QUIT command to allow a user to leave the network"; diff --git a/modules/core/m_server.c b/modules/core/m_server.c index 1ceaca9f8..3629acd40 100644 --- a/modules/core/m_server.c +++ b/modules/core/m_server.c @@ -22,22 +22,22 @@ * USA */ -#include "stdinc.h" -#include "client.h" /* client struct */ -#include "hash.h" /* add_to_client_hash */ -#include "match.h" -#include "ircd.h" /* me */ -#include "numeric.h" /* ERR_xxx */ -#include "s_conf.h" /* struct ConfItem */ -#include "s_newconf.h" -#include "logger.h" /* log level defines */ -#include "s_serv.h" /* server_estab, check_server */ -#include "s_stats.h" /* ServerStats */ -#include "scache.h" -#include "send.h" /* sendto_one */ -#include "msg.h" -#include "parse.h" -#include "modules.h" +#include +#include /* client struct */ +#include /* add_to_client_hash */ +#include +#include /* me */ +#include /* ERR_xxx */ +#include /* struct ConfItem */ +#include +#include /* log level defines */ +#include /* server_estab, check_server */ +#include /* ServerStats */ +#include +#include /* sendto_one */ +#include +#include +#include static const char server_desc[] = "Provides the TS6 commands to introduce a new server to the network"; diff --git a/modules/core/m_squit.c b/modules/core/m_squit.c index ad2dc9652..7c691fa70 100644 --- a/modules/core/m_squit.c +++ b/modules/core/m_squit.c @@ -22,20 +22,20 @@ * USA */ -#include "stdinc.h" -#include "client.h" -#include "match.h" -#include "ircd.h" -#include "numeric.h" -#include "s_conf.h" -#include "logger.h" -#include "s_serv.h" -#include "send.h" -#include "msg.h" -#include "parse.h" -#include "modules.h" -#include "hash.h" -#include "s_newconf.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include static const char squit_desc[] = "Provides the SQUIT command to cause a server to quit"; diff --git a/modules/m_accept.c b/modules/m_accept.c index cd3074b54..c626db491 100644 --- a/modules/m_accept.c +++ b/modules/m_accept.c @@ -22,17 +22,17 @@ * USA */ -#include "stdinc.h" -#include "client.h" -#include "hash.h" -#include "ircd.h" -#include "numeric.h" -#include "s_conf.h" -#include "s_serv.h" -#include "send.h" -#include "msg.h" -#include "parse.h" -#include "modules.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include static const char accept_desc[] = "Provides the ACCEPT command for use with Caller ID/user mode +g"; diff --git a/modules/m_admin.c b/modules/m_admin.c index 955ea42fd..16364efb8 100644 --- a/modules/m_admin.c +++ b/modules/m_admin.c @@ -22,17 +22,17 @@ * USA */ -#include "stdinc.h" -#include "client.h" -#include "ircd.h" -#include "numeric.h" -#include "s_conf.h" -#include "s_serv.h" -#include "send.h" -#include "msg.h" -#include "parse.h" -#include "hook.h" -#include "modules.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include const char admin_desc[] = "Provides the ADMIN command to show server administrator information"; diff --git a/modules/m_alias.c b/modules/m_alias.c index ebff11e25..0b26ffe7d 100644 --- a/modules/m_alias.c +++ b/modules/m_alias.c @@ -18,19 +18,19 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include "stdinc.h" -#include "client.h" -#include "parse.h" -#include "msg.h" -#include "modules.h" -#include "s_conf.h" -#include "s_serv.h" -#include "hash.h" -#include "ircd.h" -#include "match.h" -#include "numeric.h" -#include "send.h" -#include "packet.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include static const char alias_desc[] = "Provides the system for services aliases"; diff --git a/modules/m_away.c b/modules/m_away.c index 4e20235d9..de9bf88a5 100644 --- a/modules/m_away.c +++ b/modules/m_away.c @@ -22,18 +22,18 @@ * USA */ -#include "stdinc.h" -#include "client.h" -#include "match.h" -#include "ircd.h" -#include "numeric.h" -#include "send.h" -#include "msg.h" -#include "parse.h" -#include "modules.h" -#include "s_conf.h" -#include "s_serv.h" -#include "packet.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include static const char away_desc[] = "Provides the AWAY command to set yourself away"; diff --git a/modules/m_cap.c b/modules/m_cap.c index a1dd5b297..bb35d129a 100644 --- a/modules/m_cap.c +++ b/modules/m_cap.c @@ -29,20 +29,20 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include "stdinc.h" -#include "class.h" -#include "client.h" -#include "match.h" -#include "ircd.h" -#include "numeric.h" -#include "msg.h" -#include "parse.h" -#include "modules.h" -#include "s_serv.h" -#include "s_user.h" -#include "send.h" -#include "s_conf.h" -#include "hash.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include static const char cap_desc[] = "Provides the commands used for client capability negotiation"; diff --git a/modules/m_capab.c b/modules/m_capab.c index 56732e232..9550f69fe 100644 --- a/modules/m_capab.c +++ b/modules/m_capab.c @@ -22,14 +22,14 @@ * USA */ -#include "stdinc.h" -#include "client.h" -#include "match.h" -#include "s_serv.h" -#include "s_conf.h" -#include "msg.h" -#include "parse.h" -#include "modules.h" +#include +#include +#include +#include +#include +#include +#include +#include static const char capab_desc[] = "Provides the commands used for server-to-server capability negotiation"; diff --git a/modules/m_certfp.c b/modules/m_certfp.c index f6dc003af..2270e82a8 100644 --- a/modules/m_certfp.c +++ b/modules/m_certfp.c @@ -27,15 +27,15 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include "stdinc.h" -#include "client.h" -#include "match.h" -#include "hash.h" -#include "ircd.h" -#include "numeric.h" -#include "send.h" -#include "msg.h" -#include "modules.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include static const char certfp_desc[] = "Provides the CERTFP facility used by servers to set certificate fingerprints"; diff --git a/modules/m_challenge.c b/modules/m_challenge.c index d9a285ac1..edcb2592e 100644 --- a/modules/m_challenge.c +++ b/modules/m_challenge.c @@ -22,7 +22,7 @@ * USA */ -#include "stdinc.h" +#include #ifdef HAVE_LIBCRYPTO #include @@ -34,19 +34,19 @@ #include #endif -#include "client.h" -#include "ircd.h" -#include "modules.h" -#include "numeric.h" -#include "send.h" -#include "s_conf.h" -#include "msg.h" -#include "parse.h" -#include "match.h" -#include "logger.h" -#include "s_user.h" -#include "cache.h" -#include "s_newconf.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #define CHALLENGE_WIDTH BUFSIZE - (NICKLEN + HOSTLEN + 12) #define CHALLENGE_EXPIRES 180 /* 180 seconds should be more than long enough */ diff --git a/modules/m_chghost.c b/modules/m_chghost.c index b6711f763..5b7dd6ad6 100644 --- a/modules/m_chghost.c +++ b/modules/m_chghost.c @@ -9,23 +9,23 @@ * m_chghost.c: A module for handling spoofing dynamically. */ -#include "stdinc.h" -#include "send.h" -#include "channel.h" -#include "client.h" -#include "defaults.h" -#include "ircd.h" -#include "numeric.h" -#include "s_conf.h" -#include "s_newconf.h" -#include "s_serv.h" -#include "s_user.h" -#include "hash.h" -#include "msg.h" -#include "parse.h" -#include "modules.h" -#include "whowas.h" -#include "monitor.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include static const char chghost_desc[] = "Provides commands used to change and retrieve client hostnames"; diff --git a/modules/m_close.c b/modules/m_close.c index 4a70cd461..262b649e2 100644 --- a/modules/m_close.c +++ b/modules/m_close.c @@ -22,14 +22,14 @@ * USA */ -#include "stdinc.h" -#include "client.h" -#include "ircd.h" -#include "numeric.h" -#include "send.h" -#include "msg.h" -#include "parse.h" -#include "modules.h" +#include +#include +#include +#include +#include +#include +#include +#include static const char close_desc[] = "Provides the CLOSE command to clear all unfinished connections"; diff --git a/modules/m_connect.c b/modules/m_connect.c index 3f1db4ddf..c8ab36330 100644 --- a/modules/m_connect.c +++ b/modules/m_connect.c @@ -22,21 +22,21 @@ * USA */ -#include "stdinc.h" -#include "client.h" -#include "ircd.h" -#include "match.h" -#include "numeric.h" -#include "s_conf.h" -#include "s_newconf.h" -#include "logger.h" -#include "s_serv.h" -#include "send.h" -#include "msg.h" -#include "parse.h" -#include "hash.h" -#include "modules.h" -#include "sslproc.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include static const char connect_desc[] = "Provides the CONNECT command to introduce servers to the network"; diff --git a/modules/m_dline.c b/modules/m_dline.c index 9a056d05a..f43623a18 100644 --- a/modules/m_dline.c +++ b/modules/m_dline.c @@ -22,25 +22,25 @@ * USA */ -#include "stdinc.h" -#include "channel.h" -#include "class.h" -#include "client.h" -#include "match.h" -#include "ircd.h" -#include "hostmask.h" -#include "numeric.h" -#include "s_conf.h" -#include "s_newconf.h" -#include "logger.h" -#include "send.h" -#include "hash.h" -#include "s_serv.h" -#include "msg.h" -#include "parse.h" -#include "modules.h" -#include "bandbi.h" -#include "operhash.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include static const char dline_desc[] = "Provides the DLINE facility to ban users via IP address"; diff --git a/modules/m_encap.c b/modules/m_encap.c index f87ed6558..c3468d3b3 100644 --- a/modules/m_encap.c +++ b/modules/m_encap.c @@ -27,18 +27,18 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include "stdinc.h" -#include "send.h" -#include "channel.h" -#include "client.h" -#include "defaults.h" -#include "ircd.h" -#include "numeric.h" -#include "s_serv.h" -#include "hash.h" -#include "msg.h" -#include "parse.h" -#include "modules.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include static const char encap_desc[] = "Provides the TS6 ENCAP facility"; diff --git a/modules/m_etrace.c b/modules/m_etrace.c index 064206ae5..a22466aed 100644 --- a/modules/m_etrace.c +++ b/modules/m_etrace.c @@ -30,24 +30,24 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include "stdinc.h" -#include "class.h" -#include "hook.h" -#include "client.h" -#include "hash.h" -#include "hash.h" -#include "match.h" -#include "ircd.h" -#include "numeric.h" -#include "s_serv.h" -#include "s_conf.h" -#include "s_newconf.h" -#include "send.h" -#include "msg.h" -#include "parse.h" -#include "modules.h" -#include "logger.h" -#include "supported.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include static const char etrace_desc[] = "Provides enhanced tracing facilities to opers (ETRACE, CHANTRACE, and MASKTRACE)"; diff --git a/modules/m_grant.c b/modules/m_grant.c index 13ee6aa46..fe9e87e93 100644 --- a/modules/m_grant.c +++ b/modules/m_grant.c @@ -3,16 +3,16 @@ * Copyright (C) 2006 Stephen Bennett */ -#include "stdinc.h" -#include "modules.h" -#include "numeric.h" -#include "client.h" -#include "ircd.h" -#include "send.h" -#include "s_user.h" -#include "s_serv.h" -#include "s_conf.h" -#include "s_newconf.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include static const char grant_desc[] = "Provides the grant facility for giving other users specific privilege sets"; diff --git a/modules/m_help.c b/modules/m_help.c index 251b20ca7..411ec2898 100644 --- a/modules/m_help.c +++ b/modules/m_help.c @@ -22,19 +22,18 @@ * USA */ -#include "stdinc.h" -#include "client.h" -#include "ircd.h" -#include "msg.h" -#include "numeric.h" -#include "send.h" -#include "s_conf.h" -#include "logger.h" -#include "parse.h" -#include "modules.h" -#include "hash.h" -#include "cache.h" -#include "rb_dictionary.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include static const char help_desc[] = "Provides the help facility for commands, modes, and server concepts"; diff --git a/modules/m_info.c b/modules/m_info.c index 81d69a969..1adb88182 100644 --- a/modules/m_info.c +++ b/modules/m_info.c @@ -22,21 +22,21 @@ * USA */ -#include "stdinc.h" -#include "m_info.h" -#include "channel.h" -#include "client.h" -#include "match.h" -#include "ircd.h" -#include "hook.h" -#include "numeric.h" -#include "s_serv.h" -#include "s_user.h" -#include "send.h" -#include "s_conf.h" -#include "msg.h" -#include "parse.h" -#include "modules.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include static const char info_desc[] = "Provides the INFO command for retrieving server copyright, credits, and other info"; @@ -748,9 +748,9 @@ static void send_birthdate_online_time(struct Client *source_p) { char tbuf[26]; /* this needs to be 26 - see ctime_r manpage */ - sendto_one(source_p, ":%s %d %s :Birth Date: %s, compile # %s", + sendto_one(source_p, ":%s %d %s :Birth Date: %s (%ld)", get_id(&me, source_p), RPL_INFO, - get_id(source_p, source_p), creation, generation); + get_id(source_p, source_p), creation, datecode); sendto_one(source_p, ":%s %d %s :On-line since %s", get_id(&me, source_p), RPL_INFO, diff --git a/modules/m_invite.c b/modules/m_invite.c index 0b365e3aa..5addcfd77 100644 --- a/modules/m_invite.c +++ b/modules/m_invite.c @@ -22,21 +22,21 @@ * USA */ -#include "stdinc.h" -#include "channel.h" -#include "client.h" -#include "hash.h" -#include "match.h" -#include "ircd.h" -#include "numeric.h" -#include "send.h" -#include "s_conf.h" -#include "s_serv.h" -#include "msg.h" -#include "parse.h" -#include "modules.h" -#include "packet.h" -#include "tgchange.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include static const char invite_desc[] = "Provides facilities for invite and related notifications"; diff --git a/modules/m_ison.c b/modules/m_ison.c index 152d7efac..7055712fa 100644 --- a/modules/m_ison.c +++ b/modules/m_ison.c @@ -22,18 +22,18 @@ * USA */ -#include "stdinc.h" -#include "client.h" -#include "match.h" -#include "ircd.h" -#include "numeric.h" -#include "send.h" -#include "msg.h" -#include "parse.h" -#include "modules.h" -#include "s_conf.h" /* ConfigFileEntry */ -#include "s_serv.h" /* uplink/IsCapable */ -#include "hash.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include /* ConfigFileEntry */ +#include /* uplink/IsCapable */ +#include #include diff --git a/modules/m_kline.c b/modules/m_kline.c index 7c55fc55d..0301236ac 100644 --- a/modules/m_kline.c +++ b/modules/m_kline.c @@ -22,26 +22,26 @@ * USA */ -#include "stdinc.h" -#include "channel.h" -#include "class.h" -#include "client.h" -#include "match.h" -#include "ircd.h" -#include "hostmask.h" -#include "numeric.h" -#include "s_conf.h" -#include "s_newconf.h" -#include "logger.h" -#include "send.h" -#include "hash.h" -#include "s_serv.h" -#include "msg.h" -#include "parse.h" -#include "modules.h" -#include "reject.h" -#include "bandbi.h" -#include "operhash.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include static const char kline_desc[] = "Provides the KLINE facility to ban users via hostmask"; diff --git a/modules/m_knock.c b/modules/m_knock.c index 756a523ee..f2e86472c 100644 --- a/modules/m_knock.c +++ b/modules/m_knock.c @@ -21,20 +21,20 @@ * USA */ -#include "stdinc.h" -#include "channel.h" -#include "client.h" -#include "hash.h" -#include "match.h" -#include "ircd.h" -#include "numeric.h" -#include "send.h" -#include "s_conf.h" -#include "msg.h" -#include "parse.h" -#include "modules.h" -#include "s_serv.h" -#include "supported.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include static const char knock_desc[] = "Provides the KNOCK command to ask for an invite to an invite-only channel"; diff --git a/modules/m_links.c b/modules/m_links.c index 499dd674e..28722536a 100644 --- a/modules/m_links.c +++ b/modules/m_links.c @@ -22,20 +22,20 @@ * USA */ -#include "stdinc.h" -#include "client.h" -#include "match.h" -#include "ircd.h" -#include "numeric.h" -#include "s_serv.h" -#include "send.h" -#include "s_conf.h" -#include "msg.h" -#include "parse.h" -#include "modules.h" -#include "hook.h" -#include "scache.h" -#include "s_assert.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include static const char links_desc[] = "Provides the LINKS command to view servers linked to the host server"; diff --git a/modules/m_list.c b/modules/m_list.c index e8947cf8e..7726af212 100644 --- a/modules/m_list.c +++ b/modules/m_list.c @@ -31,25 +31,24 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include "stdinc.h" -#include "channel.h" -#include "client.h" -#include "hash.h" -#include "match.h" -#include "ircd.h" -#include "numeric.h" -#include "s_conf.h" -#include "s_newconf.h" -#include "s_serv.h" -#include "supported.h" -#include "send.h" -#include "msg.h" -#include "parse.h" -#include "modules.h" -#include "inline/stringops.h" -#include "s_assert.h" -#include "logger.h" -#include "rb_radixtree.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include static const char list_desc[] = "Provides the LIST command to clients to view non-hidden channels"; diff --git a/modules/m_lusers.c b/modules/m_lusers.c index a58aefb67..555e981f1 100644 --- a/modules/m_lusers.c +++ b/modules/m_lusers.c @@ -22,17 +22,17 @@ * USA */ -#include "stdinc.h" -#include "client.h" -#include "ircd.h" -#include "numeric.h" -#include "s_serv.h" /* hunt_server */ -#include "s_user.h" /* show_lusers */ -#include "send.h" -#include "s_conf.h" -#include "msg.h" -#include "parse.h" -#include "modules.h" +#include +#include +#include +#include +#include /* hunt_server */ +#include /* show_lusers */ +#include +#include +#include +#include +#include static const char lusers_desc[] = "Provides the LUSERS command to view the number of current and maximum lusers on a server"; diff --git a/modules/m_map.c b/modules/m_map.c index 6ba05e1fa..afdfe12a8 100644 --- a/modules/m_map.c +++ b/modules/m_map.c @@ -20,13 +20,13 @@ * USA */ -#include "stdinc.h" -#include "client.h" -#include "modules.h" -#include "numeric.h" -#include "send.h" -#include "s_conf.h" -#include "scache.h" +#include +#include +#include +#include +#include +#include +#include #define USER_COL 50 /* display | Users: %d at col 50 */ diff --git a/modules/m_monitor.c b/modules/m_monitor.c index 4269ad567..1a96c02c3 100644 --- a/modules/m_monitor.c +++ b/modules/m_monitor.c @@ -28,16 +28,16 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include "stdinc.h" -#include "client.h" -#include "msg.h" -#include "parse.h" -#include "modules.h" -#include "monitor.h" -#include "numeric.h" -#include "s_conf.h" -#include "send.h" -#include "supported.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include static const char monitor_desc[] = "Provides the MONITOR facility for tracking user signon and signoff"; diff --git a/modules/m_motd.c b/modules/m_motd.c index feca390c2..55ddd30ee 100644 --- a/modules/m_motd.c +++ b/modules/m_motd.c @@ -22,19 +22,19 @@ * USA */ -#include "stdinc.h" -#include "client.h" -#include "ircd.h" -#include "send.h" -#include "numeric.h" -#include "hook.h" -#include "msg.h" -#include "s_serv.h" /* hunt_server */ -#include "parse.h" -#include "modules.h" -#include "s_conf.h" -#include "cache.h" -#include "ratelimit.h" +#include +#include +#include +#include +#include +#include +#include +#include /* hunt_server */ +#include +#include +#include +#include +#include static const char motd_desc[] = "Provides the MOTD command to view the Message of the Day"; diff --git a/modules/m_names.c b/modules/m_names.c index 026dfd2d2..81c3a7c69 100644 --- a/modules/m_names.c +++ b/modules/m_names.c @@ -22,19 +22,19 @@ * USA */ -#include "stdinc.h" -#include "channel.h" -#include "client.h" -#include "hash.h" -#include "match.h" -#include "ircd.h" -#include "numeric.h" -#include "send.h" -#include "s_serv.h" -#include "s_conf.h" -#include "msg.h" -#include "parse.h" -#include "modules.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include static const char names_desc[] = "Provides the NAMES command to view users on a channel"; diff --git a/modules/m_oper.c b/modules/m_oper.c index 9afef1f8c..1fd782f04 100644 --- a/modules/m_oper.c +++ b/modules/m_oper.c @@ -22,21 +22,21 @@ * USA */ -#include "stdinc.h" -#include "client.h" -#include "match.h" -#include "ircd.h" -#include "numeric.h" -#include "s_conf.h" -#include "s_newconf.h" -#include "logger.h" -#include "s_user.h" -#include "send.h" -#include "msg.h" -#include "parse.h" -#include "modules.h" -#include "packet.h" -#include "cache.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include static const char oper_desc[] = "Provides the OPER command to become an IRC operator"; diff --git a/modules/m_operspy.c b/modules/m_operspy.c index 32a1a96d9..9fb5c7a55 100644 --- a/modules/m_operspy.c +++ b/modules/m_operspy.c @@ -27,19 +27,19 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include "stdinc.h" -#include "send.h" -#include "channel.h" -#include "client.h" -#include "defaults.h" -#include "ircd.h" -#include "numeric.h" -#include "s_serv.h" -#include "hash.h" -#include "msg.h" -#include "parse.h" -#include "modules.h" -#include "logger.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include static const char operspy_desc[] = "Provides the operspy facility for viewing normally private data"; diff --git a/modules/m_pass.c b/modules/m_pass.c index 36398055e..f7362f67d 100644 --- a/modules/m_pass.c +++ b/modules/m_pass.c @@ -22,18 +22,18 @@ * USA */ -#include "stdinc.h" -#include "client.h" /* client struct */ -#include "match.h" -#include "send.h" /* sendto_one */ -#include "numeric.h" /* ERR_xxx */ -#include "ircd.h" /* me */ -#include "msg.h" -#include "parse.h" -#include "modules.h" -#include "s_serv.h" -#include "hash.h" -#include "s_conf.h" +#include +#include /* client struct */ +#include +#include /* sendto_one */ +#include /* ERR_xxx */ +#include /* me */ +#include +#include +#include +#include +#include +#include static const char pass_desc[] = "Provides the PASS command to authenticate clients and servers"; diff --git a/modules/m_ping.c b/modules/m_ping.c index 0c66656b0..d3caeb671 100644 --- a/modules/m_ping.c +++ b/modules/m_ping.c @@ -22,18 +22,18 @@ * USA */ -#include "stdinc.h" -#include "client.h" -#include "ircd.h" -#include "numeric.h" -#include "send.h" -#include "match.h" -#include "msg.h" -#include "parse.h" -#include "modules.h" -#include "hash.h" -#include "s_conf.h" -#include "s_serv.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include static const char ping_desc[] = "Provides the PING command to ensure a client or server is still alive"; diff --git a/modules/m_pong.c b/modules/m_pong.c index 5d1721584..93d1e0815 100644 --- a/modules/m_pong.c +++ b/modules/m_pong.c @@ -22,21 +22,21 @@ * USA */ -#include "stdinc.h" -#include "ircd.h" -#include "s_user.h" -#include "client.h" -#include "hash.h" /* for find_client() */ -#include "hook.h" -#include "numeric.h" -#include "s_conf.h" -#include "send.h" -#include "channel.h" -#include "match.h" -#include "msg.h" -#include "parse.h" -#include "hash.h" -#include "modules.h" +#include +#include +#include +#include +#include /* for find_client() */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include static const char pong_desc[] = "Provides the PONG command to respond to a PING message"; diff --git a/modules/m_post.c b/modules/m_post.c index 4d17e2089..eb12a7575 100644 --- a/modules/m_post.c +++ b/modules/m_post.c @@ -22,16 +22,16 @@ * USA */ -#include "stdinc.h" -#include "client.h" -#include "ircd.h" -#include "numeric.h" -#include "s_serv.h" -#include "send.h" -#include "msg.h" -#include "parse.h" -#include "modules.h" -#include "s_conf.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include static const char post_desc[] = "Ensure Web forms/proxies cannot connect by disconnecting on POST, GET, and PUT"; diff --git a/modules/m_privs.c b/modules/m_privs.c index c71327dce..b1203a555 100644 --- a/modules/m_privs.c +++ b/modules/m_privs.c @@ -29,15 +29,15 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include "stdinc.h" -#include "client.h" -#include "numeric.h" -#include "send.h" -#include "msg.h" -#include "parse.h" -#include "modules.h" -#include "s_conf.h" -#include "s_newconf.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include static const char privs_desc[] = "Provides the PRIVS command to inspect an operator's privileges"; diff --git a/modules/m_rehash.c b/modules/m_rehash.c index 084c0be13..375b971ec 100644 --- a/modules/m_rehash.c +++ b/modules/m_rehash.c @@ -22,26 +22,25 @@ * USA */ -#include "stdinc.h" -#include "client.h" -#include "channel.h" -#include "match.h" -#include "ircd.h" -#include "s_serv.h" -#include "numeric.h" -#include "s_conf.h" -#include "s_newconf.h" -#include "logger.h" -#include "send.h" -#include "msg.h" -#include "parse.h" -#include "modules.h" -#include "hostmask.h" -#include "reject.h" -#include "hash.h" -#include "cache.h" -#include "rb_radixtree.h" -#include "sslproc.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include static const char rehash_desc[] = "Provides the REHASH command to reload configuration and other files"; diff --git a/modules/m_restart.c b/modules/m_restart.c index 3910e299b..613ea9161 100644 --- a/modules/m_restart.c +++ b/modules/m_restart.c @@ -22,20 +22,20 @@ * USA */ -#include "stdinc.h" -#include "client.h" -#include "match.h" -#include "ircd.h" -#include "numeric.h" -#include "s_conf.h" -#include "s_newconf.h" -#include "restart.h" -#include "logger.h" -#include "send.h" -#include "msg.h" -#include "parse.h" -#include "modules.h" -#include "hash.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include static const char restart_desc[] = "Provides the RESTART command to restart the server"; diff --git a/modules/m_resv.c b/modules/m_resv.c index 84242b951..1d89f4b3e 100644 --- a/modules/m_resv.c +++ b/modules/m_resv.c @@ -21,22 +21,22 @@ * USA */ -#include "stdinc.h" -#include "client.h" -#include "channel.h" -#include "ircd.h" -#include "numeric.h" -#include "s_serv.h" -#include "send.h" -#include "msg.h" -#include "parse.h" -#include "modules.h" -#include "s_conf.h" -#include "s_newconf.h" -#include "hash.h" -#include "logger.h" -#include "bandbi.h" -#include "operhash.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include static const char resv_desc[] = "Provides management of reserved nicknames and channels using (UN)RESV"; diff --git a/modules/m_sasl.c b/modules/m_sasl.c index ee2010179..689ce46be 100644 --- a/modules/m_sasl.c +++ b/modules/m_sasl.c @@ -27,20 +27,18 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include "stdinc.h" - -#include "client.h" -#include "hash.h" -#include "send.h" -#include "msg.h" -#include "modules.h" -#include "numeric.h" -#include "reject.h" -#include "s_serv.h" -#include "s_stats.h" -#include "string.h" -#include "s_newconf.h" -#include "s_conf.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include static const char sasl_desc[] = "Provides SASL authentication support"; diff --git a/modules/m_scan.c b/modules/m_scan.c index 550717163..5770a75c6 100644 --- a/modules/m_scan.c +++ b/modules/m_scan.c @@ -29,24 +29,24 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include "stdinc.h" -#include "class.h" -#include "hook.h" -#include "client.h" -#include "hash.h" -#include "hash.h" -#include "match.h" -#include "ircd.h" -#include "numeric.h" -#include "s_serv.h" -#include "s_conf.h" -#include "s_newconf.h" -#include "s_user.h" -#include "send.h" -#include "msg.h" -#include "parse.h" -#include "modules.h" -#include "logger.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include static const char scan_desc[] = "Provides the SCAN command to show users that have a mode set or cleared"; diff --git a/modules/m_services.c b/modules/m_services.c index b8a1f363f..bb7b8ecf8 100644 --- a/modules/m_services.c +++ b/modules/m_services.c @@ -27,24 +27,23 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include "stdinc.h" - -#include "send.h" -#include "channel.h" -#include "client.h" -#include "defaults.h" -#include "ircd.h" -#include "numeric.h" -#include "s_conf.h" -#include "s_newconf.h" -#include "s_serv.h" -#include "hash.h" -#include "msg.h" -#include "parse.h" -#include "modules.h" -#include "whowas.h" -#include "monitor.h" -#include "supported.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include static const char services_desc[] = "Provides support for running a services daemon"; diff --git a/modules/m_set.c b/modules/m_set.c index 34bdea2e5..cc8946983 100644 --- a/modules/m_set.c +++ b/modules/m_set.c @@ -24,19 +24,19 @@ /* rewritten by jdc */ -#include "stdinc.h" -#include "client.h" -#include "match.h" -#include "ircd.h" -#include "numeric.h" -#include "s_serv.h" -#include "send.h" -#include "channel.h" -#include "s_conf.h" -#include "s_newconf.h" -#include "msg.h" -#include "parse.h" -#include "modules.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include static const char set_desc[] = "Provides the SET command to change server parameters"; diff --git a/modules/m_signon.c b/modules/m_signon.c index 6aeecc471..92998357f 100644 --- a/modules/m_signon.c +++ b/modules/m_signon.c @@ -27,26 +27,25 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include "stdinc.h" - -#include "send.h" -#include "channel.h" -#include "client.h" -#include "defaults.h" -#include "ircd.h" -#include "numeric.h" -#include "s_conf.h" -#include "s_serv.h" -#include "hash.h" -#include "msg.h" -#include "parse.h" -#include "modules.h" -#include "whowas.h" -#include "monitor.h" -#include "s_stats.h" -#include "snomask.h" -#include "match.h" -#include "s_user.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include static const char signon_desc[] = "Provides account login/logout support for services"; diff --git a/modules/m_snote.c b/modules/m_snote.c index b79afbd94..be90a9313 100644 --- a/modules/m_snote.c +++ b/modules/m_snote.c @@ -29,23 +29,23 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include "stdinc.h" -#include "class.h" -#include "hook.h" -#include "client.h" -#include "hash.h" -#include "hash.h" -#include "match.h" -#include "ircd.h" -#include "numeric.h" -#include "s_serv.h" -#include "s_conf.h" -#include "s_newconf.h" -#include "s_user.h" -#include "send.h" -#include "msg.h" -#include "parse.h" -#include "modules.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include static const char snote_desc[] = "Provides server notices via the SNOTE command"; diff --git a/modules/m_starttls.c b/modules/m_starttls.c index c5b98a077..8ae523942 100644 --- a/modules/m_starttls.c +++ b/modules/m_starttls.c @@ -18,19 +18,19 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include "stdinc.h" -#include "client.h" -#include "match.h" -#include "hash.h" -#include "ircd.h" -#include "numeric.h" -#include "send.h" -#include "msg.h" -#include "modules.h" -#include "sslproc.h" -#include "s_assert.h" -#include "s_serv.h" -#include "logger.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include static const char starttls_desc[] = "Provides the tls CAP and STARTTLS command"; diff --git a/modules/m_stats.c b/modules/m_stats.c index 997019d70..e84e8b934 100644 --- a/modules/m_stats.c +++ b/modules/m_stats.c @@ -22,30 +22,29 @@ * USA */ -#include "stdinc.h" -#include "class.h" /* report_classes */ -#include "client.h" /* Client */ -#include "match.h" -#include "ircd.h" /* me */ -#include "listener.h" /* show_ports */ -#include "msg.h" /* Message */ -#include "hostmask.h" /* report_mtrie_conf_links */ -#include "numeric.h" /* ERR_xxx */ -#include "scache.h" /* list_scache */ -#include "send.h" /* sendto_one */ -#include "s_conf.h" /* ConfItem */ -#include "s_serv.h" /* hunt_server */ -#include "s_stats.h" -#include "s_user.h" /* show_opers */ -#include "parse.h" -#include "modules.h" -#include "hook.h" -#include "s_newconf.h" -#include "hash.h" -#include "reject.h" -#include "whowas.h" -#include "rb_radixtree.h" -#include "sslproc.h" +#include +#include /* report_classes */ +#include /* Client */ +#include +#include /* me */ +#include /* show_ports */ +#include /* Message */ +#include /* report_mtrie_conf_links */ +#include /* ERR_xxx */ +#include /* list_scache */ +#include /* sendto_one */ +#include /* ConfItem */ +#include /* hunt_server */ +#include +#include /* show_opers */ +#include +#include +#include +#include +#include +#include +#include +#include static const char stats_desc[] = "Provides the STATS command to inspect various server/network information"; diff --git a/modules/m_svinfo.c b/modules/m_svinfo.c index c6042fe11..ae33854d3 100644 --- a/modules/m_svinfo.c +++ b/modules/m_svinfo.c @@ -21,18 +21,18 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ -#include "stdinc.h" -#include "client.h" -#include "match.h" -#include "ircd.h" -#include "numeric.h" -#include "send.h" -#include "s_conf.h" -#include "s_newconf.h" -#include "logger.h" -#include "msg.h" -#include "parse.h" -#include "modules.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include static const char svinfo_desc[] = "Provides TS6 SVINFO command to ensure version and clock synchronisation"; diff --git a/modules/m_tb.c b/modules/m_tb.c index 4dce456ce..b8a0156df 100644 --- a/modules/m_tb.c +++ b/modules/m_tb.c @@ -28,18 +28,18 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include "stdinc.h" -#include "send.h" -#include "channel.h" -#include "client.h" -#include "defaults.h" -#include "ircd.h" -#include "match.h" -#include "s_conf.h" -#include "msg.h" -#include "modules.h" -#include "hash.h" -#include "s_serv.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include static const char tb_desc[] = "Provides TS6 TB and ETB commands for topic bursting between servers"; diff --git a/modules/m_testline.c b/modules/m_testline.c index 22bf9b7a0..60b49c215 100644 --- a/modules/m_testline.c +++ b/modules/m_testline.c @@ -27,17 +27,17 @@ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ -#include "stdinc.h" -#include "send.h" -#include "client.h" -#include "modules.h" -#include "msg.h" -#include "hash.h" -#include "hostmask.h" -#include "numeric.h" -#include "s_conf.h" -#include "s_newconf.h" -#include "reject.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include static const char testline_desc[] = "Provides the ability to test I/K/D/X lines and RESVs"; diff --git a/modules/m_testmask.c b/modules/m_testmask.c index 46b431f87..1c61f6228 100644 --- a/modules/m_testmask.c +++ b/modules/m_testmask.c @@ -32,18 +32,18 @@ */ /* List of ircd includes from ../include/ */ -#include "stdinc.h" -#include "client.h" -#include "ircd.h" -#include "match.h" -#include "numeric.h" -#include "s_conf.h" -#include "logger.h" -#include "s_serv.h" -#include "send.h" -#include "msg.h" -#include "parse.h" -#include "modules.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include static const char testmask_desc[] = "Provides the TESTMASK command to show the number of clients matching a hostmask or GECOS"; diff --git a/modules/m_tginfo.c b/modules/m_tginfo.c index c30d65013..ce54f9f33 100644 --- a/modules/m_tginfo.c +++ b/modules/m_tginfo.c @@ -27,16 +27,16 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include "stdinc.h" -#include "client.h" -#include "match.h" -#include "hash.h" -#include "ircd.h" -#include "numeric.h" -#include "send.h" -#include "msg.h" -#include "modules.h" -#include "s_newconf.h" /* add_tgchange */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include /* add_tgchange */ static const char tginfo_desc[] = "Processes target change notifications from other servers"; diff --git a/modules/m_time.c b/modules/m_time.c index 4f4ae72a4..90468b6d3 100644 --- a/modules/m_time.c +++ b/modules/m_time.c @@ -22,17 +22,17 @@ * USA */ -#include "stdinc.h" -#include "client.h" -#include "ircd.h" -#include "numeric.h" -#include "s_conf.h" -#include "s_serv.h" -#include "send.h" -#include "msg.h" -#include "parse.h" -#include "modules.h" -#include "packet.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include static const char time_desc[] = "Provides the TIME command to show the current server time"; diff --git a/modules/m_topic.c b/modules/m_topic.c index a9b169a5e..6ab17c291 100644 --- a/modules/m_topic.c +++ b/modules/m_topic.c @@ -22,24 +22,24 @@ * USA */ -#include "stdinc.h" -#include "channel.h" -#include "client.h" -#include "hash.h" -#include "match.h" -#include "ircd.h" -#include "numeric.h" -#include "send.h" -#include "s_newconf.h" -#include "s_conf.h" -#include "s_serv.h" -#include "msg.h" -#include "parse.h" -#include "modules.h" -#include "packet.h" -#include "tgchange.h" -#include "logger.h" -#include "inline/stringops.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include static const char topic_desc[] = "Provides the TOPIC command to set, remove, and inspect channel topics"; diff --git a/modules/m_trace.c b/modules/m_trace.c index 38550667a..570231704 100644 --- a/modules/m_trace.c +++ b/modules/m_trace.c @@ -22,22 +22,22 @@ * USA */ -#include "stdinc.h" -#include "class.h" -#include "hook.h" -#include "client.h" -#include "hash.h" -#include "hash.h" -#include "match.h" -#include "ircd.h" -#include "numeric.h" -#include "s_serv.h" -#include "s_conf.h" -#include "s_newconf.h" -#include "send.h" -#include "msg.h" -#include "parse.h" -#include "modules.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include static const char trace_desc[] = "Provides the TRACE command to trace the route to a client or server"; diff --git a/modules/m_unreject.c b/modules/m_unreject.c index 9bed1b1ed..2384a6488 100644 --- a/modules/m_unreject.c +++ b/modules/m_unreject.c @@ -21,14 +21,14 @@ * USA */ -#include "stdinc.h" -#include "client.h" -#include "s_conf.h" -#include "hostmask.h" -#include "reject.h" -#include "msg.h" -#include "modules.h" -#include "send.h" +#include +#include +#include +#include +#include +#include +#include +#include static const char unreject_desc[] = "Provides the UNREJECT command to remove an IP from the reject cache"; diff --git a/modules/m_user.c b/modules/m_user.c index d0360039d..f727b67c2 100644 --- a/modules/m_user.c +++ b/modules/m_user.c @@ -22,18 +22,18 @@ * USA */ -#include "stdinc.h" -#include "client.h" -#include "match.h" -#include "ircd.h" -#include "numeric.h" -#include "s_user.h" -#include "send.h" -#include "s_conf.h" -#include "msg.h" -#include "parse.h" -#include "modules.h" -#include "s_assert.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include static const char user_desc[] = "Provides the USER command to register a new connection"; diff --git a/modules/m_userhost.c b/modules/m_userhost.c index 76e6cd17e..2c1e895e6 100644 --- a/modules/m_userhost.c +++ b/modules/m_userhost.c @@ -22,17 +22,17 @@ * USA */ -#include "stdinc.h" -#include "client.h" -#include "ircd.h" -#include "numeric.h" -#include "s_serv.h" -#include "send.h" -#include "match.h" -#include "msg.h" -#include "parse.h" -#include "modules.h" -#include "s_conf.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include static const char userhost_desc[] = "Provides the USERHOST command to show a user's host"; diff --git a/modules/m_users.c b/modules/m_users.c index af9be292f..e866853dc 100644 --- a/modules/m_users.c +++ b/modules/m_users.c @@ -22,16 +22,16 @@ * USA */ -#include "stdinc.h" -#include "client.h" -#include "ircd.h" -#include "numeric.h" -#include "s_serv.h" -#include "s_conf.h" -#include "send.h" -#include "msg.h" -#include "parse.h" -#include "modules.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include static const char users_desc[] = "Provides the USERS command to display connection statistics locally and globally"; diff --git a/modules/m_version.c b/modules/m_version.c index 02cc63696..3119c8a6b 100644 --- a/modules/m_version.c +++ b/modules/m_version.c @@ -22,17 +22,17 @@ * USA */ -#include -#include "client.h" -#include "ircd.h" -#include "numeric.h" -#include "s_conf.h" -#include "s_serv.h" -#include "supported.h" -#include "send.h" -#include "msg.h" -#include "parse.h" -#include "modules.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include static const char version_desc[] = "Provides the VERSION command to display server version information"; diff --git a/modules/m_wallops.c b/modules/m_wallops.c index 0a951b0d6..9016b6c8a 100644 --- a/modules/m_wallops.c +++ b/modules/m_wallops.c @@ -22,19 +22,19 @@ * USA */ -#include "stdinc.h" -#include "client.h" -#include "ircd.h" -#include "match.h" -#include "numeric.h" -#include "send.h" -#include "s_user.h" -#include "s_conf.h" -#include "s_newconf.h" -#include "msg.h" -#include "parse.h" -#include "modules.h" -#include "s_serv.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include static const char wallops_desc[] = "Provides the WALLOPS and OPERWALL commands to message online operators"; diff --git a/modules/m_who.c b/modules/m_who.c index aa674582b..786de814a 100644 --- a/modules/m_who.c +++ b/modules/m_who.c @@ -21,24 +21,24 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ -#include "stdinc.h" -#include "client.h" -#include "channel.h" -#include "hash.h" -#include "ircd.h" -#include "numeric.h" -#include "s_serv.h" -#include "send.h" -#include "match.h" -#include "s_conf.h" -#include "logger.h" -#include "msg.h" -#include "parse.h" -#include "modules.h" -#include "packet.h" -#include "s_newconf.h" -#include "ratelimit.h" -#include "supported.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #define FIELD_CHANNEL 0x0001 #define FIELD_HOP 0x0002 diff --git a/modules/m_whois.c b/modules/m_whois.c index a43b9109d..e95fc9c1c 100644 --- a/modules/m_whois.c +++ b/modules/m_whois.c @@ -22,26 +22,26 @@ * USA */ -#include "stdinc.h" -#include "client.h" -#include "hash.h" -#include "channel.h" -#include "hash.h" -#include "ircd.h" -#include "numeric.h" -#include "s_conf.h" -#include "s_serv.h" -#include "send.h" -#include "match.h" -#include "s_conf.h" -#include "logger.h" -#include "msg.h" -#include "parse.h" -#include "modules.h" -#include "hook.h" -#include "s_newconf.h" -#include "ratelimit.h" -#include "s_assert.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include static const char whois_desc[] = "Provides the WHOIS command to display information about a user"; diff --git a/modules/m_whowas.c b/modules/m_whowas.c index a5038cce8..c42788463 100644 --- a/modules/m_whowas.c +++ b/modules/m_whowas.c @@ -22,21 +22,21 @@ * USA */ -#include "stdinc.h" -#include "whowas.h" -#include "client.h" -#include "hash.h" -#include "match.h" -#include "ircd.h" -#include "ircd_defs.h" -#include "numeric.h" -#include "s_serv.h" -#include "s_user.h" -#include "send.h" -#include "s_conf.h" -#include "msg.h" -#include "parse.h" -#include "modules.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include static const char whowas_desc[] = "Provides the WHOWAS command to display information on a disconnected user"; diff --git a/modules/m_xline.c b/modules/m_xline.c index 8f557b496..d58592e99 100644 --- a/modules/m_xline.c +++ b/modules/m_xline.c @@ -28,27 +28,27 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include "stdinc.h" -#include "send.h" -#include "channel.h" -#include "client.h" -#include "defaults.h" -#include "class.h" -#include "ircd.h" -#include "numeric.h" -#include "logger.h" -#include "s_serv.h" -#include "whowas.h" -#include "match.h" -#include "hash.h" -#include "msg.h" -#include "parse.h" -#include "modules.h" -#include "s_conf.h" -#include "s_newconf.h" -#include "reject.h" -#include "bandbi.h" -#include "operhash.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include static const char xline_desc[] = "Provides management of GECOS bans via (UN)XLINE command"; diff --git a/modules/sno_routing.c b/modules/sno_routing.c index 241ec6f2a..6e58d8240 100644 --- a/modules/sno_routing.c +++ b/modules/sno_routing.c @@ -29,12 +29,12 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include "stdinc.h" -#include "modules.h" -#include "client.h" -#include "hook.h" -#include "ircd.h" -#include "send.h" +#include +#include +#include +#include +#include +#include static void h_nn_server_eob(struct Client *); static void h_nn_client_exit(hook_data_client_exit *); diff --git a/librb/src/Makefile.am b/rb/Makefile.am similarity index 67% rename from librb/src/Makefile.am rename to rb/Makefile.am index cd13ff69e..899dd9f5a 100644 --- a/librb/src/Makefile.am +++ b/rb/Makefile.am @@ -1,16 +1,9 @@ - AUTOMAKE_OPTIONS = foreign -AM_CPPFLAGS = -I. -I../include @SSL_CFLAGS@ @GNUTLS_CFLAGS@ @MBEDTLS_CFLAGS@ +pkgconfigdir = $(libdir)/pkgconfig +#pkgconfig_DATA = librb.pc -BUILT_SOURCES = version.c - -version.c: version.c.SH ../CREDITS - $(SHELL) ./version.c.SH - $(CP) version.c version.c.last - -version.lo: version.c ../include/serno.h - $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) $(INCLUDES) -c $< -o $@ +AM_CPPFLAGS = -I$(top_srcdir)/include @SSL_CFLAGS@ @GNUTLS_CFLAGS@ @MBEDTLS_CFLAGS@ librb_la_SOURCES = \ unix.c \ @@ -23,7 +16,7 @@ librb_la_SOURCES = \ gnutls.c \ nossl.c \ event.c \ - rb_lib.c \ + rb.c \ rb_memory.c \ linebuf.c \ tools.c \ diff --git a/librb/README.md b/rb/README.md similarity index 100% rename from librb/README.md rename to rb/README.md diff --git a/librb/src/arc4random.c b/rb/arc4random.c similarity index 99% rename from librb/src/arc4random.c rename to rb/arc4random.c index f6f53c76f..e2194d3dd 100644 --- a/librb/src/arc4random.c +++ b/rb/arc4random.c @@ -27,8 +27,7 @@ */ -#include -#include +#include #if !defined(HAVE_OPENSSL) && !defined(HAVE_GNUTLS) && !defined(HAVE_MBEDTLS) && !defined(HAVE_ARC4RANDOM) diff --git a/librb/src/balloc.c b/rb/balloc.c similarity index 99% rename from librb/src/balloc.c rename to rb/balloc.c index 2cbe4350f..2b5744014 100644 --- a/librb/src/balloc.c +++ b/rb/balloc.c @@ -55,8 +55,7 @@ * * */ -#include -#include +#include static void _rb_bh_fail(const char *reason, const char *file, int line) __attribute__((noreturn)); diff --git a/librb/src/commio.c b/rb/commio.c similarity index 99% rename from librb/src/commio.c rename to rb/commio.c index 252e6e9d2..a2f875389 100644 --- a/librb/src/commio.c +++ b/rb/commio.c @@ -23,11 +23,11 @@ * */ -#include -#include -#include -#include -#include +#include +#include +#include +#include + #ifdef HAVE_SYS_UIO_H #include #endif diff --git a/librb/src/crypt.c b/rb/crypt.c similarity index 99% rename from librb/src/crypt.c rename to rb/crypt.c index b2e372401..2fd66c2ef 100644 --- a/librb/src/crypt.c +++ b/rb/crypt.c @@ -27,8 +27,7 @@ * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include -#include +#include static char *rb_md5_crypt(const char *pw, const char *salt); static char *rb_des_crypt(const char *pw, const char *salt); diff --git a/librb/src/devpoll.c b/rb/devpoll.c similarity index 98% rename from librb/src/devpoll.c rename to rb/devpoll.c index 06d34ec04..79c1e04fc 100644 --- a/librb/src/devpoll.c +++ b/rb/devpoll.c @@ -24,10 +24,8 @@ * */ -#include -#include -#include -#include +#include +#include #if defined(HAVE_DEVPOLL) && (HAVE_SYS_DEVPOLL_H) #include diff --git a/librb/src/dictionary.c b/rb/dictionary.c similarity index 99% rename from librb/src/dictionary.c rename to rb/dictionary.c index f72ceca96..f509bdef8 100644 --- a/librb/src/dictionary.c +++ b/rb/dictionary.c @@ -22,9 +22,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include -#include -#include +#include struct rb_dictionary { diff --git a/librb/src/epoll.c b/rb/epoll.c similarity index 98% rename from librb/src/epoll.c rename to rb/epoll.c index 9af4bc674..0e1679916 100644 --- a/librb/src/epoll.c +++ b/rb/epoll.c @@ -27,17 +27,15 @@ #define _GNU_SOURCE 1 -#include -#include -#include -#include +#include +#include +#include + #if defined(HAVE_EPOLL_CTL) && (HAVE_SYS_EPOLL_H) #define USING_EPOLL -#include #include #if defined(HAVE_SIGNALFD) && (HAVE_SYS_SIGNALFD_H) && (USE_TIMER_CREATE) && (HAVE_SYS_UIO_H) -#include #include #include #define EPOLL_SCHED_EVENT 1 diff --git a/librb/src/event.c b/rb/event.c similarity index 98% rename from librb/src/event.c rename to rb/event.c index f678e3cce..c84e0bec4 100644 --- a/librb/src/event.c +++ b/rb/event.c @@ -41,10 +41,9 @@ * */ -#include -#include -#include -#include +#include +#include +#include #define EV_NAME_LEN 33 static char last_event_ran[EV_NAME_LEN]; diff --git a/librb/src/export-syms.txt b/rb/export-syms.txt similarity index 100% rename from librb/src/export-syms.txt rename to rb/export-syms.txt diff --git a/librb/src/gnutls.c b/rb/gnutls.c similarity index 99% rename from librb/src/gnutls.c rename to rb/gnutls.c index a352440a2..4a8ffb39a 100644 --- a/librb/src/gnutls.c +++ b/rb/gnutls.c @@ -22,11 +22,9 @@ * */ -#include -#include -#include -#include -#include +#include +#include +#include #ifdef HAVE_GNUTLS #include diff --git a/librb/src/helper.c b/rb/helper.c similarity index 98% rename from librb/src/helper.c rename to rb/helper.c index a8dabf3d9..8805d67dc 100644 --- a/librb/src/helper.c +++ b/rb/helper.c @@ -21,9 +21,8 @@ * */ -#include -#include -#include +#include +#include struct _rb_helper { diff --git a/librb/src/kqueue.c b/rb/kqueue.c similarity index 98% rename from librb/src/kqueue.c rename to rb/kqueue.c index 74f1bf345..166e6570e 100644 --- a/librb/src/kqueue.c +++ b/rb/kqueue.c @@ -24,10 +24,9 @@ * */ -#include -#include -#include -#include +#include +#include +#include #if defined(HAVE_SYS_EVENT_H) && (HAVE_KEVENT) diff --git a/librb/src/linebuf.c b/rb/linebuf.c similarity index 99% rename from librb/src/linebuf.c rename to rb/linebuf.c index 77fe9b7d8..c330bc39c 100644 --- a/librb/src/linebuf.c +++ b/rb/linebuf.c @@ -23,9 +23,8 @@ * */ -#include -#include -#include +#include +#include static rb_bh *rb_linebuf_heap; diff --git a/librb/src/mbedtls.c b/rb/mbedtls.c similarity index 99% rename from librb/src/mbedtls.c rename to rb/mbedtls.c index a8471fdcc..545250456 100644 --- a/librb/src/mbedtls.c +++ b/rb/mbedtls.c @@ -24,11 +24,9 @@ * */ -#include -#include -#include -#include -#include +#include +#include +#include #ifdef HAVE_MBEDTLS diff --git a/librb/src/mbedtls_embedded_data.h b/rb/mbedtls_embedded_data.h similarity index 100% rename from librb/src/mbedtls_embedded_data.h rename to rb/mbedtls_embedded_data.h diff --git a/librb/src/nossl.c b/rb/nossl.c similarity index 97% rename from librb/src/nossl.c rename to rb/nossl.c index 8d1ff67f1..5feee85a2 100644 --- a/librb/src/nossl.c +++ b/rb/nossl.c @@ -23,14 +23,12 @@ */ -#include -#include +#include + #if !defined(HAVE_OPENSSL) && !defined(HAVE_GNUTLS) && !defined(HAVE_MBEDTLS) - #include "arc4random.h" - -#include -#include +#include +#include int rb_setup_ssl_server(const char *cert, const char *keyfile, const char *dhfile, const char *cipher_list) diff --git a/librb/src/openssl.c b/rb/openssl.c similarity index 99% rename from librb/src/openssl.c rename to rb/openssl.c index 320de1460..da939adfb 100644 --- a/librb/src/openssl.c +++ b/rb/openssl.c @@ -22,13 +22,11 @@ * */ -#include -#include +#include #ifdef HAVE_OPENSSL - -#include -#include +#include +#include #include #include #include diff --git a/librb/src/patricia.c b/rb/patricia.c similarity index 99% rename from librb/src/patricia.c rename to rb/patricia.c index fe02c73c3..b5de94d52 100644 --- a/librb/src/patricia.c +++ b/rb/patricia.c @@ -19,8 +19,7 @@ * Network, Inc., and their contributors. * */ -#include -#include +#include /* Enable both of these to debug patricia.c * #define NOTYET 1 diff --git a/librb/src/poll.c b/rb/poll.c similarity index 98% rename from librb/src/poll.c rename to rb/poll.c index 0356776cf..c41379a9f 100644 --- a/librb/src/poll.c +++ b/rb/poll.c @@ -23,9 +23,8 @@ * USA * */ -#include -#include -#include +#include +#include #if defined(HAVE_POLL) && (HAVE_SYS_POLL_H) #include diff --git a/librb/src/ports.c b/rb/ports.c similarity index 98% rename from librb/src/ports.c rename to rb/ports.c index ba12e5a46..e9e2c8dbf 100644 --- a/librb/src/ports.c +++ b/rb/ports.c @@ -25,12 +25,11 @@ * */ -#include -#include -#include -#include -#if defined(HAVE_PORT_H) && (HAVE_PORT_CREATE) +#include +#include +#include +#if defined(HAVE_PORT_H) && (HAVE_PORT_CREATE) #include #define PE_LENGTH 128 diff --git a/librb/src/radixtree.c b/rb/radixtree.c similarity index 99% rename from librb/src/radixtree.c rename to rb/radixtree.c index abc153fae..4b73da5b8 100644 --- a/librb/src/radixtree.c +++ b/rb/radixtree.c @@ -32,9 +32,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include -#include -#include +#include rb_dlink_list radixtree_list = {NULL, NULL, 0}; diff --git a/librb/src/rawbuf.c b/rb/rawbuf.c similarity index 98% rename from librb/src/rawbuf.c rename to rb/rawbuf.c index 4e83270ba..f66235291 100644 --- a/librb/src/rawbuf.c +++ b/rb/rawbuf.c @@ -21,9 +21,8 @@ * USA * */ -#include -#include -#include +#include +#include #define RAWBUF_SIZE 1024 struct _rawbuf diff --git a/librb/src/rb_lib.c b/rb/rb.c similarity index 98% rename from librb/src/rb_lib.c rename to rb/rb.c index 3d5b7b7e8..a9e5e09fd 100644 --- a/librb/src/rb_lib.c +++ b/rb/rb.c @@ -22,16 +22,13 @@ * */ -#include - +#include +#include +#include #ifdef HAVE_EXECINFO_H #include #endif -#include -#include -#include - static log_cb *rb_log; static restart_cb *rb_restart; static die_cb *rb_die; @@ -188,7 +185,7 @@ rb_set_time(void) memcpy(&rb_time, &newtime, sizeof(struct timeval)); } -extern const char *librb_serno; +extern const char *rb_serno; const char * rb_lib_version(void) @@ -196,7 +193,7 @@ rb_lib_version(void) static char version_info[512]; char ssl_info[512]; rb_get_ssl_info(ssl_info, sizeof(ssl_info)); - snprintf(version_info, sizeof(version_info), "librb version: %s - %s", librb_serno, ssl_info); + snprintf(version_info, sizeof(version_info), "librb version: %s - %s", rb_serno, ssl_info); return version_info; } diff --git a/librb/src/rb_memory.c b/rb/rb_memory.c similarity index 96% rename from librb/src/rb_memory.c rename to rb/rb_memory.c index 32b2689a0..b1db79d94 100644 --- a/librb/src/rb_memory.c +++ b/rb/rb_memory.c @@ -22,8 +22,8 @@ * USA * */ -#include -#include + +#include void rb_outofmemory(void) diff --git a/librb/src/select.c b/rb/select.c similarity index 98% rename from librb/src/select.c rename to rb/select.c index 61d464a4e..d30ff2d8b 100644 --- a/librb/src/select.c +++ b/rb/select.c @@ -25,9 +25,8 @@ */ #define FD_SETSIZE 65535 -#include -#include -#include +#include +#include #if defined(HAVE_SELECT) || defined(_WIN32) diff --git a/librb/src/sigio.c b/rb/sigio.c similarity index 98% rename from librb/src/sigio.c rename to rb/sigio.c index 0c4846269..02c2add6b 100644 --- a/librb/src/sigio.c +++ b/rb/sigio.c @@ -29,11 +29,9 @@ #define _GNU_SOURCE 1 /* Needed for F_SETSIG */ #endif -#include -#include -#include -#include -#include /* Yes this needs to be before the ifdef */ +#include +#include +#include #if defined(HAVE_SYS_POLL_H) && (HAVE_POLL) && (F_SETSIG) #define USING_SIGIO @@ -42,7 +40,6 @@ #ifdef USING_SIGIO -#include #include #if defined(USE_TIMER_CREATE) diff --git a/librb/src/tools.c b/rb/tools.c similarity index 99% rename from librb/src/tools.c rename to rb/tools.c index 42dcb9e9e..33aa3ea9c 100644 --- a/librb/src/tools.c +++ b/rb/tools.c @@ -33,9 +33,7 @@ */ #define _GNU_SOURCE 1 -#include -#include -#include +#include /* diff --git a/librb/src/unix.c b/rb/unix.c similarity index 98% rename from librb/src/unix.c rename to rb/unix.c index 0fab90a9c..d0bbcbd9e 100644 --- a/librb/src/unix.c +++ b/rb/unix.c @@ -23,8 +23,7 @@ * */ -#include -#include +#include #ifndef _WIN32 diff --git a/librb/src/version.c.SH b/rb/version.c similarity index 63% rename from librb/src/version.c.SH rename to rb/version.c index 22cb63f21..411d21e3e 100644 --- a/librb/src/version.c.SH +++ b/rb/version.c @@ -1,22 +1,3 @@ -#!/bin/sh - - -spitshell=cat -package=librb - -echo "Extracting $package/src/version.c..." - -if test -r version.c.last -then - generation=`sed -n 's/^const char \*generation = \"\(.*\)\";/\1/p' < version.c.last` - if test ! "$generation" ; then generation=0; fi -else - generation=0 -fi - -generation=`expr $generation + 1` - -$spitshell >version.c <version.c < -#include "../include/serno.h" - -const char *librb_generation = "$generation"; -const char *librb_serno = SERNO; -const unsigned long int librb_datecode = DATECODE; - -const char *librb_infotext[] = +const char *rb_version = RB_VERSION; +const char *rb_datestr = RB_DATESTR; +const time_t rb_datecode = RB_DATECODE; +const char *rb_creation = RB_DATESTR; +const char *rb_serno = RB_DATESTR; +const char *rb_infotext[] = { - "$package --", + "librb --", "Based on the original code written by Jarkko Oikarinen", "Copyright 1988, 1989, 1990, 1991 University of Oulu, Computing Center", "Copyright (c) 1996-2001 Hybrid Development Team", @@ -62,15 +40,8 @@ const char *librb_infotext[] = "published by the Free Software Foundation; either version 2, or", "(at your option) any later version.", "", -!SUB!THIS! - -IFS=' -' -for i in `grep -v '^$Id' ../CREDITS |tr -d '"'` ; do -echo " \"$i\"," >> version.c -done -$spitshell >>version.c < -#include -#include +#include +#include #ifdef _WIN32 diff --git a/scripts/application.sh b/scripts/application.sh index 69b158aba..722c841c6 100755 --- a/scripts/application.sh +++ b/scripts/application.sh @@ -28,8 +28,8 @@ fi SERNO=`git log -1 --date=format:%Y%m%d --pretty=format:%cd-%h` DATECODE=`git log -1 --pretty=format:%ct` -echo "[charybdis] Generating include/serno.h for tip $MYTIP." -cat << _EOF_ > include/serno.h +echo "[charybdis] Generating include/ircd/serno.h for tip $MYTIP." +cat << _EOF_ > include/ircd/serno.h /* Generated automatically by makepackage. Any changes made here will be lost. */ #define SERNO "$SERNO" #define DATECODE ${DATECODE}UL diff --git a/ssld/Makefile.am b/ssld/Makefile.am index 72837a2c1..8c3109685 100644 --- a/ssld/Makefile.am +++ b/ssld/Makefile.am @@ -1,7 +1,7 @@ -pkglibexec_PROGRAMS = ssld +bin_PROGRAMS = ssld AM_CFLAGS=$(WARNFLAGS) -AM_CPPFLAGS = -I../include -I../librb/include +AM_CPPFLAGS = -I$(top_srcdir)/include ssld_SOURCES = ssld.c -ssld_LDADD = ../librb/src/librb.la @ZLIB_LD@ +ssld_LDADD = $(top_srcdir)/rb/librb.la @ZLIB_LD@ diff --git a/ssld/ssld.c b/ssld/ssld.c index d06a198b1..5d29671aa 100644 --- a/ssld/ssld.c +++ b/ssld/ssld.c @@ -20,7 +20,7 @@ */ -#include "stdinc.h" +#include #ifdef HAVE_LIBZ #include diff --git a/tools/Makefile.am b/tools/Makefile.am index 607bca31e..274de4e09 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -1,9 +1,9 @@ bin_PROGRAMS = charybdis-mkpasswd charybdis-mkfingerprint AM_CFLAGS=$(WARNFLAGS) -AM_CPPFLAGS = $(DEFAULT_INCLUDES) -I../librb/include -I. +AM_CPPFLAGS = $(DEFAULT_INCLUDES) -I$(top_srcdir)/include charybdis_mkpasswd_SOURCES = mkpasswd.c -charybdis_mkpasswd_LDADD = ../librb/src/librb.la +charybdis_mkpasswd_LDADD = $(top_srcdir)/rb/librb.la charybdis_mkfingerprint_SOURCES = mkfingerprint.c -charybdis_mkfingerprint_LDADD = ../librb/src/librb.la +charybdis_mkfingerprint_LDADD = $(top_srcdir)/rb/librb.la diff --git a/tools/mkfingerprint.c b/tools/mkfingerprint.c index 8f47c70f3..aaacc0445 100644 --- a/tools/mkfingerprint.c +++ b/tools/mkfingerprint.c @@ -17,12 +17,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 * USA */ -#include -#include -#include -#include -#include "rb_lib.h" -#include "certfp.h" +#include +#include int main(int argc, char *argv[]) { diff --git a/tools/mkpasswd.c b/tools/mkpasswd.c index 57f73e4f1..41456f5f8 100644 --- a/tools/mkpasswd.c +++ b/tools/mkpasswd.c @@ -9,13 +9,7 @@ * /dev/random for salt generation added by * Aaron Sethman */ -#include -#include -#include -#include -#include -#include -#include "rb_lib.h" +#include #ifndef __MINGW32__ #include #endif diff --git a/wsockd/Makefile.am b/wsockd/Makefile.am index 706600ead..159d2d221 100644 --- a/wsockd/Makefile.am +++ b/wsockd/Makefile.am @@ -1,7 +1,7 @@ -pkglibexec_PROGRAMS = wsockd +bin_PROGRAMS = wsockd AM_CFLAGS=$(WARNFLAGS) -AM_CPPFLAGS = -I../include -I../librb/include +AM_CPPFLAGS = -I$(top_srcdir)/include wsockd_SOURCES = wsockd.c sha1.c -wsockd_LDADD = ../librb/src/librb.la +wsockd_LDADD = $(top_srcdir)/rb/librb.la diff --git a/wsockd/sha1.c b/wsockd/sha1.c index f3fce5318..1996e812d 100644 --- a/wsockd/sha1.c +++ b/wsockd/sha1.c @@ -11,7 +11,7 @@ * 34AA973C D4C4DAA4 F61EEB2B DBAD2731 6534016F */ -#include "stdinc.h" +#include #ifdef _WIN32 #include // for htonl() diff --git a/wsockd/wsockd.c b/wsockd/wsockd.c index ec9de8c01..2582cb57a 100644 --- a/wsockd/wsockd.c +++ b/wsockd/wsockd.c @@ -20,7 +20,7 @@ * USA */ -#include "stdinc.h" +#include #include "sha1.h" #define MAXPASSFD 4