summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2015-12-14 16:52:24 -0500
committerAdam <Adam@anope.org>2015-12-14 16:52:24 -0500
commit6302f980fe6dad83aab7d2dc1046dadea5ffd939 (patch)
tree4c27d33f55fc32ce34827977932dac4b3e5ceedd /modules
parent64dac60071fab652745a6e7a06cf6b7bdbbd3625 (diff)
New source tree structure for modules. From commands/cs_access => chanserv/access etc.
Diffstat (limited to 'modules')
-rw-r--r--modules/CMakeLists.txt43
-rw-r--r--modules/botserv/CMakeLists.txt1
-rw-r--r--modules/botserv/assign.cpp (renamed from modules/commands/bs_assign.cpp)0
-rw-r--r--modules/botserv/autoassign.cpp (renamed from modules/bs_autoassign.cpp)0
-rw-r--r--modules/botserv/badwords.cpp (renamed from modules/commands/bs_badwords.cpp)0
-rw-r--r--modules/botserv/bot.cpp (renamed from modules/commands/bs_bot.cpp)0
-rw-r--r--modules/botserv/botlist.cpp (renamed from modules/commands/bs_botlist.cpp)0
-rw-r--r--modules/botserv/control.cpp (renamed from modules/commands/bs_control.cpp)0
-rw-r--r--modules/botserv/info.cpp (renamed from modules/commands/bs_info.cpp)0
-rw-r--r--modules/botserv/kick.cpp (renamed from modules/commands/bs_kick.cpp)0
-rw-r--r--modules/botserv/main/CMakeLists.txt (renamed from modules/pseudoclients/botserv/CMakeLists.txt)0
-rw-r--r--modules/botserv/main/botserv.cpp (renamed from modules/pseudoclients/botserv/botserv.cpp)0
-rw-r--r--modules/botserv/set.cpp (renamed from modules/commands/bs_set.cpp)0
-rw-r--r--modules/chanserv/CMakeLists.txt1
-rw-r--r--modules/chanserv/akick.cpp (renamed from modules/commands/cs_akick.cpp)0
-rw-r--r--modules/chanserv/ban.cpp (renamed from modules/commands/cs_ban.cpp)0
-rw-r--r--modules/chanserv/clone.cpp (renamed from modules/commands/cs_clone.cpp)0
-rw-r--r--modules/chanserv/cs_access.old (renamed from modules/commands/cs_access.cpp)5
-rw-r--r--modules/chanserv/cs_flags.old (renamed from modules/commands/cs_flags.cpp)6
-rw-r--r--modules/chanserv/cs_xop.old (renamed from modules/commands/cs_xop.cpp)5
-rw-r--r--modules/chanserv/drop.cpp (renamed from modules/commands/cs_drop.cpp)0
-rw-r--r--modules/chanserv/enforce.cpp (renamed from modules/commands/cs_enforce.cpp)0
-rw-r--r--modules/chanserv/entrymsg.cpp (renamed from modules/commands/cs_entrymsg.cpp)0
-rw-r--r--modules/chanserv/getkey.cpp (renamed from modules/commands/cs_getkey.cpp)0
-rw-r--r--modules/chanserv/info.cpp (renamed from modules/commands/cs_info.cpp)0
-rw-r--r--modules/chanserv/invite.cpp (renamed from modules/commands/cs_invite.cpp)0
-rw-r--r--modules/chanserv/kick.cpp (renamed from modules/commands/cs_kick.cpp)0
-rw-r--r--modules/chanserv/list.cpp (renamed from modules/commands/cs_list.cpp)0
-rw-r--r--modules/chanserv/log.cpp (renamed from modules/commands/cs_log.cpp)0
-rw-r--r--modules/chanserv/main/CMakeLists.txt (renamed from modules/pseudoclients/chanserv/CMakeLists.txt)0
-rw-r--r--modules/chanserv/main/chanaccess.cpp (renamed from modules/pseudoclients/chanserv/chanaccess.cpp)0
-rw-r--r--modules/chanserv/main/chanaccess.h (renamed from modules/pseudoclients/chanserv/chanaccess.h)0
-rw-r--r--modules/chanserv/main/chanaccesstype.h (renamed from modules/pseudoclients/chanserv/chanaccesstype.h)0
-rw-r--r--modules/chanserv/main/channel.cpp (renamed from modules/pseudoclients/chanserv/channel.cpp)0
-rw-r--r--modules/chanserv/main/channel.h (renamed from modules/pseudoclients/chanserv/channel.h)0
-rw-r--r--modules/chanserv/main/channeltype.cpp (renamed from modules/pseudoclients/chanserv/channeltype.cpp)0
-rw-r--r--modules/chanserv/main/channeltype.h (renamed from modules/pseudoclients/chanserv/channeltype.h)0
-rw-r--r--modules/chanserv/main/chanserv.cpp (renamed from modules/pseudoclients/chanserv/chanserv.cpp)0
-rw-r--r--modules/chanserv/main/level.cpp (renamed from modules/pseudoclients/chanserv/level.cpp)0
-rw-r--r--modules/chanserv/main/level.h (renamed from modules/pseudoclients/chanserv/level.h)0
-rw-r--r--modules/chanserv/main/leveltype.h (renamed from modules/pseudoclients/chanserv/leveltype.h)0
-rw-r--r--modules/chanserv/main/mode.cpp (renamed from modules/pseudoclients/chanserv/mode.cpp)0
-rw-r--r--modules/chanserv/main/mode.h (renamed from modules/pseudoclients/chanserv/mode.h)0
-rw-r--r--modules/chanserv/main/modetype.h (renamed from modules/pseudoclients/chanserv/modetype.h)0
-rw-r--r--modules/chanserv/mode.cpp (renamed from modules/commands/cs_mode.cpp)0
-rw-r--r--modules/chanserv/register.cpp (renamed from modules/commands/cs_register.cpp)0
-rw-r--r--modules/chanserv/seen.cpp (renamed from modules/commands/cs_seen.cpp)0
-rw-r--r--modules/chanserv/set.cpp (renamed from modules/commands/cs_set.cpp)0
-rw-r--r--modules/chanserv/set_misc.cpp (renamed from modules/commands/cs_set_misc.cpp)0
-rw-r--r--modules/chanserv/status.cpp (renamed from modules/commands/cs_status.cpp)0
-rw-r--r--modules/chanserv/statusupdate.cpp (renamed from modules/cs_statusupdate.cpp)0
-rw-r--r--modules/chanserv/suspend.cpp (renamed from modules/commands/cs_suspend.cpp)0
-rw-r--r--modules/chanserv/sync.cpp (renamed from modules/commands/cs_sync.cpp)0
-rw-r--r--modules/chanserv/topic.cpp (renamed from modules/commands/cs_topic.cpp)0
-rw-r--r--modules/chanserv/unban.cpp (renamed from modules/commands/cs_unban.cpp)0
-rw-r--r--modules/chanserv/updown.cpp (renamed from modules/commands/cs_updown.cpp)0
-rw-r--r--modules/database/CMakeLists.txt1
-rw-r--r--modules/database/flatfile.cpp (renamed from modules/database/db_flatfile.cpp)0
-rw-r--r--modules/database/old.cpp (renamed from modules/database/db_old.cpp)0
-rw-r--r--modules/database/redis.cpp (renamed from modules/database/db_redis.cpp)0
-rw-r--r--modules/database/sql.cpp (renamed from modules/database/db_sql.cpp)0
-rw-r--r--modules/dns.cpp (renamed from modules/m_dns.cpp)0
-rw-r--r--modules/dnsbl.cpp (renamed from modules/m_dnsbl.cpp)0
-rw-r--r--modules/encryption/CMakeLists.txt1
-rw-r--r--modules/encryption/bcrypt.cpp (renamed from modules/encryption/enc_bcrypt.cpp)0
-rw-r--r--modules/encryption/md5.cpp (renamed from modules/encryption/enc_md5.cpp)0
-rw-r--r--modules/encryption/none.cpp (renamed from modules/encryption/enc_none.cpp)0
-rw-r--r--modules/encryption/old.cpp (renamed from modules/encryption/enc_old.cpp)0
-rw-r--r--modules/encryption/sha1.cpp (renamed from modules/encryption/enc_sha1.cpp)0
-rw-r--r--modules/encryption/sha256.cpp (renamed from modules/encryption/enc_sha256.cpp)0
-rw-r--r--modules/extra/ldap.cpp (renamed from modules/extra/m_ldap.cpp)0
-rw-r--r--modules/extra/ldap_authentication.cpp (renamed from modules/extra/m_ldap_authentication.cpp)0
-rw-r--r--modules/extra/ldap_oper.cpp (renamed from modules/extra/m_ldap_oper.cpp)0
-rw-r--r--modules/extra/mysql.cpp (renamed from modules/extra/m_mysql.cpp)0
-rw-r--r--modules/extra/sasl_dh-aes.cpp (renamed from modules/extra/m_sasl_dh-aes.cpp)0
-rw-r--r--modules/extra/sasl_dh-blowfish.cpp (renamed from modules/extra/m_sasl_dh-blowfish.cpp)0
-rw-r--r--modules/extra/sql_authentication.cpp (renamed from modules/extra/m_sql_authentication.cpp)0
-rw-r--r--modules/extra/sql_log.cpp (renamed from modules/extra/m_sql_log.cpp)0
-rw-r--r--modules/extra/sql_oper.cpp (renamed from modules/extra/m_sql_oper.cpp)0
-rw-r--r--modules/extra/sqlite.cpp (renamed from modules/extra/m_sqlite.cpp)0
-rw-r--r--modules/extra/ssl_gnutls.cpp (renamed from modules/extra/m_ssl_gnutls.cpp)0
-rw-r--r--modules/extra/ssl_openssl.cpp (renamed from modules/extra/m_ssl_openssl.cpp)0
-rw-r--r--modules/extra/stats/chanstats.cpp (renamed from modules/extra/stats/m_chanstats.cpp)0
-rw-r--r--modules/global/CMakeLists.txt1
-rw-r--r--modules/global/global.cpp (renamed from modules/commands/gl_global.cpp)0
-rw-r--r--modules/global/main/CMakeLists.txt (renamed from modules/pseudoclients/memoserv/CMakeLists.txt)0
-rw-r--r--modules/global/main/global.cpp (renamed from modules/pseudoclients/global.cpp)0
-rw-r--r--modules/greet.cpp (renamed from modules/commands/greet.cpp)0
-rw-r--r--modules/help.cpp (renamed from modules/commands/help.cpp)0
-rw-r--r--modules/helpchan.cpp (renamed from modules/m_helpchan.cpp)0
-rw-r--r--modules/hostserv/CMakeLists.txt1
-rw-r--r--modules/hostserv/del.cpp (renamed from modules/commands/hs_del.cpp)0
-rw-r--r--modules/hostserv/group.cpp (renamed from modules/commands/hs_group.cpp)0
-rw-r--r--modules/hostserv/list.cpp (renamed from modules/commands/hs_list.cpp)0
-rw-r--r--modules/hostserv/main/CMakeLists.txt (renamed from modules/pseudoclients/nickserv/CMakeLists.txt)0
-rw-r--r--modules/hostserv/main/hostserv.cpp (renamed from modules/pseudoclients/hostserv.cpp)0
-rw-r--r--modules/hostserv/off.cpp (renamed from modules/commands/hs_off.cpp)0
-rw-r--r--modules/hostserv/on.cpp (renamed from modules/commands/hs_on.cpp)0
-rw-r--r--modules/hostserv/request.cpp (renamed from modules/commands/hs_request.cpp)0
-rw-r--r--modules/hostserv/set.cpp (renamed from modules/commands/hs_set.cpp)0
-rw-r--r--modules/httpd.cpp (renamed from modules/m_httpd.cpp)0
-rw-r--r--modules/memoserv/CMakeLists.txt1
-rw-r--r--modules/memoserv/cancel.cpp (renamed from modules/commands/ms_cancel.cpp)0
-rw-r--r--modules/memoserv/check.cpp (renamed from modules/commands/ms_check.cpp)0
-rw-r--r--modules/memoserv/del.cpp (renamed from modules/commands/ms_del.cpp)0
-rw-r--r--modules/memoserv/ignore.cpp (renamed from modules/commands/ms_ignore.cpp)0
-rw-r--r--modules/memoserv/info.cpp (renamed from modules/commands/ms_info.cpp)0
-rw-r--r--modules/memoserv/list.cpp (renamed from modules/commands/ms_list.cpp)0
-rw-r--r--modules/memoserv/main/CMakeLists.txt1
-rw-r--r--modules/memoserv/main/ignore.cpp (renamed from modules/pseudoclients/memoserv/ignore.cpp)0
-rw-r--r--modules/memoserv/main/ignore.h (renamed from modules/pseudoclients/memoserv/ignore.h)0
-rw-r--r--modules/memoserv/main/ignoretype.cpp (renamed from modules/pseudoclients/memoserv/ignoretype.cpp)0
-rw-r--r--modules/memoserv/main/ignoretype.h (renamed from modules/pseudoclients/memoserv/ignoretype.h)0
-rw-r--r--modules/memoserv/main/memo.cpp (renamed from modules/pseudoclients/memoserv/memo.cpp)0
-rw-r--r--modules/memoserv/main/memo.h (renamed from modules/pseudoclients/memoserv/memo.h)0
-rw-r--r--modules/memoserv/main/memoinfo.cpp (renamed from modules/pseudoclients/memoserv/memoinfo.cpp)0
-rw-r--r--modules/memoserv/main/memoinfo.h (renamed from modules/pseudoclients/memoserv/memoinfo.h)0
-rw-r--r--modules/memoserv/main/memoinfotype.cpp (renamed from modules/pseudoclients/memoserv/memoinfotype.cpp)0
-rw-r--r--modules/memoserv/main/memoinfotype.h (renamed from modules/pseudoclients/memoserv/memoinfotype.h)0
-rw-r--r--modules/memoserv/main/memoserv.cpp (renamed from modules/pseudoclients/memoserv/memoserv.cpp)0
-rw-r--r--modules/memoserv/main/memotype.cpp (renamed from modules/pseudoclients/memoserv/memotype.cpp)0
-rw-r--r--modules/memoserv/main/memotype.h (renamed from modules/pseudoclients/memoserv/memotype.h)0
-rw-r--r--modules/memoserv/read.cpp (renamed from modules/commands/ms_read.cpp)0
-rw-r--r--modules/memoserv/rsend.cpp (renamed from modules/commands/ms_rsend.cpp)0
-rw-r--r--modules/memoserv/send.cpp (renamed from modules/commands/ms_send.cpp)0
-rw-r--r--modules/memoserv/sendall.cpp (renamed from modules/commands/ms_sendall.cpp)0
-rw-r--r--modules/memoserv/set.cpp (renamed from modules/commands/ms_set.cpp)0
-rw-r--r--modules/memoserv/staff.cpp (renamed from modules/commands/ms_staff.cpp)0
-rw-r--r--modules/nickserv/CMakeLists.txt1
-rw-r--r--modules/nickserv/access.cpp (renamed from modules/commands/ns_access.cpp)0
-rw-r--r--modules/nickserv/ajoin.cpp (renamed from modules/commands/ns_ajoin.cpp)0
-rw-r--r--modules/nickserv/alist.cpp (renamed from modules/commands/ns_alist.cpp)0
-rw-r--r--modules/nickserv/cert.cpp (renamed from modules/commands/ns_cert.cpp)0
-rw-r--r--modules/nickserv/drop.cpp (renamed from modules/commands/ns_drop.cpp)0
-rw-r--r--modules/nickserv/getemail.cpp (renamed from modules/commands/ns_getemail.cpp)0
-rw-r--r--modules/nickserv/getpass.cpp (renamed from modules/commands/ns_getpass.cpp)0
-rw-r--r--modules/nickserv/group.cpp (renamed from modules/commands/ns_group.cpp)0
-rw-r--r--modules/nickserv/identify.cpp (renamed from modules/commands/ns_identify.cpp)0
-rw-r--r--modules/nickserv/info.cpp (renamed from modules/commands/ns_info.cpp)0
-rw-r--r--modules/nickserv/list.cpp (renamed from modules/commands/ns_list.cpp)0
-rw-r--r--modules/nickserv/logout.cpp (renamed from modules/commands/ns_logout.cpp)0
-rw-r--r--modules/nickserv/main/CMakeLists.txt1
-rw-r--r--modules/nickserv/main/account.cpp (renamed from modules/pseudoclients/nickserv/account.cpp)0
-rw-r--r--modules/nickserv/main/account.h (renamed from modules/pseudoclients/nickserv/account.h)0
-rw-r--r--modules/nickserv/main/accounttype.cpp (renamed from modules/pseudoclients/nickserv/accounttype.cpp)0
-rw-r--r--modules/nickserv/main/accounttype.h (renamed from modules/pseudoclients/nickserv/accounttype.h)0
-rw-r--r--modules/nickserv/main/identifyrequest.cpp (renamed from modules/pseudoclients/nickserv/identifyrequest.cpp)0
-rw-r--r--modules/nickserv/main/identifyrequest.h (renamed from modules/pseudoclients/nickserv/identifyrequest.h)0
-rw-r--r--modules/nickserv/main/mode.cpp (renamed from modules/pseudoclients/nickserv/mode.cpp)0
-rw-r--r--modules/nickserv/main/mode.h (renamed from modules/pseudoclients/nickserv/mode.h)0
-rw-r--r--modules/nickserv/main/modetype.h (renamed from modules/pseudoclients/nickserv/modetype.h)0
-rw-r--r--modules/nickserv/main/nick.cpp (renamed from modules/pseudoclients/nickserv/nick.cpp)0
-rw-r--r--modules/nickserv/main/nick.h (renamed from modules/pseudoclients/nickserv/nick.h)0
-rw-r--r--modules/nickserv/main/nickserv.cpp (renamed from modules/pseudoclients/nickserv/nickserv.cpp)0
-rw-r--r--modules/nickserv/main/nicktype.cpp (renamed from modules/pseudoclients/nickserv/nicktype.cpp)0
-rw-r--r--modules/nickserv/main/nicktype.h (renamed from modules/pseudoclients/nickserv/nicktype.h)0
-rw-r--r--modules/nickserv/maxemail.cpp (renamed from modules/ns_maxemail.cpp)0
-rw-r--r--modules/nickserv/recover.cpp (renamed from modules/commands/ns_recover.cpp)0
-rw-r--r--modules/nickserv/register.cpp (renamed from modules/commands/ns_register.cpp)0
-rw-r--r--modules/nickserv/resetpass.cpp (renamed from modules/commands/ns_resetpass.cpp)0
-rw-r--r--modules/nickserv/set.cpp (renamed from modules/commands/ns_set.cpp)0
-rw-r--r--modules/nickserv/set_misc.cpp (renamed from modules/commands/ns_set_misc.cpp)0
-rw-r--r--modules/nickserv/status.cpp (renamed from modules/commands/ns_status.cpp)0
-rw-r--r--modules/nickserv/suspend.cpp (renamed from modules/commands/ns_suspend.cpp)0
-rw-r--r--modules/nickserv/update.cpp (renamed from modules/commands/ns_update.cpp)0
-rw-r--r--modules/operserv/CMakeLists.txt1
-rw-r--r--modules/operserv/akill.cpp (renamed from modules/commands/os_akill.cpp)0
-rw-r--r--modules/operserv/chankill.cpp (renamed from modules/commands/os_chankill.cpp)0
-rw-r--r--modules/operserv/config.cpp (renamed from modules/commands/os_config.cpp)0
-rw-r--r--modules/operserv/defcon.cpp (renamed from modules/commands/os_defcon.cpp)0
-rw-r--r--modules/operserv/dns.cpp (renamed from modules/commands/os_dns.cpp)0
-rw-r--r--modules/operserv/forbid.cpp (renamed from modules/commands/os_forbid.cpp)0
-rw-r--r--modules/operserv/ignore.cpp (renamed from modules/commands/os_ignore.cpp)0
-rw-r--r--modules/operserv/info.cpp (renamed from modules/commands/os_info.cpp)0
-rw-r--r--modules/operserv/jupe.cpp (renamed from modules/commands/os_jupe.cpp)0
-rw-r--r--modules/operserv/kick.cpp (renamed from modules/commands/os_kick.cpp)0
-rw-r--r--modules/operserv/kill.cpp (renamed from modules/commands/os_kill.cpp)0
-rw-r--r--modules/operserv/list.cpp (renamed from modules/commands/os_list.cpp)0
-rw-r--r--modules/operserv/login.cpp (renamed from modules/commands/os_login.cpp)0
-rw-r--r--modules/operserv/logsearch.cpp (renamed from modules/commands/os_logsearch.cpp)0
-rw-r--r--modules/operserv/main/CMakeLists.txt1
-rw-r--r--modules/operserv/main/operserv.cpp (renamed from modules/pseudoclients/operserv.cpp)0
-rw-r--r--modules/operserv/mode.cpp (renamed from modules/commands/os_mode.cpp)0
-rw-r--r--modules/operserv/modinfo.cpp (renamed from modules/commands/os_modinfo.cpp)0
-rw-r--r--modules/operserv/module.cpp (renamed from modules/commands/os_module.cpp)0
-rw-r--r--modules/operserv/news.cpp (renamed from modules/commands/os_news.cpp)0
-rw-r--r--modules/operserv/noop.cpp (renamed from modules/commands/os_noop.cpp)0
-rw-r--r--modules/operserv/oline.cpp (renamed from modules/commands/os_oline.cpp)0
-rw-r--r--modules/operserv/oper.cpp (renamed from modules/commands/os_oper.cpp)0
-rw-r--r--modules/operserv/reload.cpp (renamed from modules/commands/os_reload.cpp)0
-rw-r--r--modules/operserv/session.cpp (renamed from modules/commands/os_session.cpp)0
-rw-r--r--modules/operserv/set.cpp (renamed from modules/commands/os_set.cpp)0
-rw-r--r--modules/operserv/shutdown.cpp (renamed from modules/commands/os_shutdown.cpp)0
-rw-r--r--modules/operserv/stats.cpp (renamed from modules/commands/os_stats.cpp)0
-rw-r--r--modules/operserv/svs.cpp (renamed from modules/commands/os_svs.cpp)0
-rw-r--r--modules/operserv/sxline.cpp (renamed from modules/commands/os_sxline.cpp)0
-rw-r--r--modules/operserv/update.cpp (renamed from modules/commands/os_update.cpp)0
-rw-r--r--modules/protocol/CMakeLists.txt1
-rw-r--r--modules/proxyscan.cpp (renamed from modules/m_proxyscan.cpp)0
-rw-r--r--modules/redis.cpp (renamed from modules/m_redis.cpp)0
-rw-r--r--modules/rewrite.cpp (renamed from modules/m_rewrite.cpp)0
-rw-r--r--modules/sasl.cpp (renamed from modules/m_sasl.cpp)0
-rw-r--r--modules/xmlrpc.cpp (renamed from modules/m_xmlrpc.cpp)0
-rw-r--r--modules/xmlrpc_main.cpp (renamed from modules/m_xmlrpc_main.cpp)0
204 files changed, 46 insertions, 26 deletions
diff --git a/modules/CMakeLists.txt b/modules/CMakeLists.txt
index 522ceb674..68a2a89b0 100644
--- a/modules/CMakeLists.txt
+++ b/modules/CMakeLists.txt
@@ -20,6 +20,13 @@ macro(build_modules SRC)
# Convert the real source file extension to have a .so extension
string(REGEX REPLACE "\\.cpp$" "" SO ${FNAME})
+ file(RELATIVE_PATH DEST "${Anope_SOURCE_DIR}/modules" ${SRC})
+ if(DEST)
+ set(TARG "module_${DEST}.${SO}")
+ else(DEST)
+ set(TARG "module_${SO}")
+ endif(DEST)
+
# Reset linker flags
set(TEMP_LDFLAGS)
# Reset extra dependencies
@@ -33,31 +40,31 @@ macro(build_modules SRC)
set(WIN32_MEMORY)
endif(MSVC)
# Generate the module and set its linker flags, also set it to depend on the main Anope executable to be built beforehand
- add_library(${SO} MODULE ${MODULE_SRC})
+ add_library(${TARG} MODULE ${MODULE_SRC})
# Windows requires this because it's weird
if(WIN32)
set(WIN32_NO_LIBS "/nodefaultlib:\"libcmt.lib\" /OPT:NOREF")
else(WIN32)
set(WIN32_NO_LIBS)
endif(WIN32)
- set_target_properties(${SO} PROPERTIES LINKER_LANGUAGE CXX PREFIX "" SUFFIX ".so" LINK_FLAGS "${TEMP_LDFLAGS} ${WIN32_NO_LIBS}" INSTALL_RPATH_USE_LINK_PATH ON BUILD_WITH_INSTALL_RPATH ON)
- add_dependencies(${SO} ${PROGRAM_NAME})
+ set_target_properties(${TARG} PROPERTIES LINKER_LANGUAGE CXX PREFIX "" LINK_FLAGS "${TEMP_LDFLAGS} ${WIN32_NO_LIBS}" INSTALL_RPATH_USE_LINK_PATH ON BUILD_WITH_INSTALL_RPATH ON OUTPUT_NAME "${SO}")
+ add_dependencies(${TARG} ${PROGRAM_NAME})
if(GETTEXT_FOUND)
- add_dependencies(${SO} module_language)
+ add_dependencies(${TARG} module_language)
endif(GETTEXT_FOUND)
- target_link_libraries(${SO} ${TEMP_DEPENDENCIES})
+ target_link_libraries(${TARG} ${TEMP_DEPENDENCIES})
# For Windows only, have the module link to the export library of Anope as well as wsock32 and Ws2_32 libraries (most of the modules probably don't need this, but this is to be on the safe side), also set its version
if(WIN32)
- target_link_libraries(${SO} ${PROGRAM_NAME} wsock32 Ws2_32 ${WIN32_MEMORY})
+ target_link_libraries(${TARG} ${PROGRAM_NAME} wsock32 Ws2_32 ${WIN32_MEMORY})
set_target_properties(${PROGRAM_NAME} PROPERTIES VERSION "${VERSION_DOTTED}")
else(WIN32)
if(APPLE)
- target_link_libraries(${SO} ${PROGRAM_NAME})
+ target_link_libraries(${TARG} ${PROGRAM_NAME})
endif(APPLE)
endif(WIN32)
calculate_dependencies(${MODULE_SRC})
# Set the module to be installed to the module directory under the data directory
- install(TARGETS ${SO} DESTINATION ${LIB_DIR}/modules)
+ install(TARGETS ${TARG} DESTINATION ${LIB_DIR}/modules/${DEST})
endif(CPP)
endif(IS_DIRECTORY "${MODULE_SRC}")
endforeach(MODULE_SRC ${MODULES_SRCS})
@@ -68,8 +75,14 @@ macro(build_subdir)
file(GLOB_RECURSE MODULES_SUBDIR_SRCS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.cpp")
list(SORT MODULES_SUBDIR_SRCS)
- GET_FILENAME_COMPONENT(FOLDER_NAME ${CMAKE_CURRENT_SOURCE_DIR} NAME)
- set(SO "${FOLDER_NAME}")
+ file(RELATIVE_PATH DEST "${Anope_SOURCE_DIR}/modules" ${CMAKE_CURRENT_SOURCE_DIR})
+ GET_FILENAME_COMPONENT(DIR_NAME ${DEST} DIRECTORY)
+ GET_FILENAME_COMPONENT(FOLDER_NAME ${DEST} NAME)
+ if(DIR_NAME)
+ set(SO "${DIR_NAME}.${FOLDER_NAME}")
+ else(DIR_NAME)
+ set(SO "${FOLDER_NAME}")
+ endif(DIR_NAME)
# Set all the files to use C++ as well as set their compile flags (use the module-specific compile flags, though)
set_source_files_properties(${MODULES_SUBDIR_SRCS} PROPERTIES LANGUAGE CXX COMPILE_FLAGS "${CXXFLAGS}")
@@ -107,15 +120,15 @@ macro(build_subdir)
set(WIN32_MEMORY)
endif(MSVC)
- # Generate the module and set it's linker flags, also set it to depend on the main Anope executable to be built beforehand
+ # Generate the module and set its linker flags, also set it to depend on the main Anope executable to be built beforehand
add_library(${SO} MODULE ${MODULES_SUBDIR_SRCS})
- set_target_properties(${SO} PROPERTIES LINKER_LANGUAGE CXX PREFIX "" SUFFIX ".so" LINK_FLAGS "${SUBDIR_LDFLAGS}" INSTALL_RPATH_USE_LINK_PATH ON BUILD_WITH_INSTALL_RPATH ON)
+ set_target_properties(${SO} PROPERTIES LINKER_LANGUAGE CXX PREFIX "" LINK_FLAGS "${SUBDIR_LDFLAGS}" INSTALL_RPATH_USE_LINK_PATH ON BUILD_WITH_INSTALL_RPATH ON OUTPUT_NAME "${FOLDER_NAME}")
add_dependencies(${SO} ${PROGRAM_NAME})
if(GETTEXT_FOUND)
add_dependencies(${SO} module_language)
endif(GETTEXT_FOUND)
target_link_libraries(${SO} ${SUBDIR_EXTRA_DEPENDS})
- # For Windows only, have the module link to the export library of Anope as well as wsock32 and Ws2_32 libraries (most of the modules probably don't need this, but this is to be on the safe side), also set it's version
+ # For Windows only, have the module link to the export library of Anope as well as wsock32 and Ws2_32 libraries (most of the modules probably don't need this, but this is to be on the safe side), also set its version
if(WIN32)
target_link_libraries(${SO} ${PROGRAM_NAME} wsock32 Ws2_32 ${WIN32_MEMORY})
set_target_properties(${PROGRAM_NAME} PROPERTIES VERSION "${VERSION_DOTTED}")
@@ -125,10 +138,8 @@ macro(build_subdir)
endif(APPLE)
endif(WIN32)
- # Set the module to be installed to the module directory under the data directory
- install(TARGETS ${SO} DESTINATION ${LIB_DIR}/modules)
+ install(TARGETS ${SO} DESTINATION ${LIB_DIR}/modules/${DIR_NAME})
endmacro(build_subdir)
-include_directories(${CMAKE_CURRENT_SOURCE_DIR})
build_modules(${CMAKE_CURRENT_SOURCE_DIR})
diff --git a/modules/botserv/CMakeLists.txt b/modules/botserv/CMakeLists.txt
new file mode 100644
index 000000000..cd225a94d
--- /dev/null
+++ b/modules/botserv/CMakeLists.txt
@@ -0,0 +1 @@
+build_modules(${CMAKE_CURRENT_SOURCE_DIR})
diff --git a/modules/commands/bs_assign.cpp b/modules/botserv/assign.cpp
index 840651dfc..840651dfc 100644
--- a/modules/commands/bs_assign.cpp
+++ b/modules/botserv/assign.cpp
diff --git a/modules/bs_autoassign.cpp b/modules/botserv/autoassign.cpp
index 8978499ed..8978499ed 100644
--- a/modules/bs_autoassign.cpp
+++ b/modules/botserv/autoassign.cpp
diff --git a/modules/commands/bs_badwords.cpp b/modules/botserv/badwords.cpp
index 0f8e9e7d0..0f8e9e7d0 100644
--- a/modules/commands/bs_badwords.cpp
+++ b/modules/botserv/badwords.cpp
diff --git a/modules/commands/bs_bot.cpp b/modules/botserv/bot.cpp
index 726c02ab2..726c02ab2 100644
--- a/modules/commands/bs_bot.cpp
+++ b/modules/botserv/bot.cpp
diff --git a/modules/commands/bs_botlist.cpp b/modules/botserv/botlist.cpp
index ce899719e..ce899719e 100644
--- a/modules/commands/bs_botlist.cpp
+++ b/modules/botserv/botlist.cpp
diff --git a/modules/commands/bs_control.cpp b/modules/botserv/control.cpp
index 52c0933c5..52c0933c5 100644
--- a/modules/commands/bs_control.cpp
+++ b/modules/botserv/control.cpp
diff --git a/modules/commands/bs_info.cpp b/modules/botserv/info.cpp
index 6d74c308e..6d74c308e 100644
--- a/modules/commands/bs_info.cpp
+++ b/modules/botserv/info.cpp
diff --git a/modules/commands/bs_kick.cpp b/modules/botserv/kick.cpp
index 70ed5b2ad..70ed5b2ad 100644
--- a/modules/commands/bs_kick.cpp
+++ b/modules/botserv/kick.cpp
diff --git a/modules/pseudoclients/botserv/CMakeLists.txt b/modules/botserv/main/CMakeLists.txt
index 781f0ef1f..781f0ef1f 100644
--- a/modules/pseudoclients/botserv/CMakeLists.txt
+++ b/modules/botserv/main/CMakeLists.txt
diff --git a/modules/pseudoclients/botserv/botserv.cpp b/modules/botserv/main/botserv.cpp
index 0b51691fc..0b51691fc 100644
--- a/modules/pseudoclients/botserv/botserv.cpp
+++ b/modules/botserv/main/botserv.cpp
diff --git a/modules/commands/bs_set.cpp b/modules/botserv/set.cpp
index 6e2ae998f..6e2ae998f 100644
--- a/modules/commands/bs_set.cpp
+++ b/modules/botserv/set.cpp
diff --git a/modules/chanserv/CMakeLists.txt b/modules/chanserv/CMakeLists.txt
new file mode 100644
index 000000000..cd225a94d
--- /dev/null
+++ b/modules/chanserv/CMakeLists.txt
@@ -0,0 +1 @@
+build_modules(${CMAKE_CURRENT_SOURCE_DIR})
diff --git a/modules/commands/cs_akick.cpp b/modules/chanserv/akick.cpp
index 8cd1f778a..8cd1f778a 100644
--- a/modules/commands/cs_akick.cpp
+++ b/modules/chanserv/akick.cpp
diff --git a/modules/commands/cs_ban.cpp b/modules/chanserv/ban.cpp
index f797eda0f..f797eda0f 100644
--- a/modules/commands/cs_ban.cpp
+++ b/modules/chanserv/ban.cpp
diff --git a/modules/commands/cs_clone.cpp b/modules/chanserv/clone.cpp
index 256446bd1..256446bd1 100644
--- a/modules/commands/cs_clone.cpp
+++ b/modules/chanserv/clone.cpp
diff --git a/modules/commands/cs_access.cpp b/modules/chanserv/cs_access.old
index f8ecc6c38..b363e9757 100644
--- a/modules/commands/cs_access.cpp
+++ b/modules/chanserv/cs_access.old
@@ -9,13 +9,12 @@
* Based on the original code of Services by Andy Church.
*/
-/* Dependencies: chanserv */
#include "module.h"
#include "modules/chanserv.h"
#include "modules/cs_access.h"
-#include "../pseudoclients/chanserv/chanaccess.h"
-#include "../pseudoclients/chanserv/chanaccesstype.h"
+#include "main/chanaccess.h"
+#include "main/chanaccesstype.h"
class AccessChanAccess : public ChanAccessImpl
{
diff --git a/modules/commands/cs_flags.cpp b/modules/chanserv/cs_flags.old
index 88cc501ac..9a29a491f 100644
--- a/modules/commands/cs_flags.cpp
+++ b/modules/chanserv/cs_flags.old
@@ -9,12 +9,10 @@
* Based on the original code of Services by Andy Church.
*/
-/* Dependencies: chanserv */
-
#include "module.h"
#include "modules/cs_access.h"
-#include "../pseudoclients/chanserv/chanaccess.h"
-#include "../pseudoclients/chanserv/chanaccesstype.h"
+#include "main/chanaccess.h"
+#include "main/chanaccesstype.h"
static std::map<Anope::string, char> defaultFlags;
diff --git a/modules/commands/cs_xop.cpp b/modules/chanserv/cs_xop.old
index 891ac77e7..eae8c73a6 100644
--- a/modules/commands/cs_xop.cpp
+++ b/modules/chanserv/cs_xop.old
@@ -9,12 +9,11 @@
* Based on the original code of Services by Andy Church.
*/
-/* Dependencies: chanserv */
#include "module.h"
#include "modules/cs_access.h"
-#include "../pseudoclients/chanserv/chanaccess.h"
-#include "../pseudoclients/chanserv/chanaccesstype.h"
+#include "main/chanaccess.h"
+#include "main/chanaccesstype.h"
namespace
{
diff --git a/modules/commands/cs_drop.cpp b/modules/chanserv/drop.cpp
index a1020bcab..a1020bcab 100644
--- a/modules/commands/cs_drop.cpp
+++ b/modules/chanserv/drop.cpp
diff --git a/modules/commands/cs_enforce.cpp b/modules/chanserv/enforce.cpp
index 10069d3f8..10069d3f8 100644
--- a/modules/commands/cs_enforce.cpp
+++ b/modules/chanserv/enforce.cpp
diff --git a/modules/commands/cs_entrymsg.cpp b/modules/chanserv/entrymsg.cpp
index 31253599e..31253599e 100644
--- a/modules/commands/cs_entrymsg.cpp
+++ b/modules/chanserv/entrymsg.cpp
diff --git a/modules/commands/cs_getkey.cpp b/modules/chanserv/getkey.cpp
index 31fe56ec5..31fe56ec5 100644
--- a/modules/commands/cs_getkey.cpp
+++ b/modules/chanserv/getkey.cpp
diff --git a/modules/commands/cs_info.cpp b/modules/chanserv/info.cpp
index 267aee66a..267aee66a 100644
--- a/modules/commands/cs_info.cpp
+++ b/modules/chanserv/info.cpp
diff --git a/modules/commands/cs_invite.cpp b/modules/chanserv/invite.cpp
index 8e6f94d6c..8e6f94d6c 100644
--- a/modules/commands/cs_invite.cpp
+++ b/modules/chanserv/invite.cpp
diff --git a/modules/commands/cs_kick.cpp b/modules/chanserv/kick.cpp
index 89536df7f..89536df7f 100644
--- a/modules/commands/cs_kick.cpp
+++ b/modules/chanserv/kick.cpp
diff --git a/modules/commands/cs_list.cpp b/modules/chanserv/list.cpp
index 5a4c58bff..5a4c58bff 100644
--- a/modules/commands/cs_list.cpp
+++ b/modules/chanserv/list.cpp
diff --git a/modules/commands/cs_log.cpp b/modules/chanserv/log.cpp
index 6a90115f5..6a90115f5 100644
--- a/modules/commands/cs_log.cpp
+++ b/modules/chanserv/log.cpp
diff --git a/modules/pseudoclients/chanserv/CMakeLists.txt b/modules/chanserv/main/CMakeLists.txt
index 781f0ef1f..781f0ef1f 100644
--- a/modules/pseudoclients/chanserv/CMakeLists.txt
+++ b/modules/chanserv/main/CMakeLists.txt
diff --git a/modules/pseudoclients/chanserv/chanaccess.cpp b/modules/chanserv/main/chanaccess.cpp
index 1601260c2..1601260c2 100644
--- a/modules/pseudoclients/chanserv/chanaccess.cpp
+++ b/modules/chanserv/main/chanaccess.cpp
diff --git a/modules/pseudoclients/chanserv/chanaccess.h b/modules/chanserv/main/chanaccess.h
index bb65f79c5..bb65f79c5 100644
--- a/modules/pseudoclients/chanserv/chanaccess.h
+++ b/modules/chanserv/main/chanaccess.h
diff --git a/modules/pseudoclients/chanserv/chanaccesstype.h b/modules/chanserv/main/chanaccesstype.h
index ca8dc1b79..ca8dc1b79 100644
--- a/modules/pseudoclients/chanserv/chanaccesstype.h
+++ b/modules/chanserv/main/chanaccesstype.h
diff --git a/modules/pseudoclients/chanserv/channel.cpp b/modules/chanserv/main/channel.cpp
index b24edcc0c..b24edcc0c 100644
--- a/modules/pseudoclients/chanserv/channel.cpp
+++ b/modules/chanserv/main/channel.cpp
diff --git a/modules/pseudoclients/chanserv/channel.h b/modules/chanserv/main/channel.h
index 86e42a8f9..86e42a8f9 100644
--- a/modules/pseudoclients/chanserv/channel.h
+++ b/modules/chanserv/main/channel.h
diff --git a/modules/pseudoclients/chanserv/channeltype.cpp b/modules/chanserv/main/channeltype.cpp
index 4143285a8..4143285a8 100644
--- a/modules/pseudoclients/chanserv/channeltype.cpp
+++ b/modules/chanserv/main/channeltype.cpp
diff --git a/modules/pseudoclients/chanserv/channeltype.h b/modules/chanserv/main/channeltype.h
index 7bc22a8f6..7bc22a8f6 100644
--- a/modules/pseudoclients/chanserv/channeltype.h
+++ b/modules/chanserv/main/channeltype.h
diff --git a/modules/pseudoclients/chanserv/chanserv.cpp b/modules/chanserv/main/chanserv.cpp
index 420051252..420051252 100644
--- a/modules/pseudoclients/chanserv/chanserv.cpp
+++ b/modules/chanserv/main/chanserv.cpp
diff --git a/modules/pseudoclients/chanserv/level.cpp b/modules/chanserv/main/level.cpp
index d31c98d64..d31c98d64 100644
--- a/modules/pseudoclients/chanserv/level.cpp
+++ b/modules/chanserv/main/level.cpp
diff --git a/modules/pseudoclients/chanserv/level.h b/modules/chanserv/main/level.h
index c9ffd0dfb..c9ffd0dfb 100644
--- a/modules/pseudoclients/chanserv/level.h
+++ b/modules/chanserv/main/level.h
diff --git a/modules/pseudoclients/chanserv/leveltype.h b/modules/chanserv/main/leveltype.h
index 12e4c132f..12e4c132f 100644
--- a/modules/pseudoclients/chanserv/leveltype.h
+++ b/modules/chanserv/main/leveltype.h
diff --git a/modules/pseudoclients/chanserv/mode.cpp b/modules/chanserv/main/mode.cpp
index 066e2cfd5..066e2cfd5 100644
--- a/modules/pseudoclients/chanserv/mode.cpp
+++ b/modules/chanserv/main/mode.cpp
diff --git a/modules/pseudoclients/chanserv/mode.h b/modules/chanserv/main/mode.h
index cd94e5ad1..cd94e5ad1 100644
--- a/modules/pseudoclients/chanserv/mode.h
+++ b/modules/chanserv/main/mode.h
diff --git a/modules/pseudoclients/chanserv/modetype.h b/modules/chanserv/main/modetype.h
index b30c0491f..b30c0491f 100644
--- a/modules/pseudoclients/chanserv/modetype.h
+++ b/modules/chanserv/main/modetype.h
diff --git a/modules/commands/cs_mode.cpp b/modules/chanserv/mode.cpp
index 121179a58..121179a58 100644
--- a/modules/commands/cs_mode.cpp
+++ b/modules/chanserv/mode.cpp
diff --git a/modules/commands/cs_register.cpp b/modules/chanserv/register.cpp
index eb2832074..eb2832074 100644
--- a/modules/commands/cs_register.cpp
+++ b/modules/chanserv/register.cpp
diff --git a/modules/commands/cs_seen.cpp b/modules/chanserv/seen.cpp
index b97ffe238..b97ffe238 100644
--- a/modules/commands/cs_seen.cpp
+++ b/modules/chanserv/seen.cpp
diff --git a/modules/commands/cs_set.cpp b/modules/chanserv/set.cpp
index 06c996f52..06c996f52 100644
--- a/modules/commands/cs_set.cpp
+++ b/modules/chanserv/set.cpp
diff --git a/modules/commands/cs_set_misc.cpp b/modules/chanserv/set_misc.cpp
index 7af347087..7af347087 100644
--- a/modules/commands/cs_set_misc.cpp
+++ b/modules/chanserv/set_misc.cpp
diff --git a/modules/commands/cs_status.cpp b/modules/chanserv/status.cpp
index 35676fa53..35676fa53 100644
--- a/modules/commands/cs_status.cpp
+++ b/modules/chanserv/status.cpp
diff --git a/modules/cs_statusupdate.cpp b/modules/chanserv/statusupdate.cpp
index e2e37c60d..e2e37c60d 100644
--- a/modules/cs_statusupdate.cpp
+++ b/modules/chanserv/statusupdate.cpp
diff --git a/modules/commands/cs_suspend.cpp b/modules/chanserv/suspend.cpp
index 73a034192..73a034192 100644
--- a/modules/commands/cs_suspend.cpp
+++ b/modules/chanserv/suspend.cpp
diff --git a/modules/commands/cs_sync.cpp b/modules/chanserv/sync.cpp
index 37b56798c..37b56798c 100644
--- a/modules/commands/cs_sync.cpp
+++ b/modules/chanserv/sync.cpp
diff --git a/modules/commands/cs_topic.cpp b/modules/chanserv/topic.cpp
index a132900a6..a132900a6 100644
--- a/modules/commands/cs_topic.cpp
+++ b/modules/chanserv/topic.cpp
diff --git a/modules/commands/cs_unban.cpp b/modules/chanserv/unban.cpp
index 73391ac30..73391ac30 100644
--- a/modules/commands/cs_unban.cpp
+++ b/modules/chanserv/unban.cpp
diff --git a/modules/commands/cs_updown.cpp b/modules/chanserv/updown.cpp
index 383cc6e17..383cc6e17 100644
--- a/modules/commands/cs_updown.cpp
+++ b/modules/chanserv/updown.cpp
diff --git a/modules/database/CMakeLists.txt b/modules/database/CMakeLists.txt
new file mode 100644
index 000000000..cd225a94d
--- /dev/null
+++ b/modules/database/CMakeLists.txt
@@ -0,0 +1 @@
+build_modules(${CMAKE_CURRENT_SOURCE_DIR})
diff --git a/modules/database/db_flatfile.cpp b/modules/database/flatfile.cpp
index 122134960..122134960 100644
--- a/modules/database/db_flatfile.cpp
+++ b/modules/database/flatfile.cpp
diff --git a/modules/database/db_old.cpp b/modules/database/old.cpp
index 3d9b92922..3d9b92922 100644
--- a/modules/database/db_old.cpp
+++ b/modules/database/old.cpp
diff --git a/modules/database/db_redis.cpp b/modules/database/redis.cpp
index 72f25a16e..72f25a16e 100644
--- a/modules/database/db_redis.cpp
+++ b/modules/database/redis.cpp
diff --git a/modules/database/db_sql.cpp b/modules/database/sql.cpp
index fed0050e4..fed0050e4 100644
--- a/modules/database/db_sql.cpp
+++ b/modules/database/sql.cpp
diff --git a/modules/m_dns.cpp b/modules/dns.cpp
index 1ea70a6ed..1ea70a6ed 100644
--- a/modules/m_dns.cpp
+++ b/modules/dns.cpp
diff --git a/modules/m_dnsbl.cpp b/modules/dnsbl.cpp
index 49739a80c..49739a80c 100644
--- a/modules/m_dnsbl.cpp
+++ b/modules/dnsbl.cpp
diff --git a/modules/encryption/CMakeLists.txt b/modules/encryption/CMakeLists.txt
new file mode 100644
index 000000000..cd225a94d
--- /dev/null
+++ b/modules/encryption/CMakeLists.txt
@@ -0,0 +1 @@
+build_modules(${CMAKE_CURRENT_SOURCE_DIR})
diff --git a/modules/encryption/enc_bcrypt.cpp b/modules/encryption/bcrypt.cpp
index 74d729491..74d729491 100644
--- a/modules/encryption/enc_bcrypt.cpp
+++ b/modules/encryption/bcrypt.cpp
diff --git a/modules/encryption/enc_md5.cpp b/modules/encryption/md5.cpp
index a92f5a4f9..a92f5a4f9 100644
--- a/modules/encryption/enc_md5.cpp
+++ b/modules/encryption/md5.cpp
diff --git a/modules/encryption/enc_none.cpp b/modules/encryption/none.cpp
index 8164534eb..8164534eb 100644
--- a/modules/encryption/enc_none.cpp
+++ b/modules/encryption/none.cpp
diff --git a/modules/encryption/enc_old.cpp b/modules/encryption/old.cpp
index 4e3e70f7d..4e3e70f7d 100644
--- a/modules/encryption/enc_old.cpp
+++ b/modules/encryption/old.cpp
diff --git a/modules/encryption/enc_sha1.cpp b/modules/encryption/sha1.cpp
index a99bc834e..a99bc834e 100644
--- a/modules/encryption/enc_sha1.cpp
+++ b/modules/encryption/sha1.cpp
diff --git a/modules/encryption/enc_sha256.cpp b/modules/encryption/sha256.cpp
index a138b3756..a138b3756 100644
--- a/modules/encryption/enc_sha256.cpp
+++ b/modules/encryption/sha256.cpp
diff --git a/modules/extra/m_ldap.cpp b/modules/extra/ldap.cpp
index 71c31b9ac..71c31b9ac 100644
--- a/modules/extra/m_ldap.cpp
+++ b/modules/extra/ldap.cpp
diff --git a/modules/extra/m_ldap_authentication.cpp b/modules/extra/ldap_authentication.cpp
index dd63fd3fb..dd63fd3fb 100644
--- a/modules/extra/m_ldap_authentication.cpp
+++ b/modules/extra/ldap_authentication.cpp
diff --git a/modules/extra/m_ldap_oper.cpp b/modules/extra/ldap_oper.cpp
index 31653544e..31653544e 100644
--- a/modules/extra/m_ldap_oper.cpp
+++ b/modules/extra/ldap_oper.cpp
diff --git a/modules/extra/m_mysql.cpp b/modules/extra/mysql.cpp
index 843a2ba0a..843a2ba0a 100644
--- a/modules/extra/m_mysql.cpp
+++ b/modules/extra/mysql.cpp
diff --git a/modules/extra/m_sasl_dh-aes.cpp b/modules/extra/sasl_dh-aes.cpp
index dd06d118b..dd06d118b 100644
--- a/modules/extra/m_sasl_dh-aes.cpp
+++ b/modules/extra/sasl_dh-aes.cpp
diff --git a/modules/extra/m_sasl_dh-blowfish.cpp b/modules/extra/sasl_dh-blowfish.cpp
index f6e4b27b3..f6e4b27b3 100644
--- a/modules/extra/m_sasl_dh-blowfish.cpp
+++ b/modules/extra/sasl_dh-blowfish.cpp
diff --git a/modules/extra/m_sql_authentication.cpp b/modules/extra/sql_authentication.cpp
index 1c2dbe729..1c2dbe729 100644
--- a/modules/extra/m_sql_authentication.cpp
+++ b/modules/extra/sql_authentication.cpp
diff --git a/modules/extra/m_sql_log.cpp b/modules/extra/sql_log.cpp
index 6922d168e..6922d168e 100644
--- a/modules/extra/m_sql_log.cpp
+++ b/modules/extra/sql_log.cpp
diff --git a/modules/extra/m_sql_oper.cpp b/modules/extra/sql_oper.cpp
index 6bddbf0eb..6bddbf0eb 100644
--- a/modules/extra/m_sql_oper.cpp
+++ b/modules/extra/sql_oper.cpp
diff --git a/modules/extra/m_sqlite.cpp b/modules/extra/sqlite.cpp
index 9370a0d77..9370a0d77 100644
--- a/modules/extra/m_sqlite.cpp
+++ b/modules/extra/sqlite.cpp
diff --git a/modules/extra/m_ssl_gnutls.cpp b/modules/extra/ssl_gnutls.cpp
index 93a56f03a..93a56f03a 100644
--- a/modules/extra/m_ssl_gnutls.cpp
+++ b/modules/extra/ssl_gnutls.cpp
diff --git a/modules/extra/m_ssl_openssl.cpp b/modules/extra/ssl_openssl.cpp
index c5e2feefc..c5e2feefc 100644
--- a/modules/extra/m_ssl_openssl.cpp
+++ b/modules/extra/ssl_openssl.cpp
diff --git a/modules/extra/stats/m_chanstats.cpp b/modules/extra/stats/chanstats.cpp
index 687c077b5..687c077b5 100644
--- a/modules/extra/stats/m_chanstats.cpp
+++ b/modules/extra/stats/chanstats.cpp
diff --git a/modules/global/CMakeLists.txt b/modules/global/CMakeLists.txt
new file mode 100644
index 000000000..cd225a94d
--- /dev/null
+++ b/modules/global/CMakeLists.txt
@@ -0,0 +1 @@
+build_modules(${CMAKE_CURRENT_SOURCE_DIR})
diff --git a/modules/commands/gl_global.cpp b/modules/global/global.cpp
index d6106b2be..d6106b2be 100644
--- a/modules/commands/gl_global.cpp
+++ b/modules/global/global.cpp
diff --git a/modules/pseudoclients/memoserv/CMakeLists.txt b/modules/global/main/CMakeLists.txt
index 781f0ef1f..781f0ef1f 100644
--- a/modules/pseudoclients/memoserv/CMakeLists.txt
+++ b/modules/global/main/CMakeLists.txt
diff --git a/modules/pseudoclients/global.cpp b/modules/global/main/global.cpp
index f31605acb..f31605acb 100644
--- a/modules/pseudoclients/global.cpp
+++ b/modules/global/main/global.cpp
diff --git a/modules/commands/greet.cpp b/modules/greet.cpp
index ebc8c1612..ebc8c1612 100644
--- a/modules/commands/greet.cpp
+++ b/modules/greet.cpp
diff --git a/modules/commands/help.cpp b/modules/help.cpp
index debb25837..debb25837 100644
--- a/modules/commands/help.cpp
+++ b/modules/help.cpp
diff --git a/modules/m_helpchan.cpp b/modules/helpchan.cpp
index 3897b2b5a..3897b2b5a 100644
--- a/modules/m_helpchan.cpp
+++ b/modules/helpchan.cpp
diff --git a/modules/hostserv/CMakeLists.txt b/modules/hostserv/CMakeLists.txt
new file mode 100644
index 000000000..cd225a94d
--- /dev/null
+++ b/modules/hostserv/CMakeLists.txt
@@ -0,0 +1 @@
+build_modules(${CMAKE_CURRENT_SOURCE_DIR})
diff --git a/modules/commands/hs_del.cpp b/modules/hostserv/del.cpp
index b45c10a61..b45c10a61 100644
--- a/modules/commands/hs_del.cpp
+++ b/modules/hostserv/del.cpp
diff --git a/modules/commands/hs_group.cpp b/modules/hostserv/group.cpp
index c3971fdea..c3971fdea 100644
--- a/modules/commands/hs_group.cpp
+++ b/modules/hostserv/group.cpp
diff --git a/modules/commands/hs_list.cpp b/modules/hostserv/list.cpp
index 738f9f1bd..738f9f1bd 100644
--- a/modules/commands/hs_list.cpp
+++ b/modules/hostserv/list.cpp
diff --git a/modules/pseudoclients/nickserv/CMakeLists.txt b/modules/hostserv/main/CMakeLists.txt
index 781f0ef1f..781f0ef1f 100644
--- a/modules/pseudoclients/nickserv/CMakeLists.txt
+++ b/modules/hostserv/main/CMakeLists.txt
diff --git a/modules/pseudoclients/hostserv.cpp b/modules/hostserv/main/hostserv.cpp
index 285ea893b..285ea893b 100644
--- a/modules/pseudoclients/hostserv.cpp
+++ b/modules/hostserv/main/hostserv.cpp
diff --git a/modules/commands/hs_off.cpp b/modules/hostserv/off.cpp
index 8f3c7e3da..8f3c7e3da 100644
--- a/modules/commands/hs_off.cpp
+++ b/modules/hostserv/off.cpp
diff --git a/modules/commands/hs_on.cpp b/modules/hostserv/on.cpp
index 409d56ac5..409d56ac5 100644
--- a/modules/commands/hs_on.cpp
+++ b/modules/hostserv/on.cpp
diff --git a/modules/commands/hs_request.cpp b/modules/hostserv/request.cpp
index 8a064a84c..8a064a84c 100644
--- a/modules/commands/hs_request.cpp
+++ b/modules/hostserv/request.cpp
diff --git a/modules/commands/hs_set.cpp b/modules/hostserv/set.cpp
index a86afead4..a86afead4 100644
--- a/modules/commands/hs_set.cpp
+++ b/modules/hostserv/set.cpp
diff --git a/modules/m_httpd.cpp b/modules/httpd.cpp
index 17f80d376..17f80d376 100644
--- a/modules/m_httpd.cpp
+++ b/modules/httpd.cpp
diff --git a/modules/memoserv/CMakeLists.txt b/modules/memoserv/CMakeLists.txt
new file mode 100644
index 000000000..cd225a94d
--- /dev/null
+++ b/modules/memoserv/CMakeLists.txt
@@ -0,0 +1 @@
+build_modules(${CMAKE_CURRENT_SOURCE_DIR})
diff --git a/modules/commands/ms_cancel.cpp b/modules/memoserv/cancel.cpp
index e3da82581..e3da82581 100644
--- a/modules/commands/ms_cancel.cpp
+++ b/modules/memoserv/cancel.cpp
diff --git a/modules/commands/ms_check.cpp b/modules/memoserv/check.cpp
index 75a8ee3d0..75a8ee3d0 100644
--- a/modules/commands/ms_check.cpp
+++ b/modules/memoserv/check.cpp
diff --git a/modules/commands/ms_del.cpp b/modules/memoserv/del.cpp
index 79af11adc..79af11adc 100644
--- a/modules/commands/ms_del.cpp
+++ b/modules/memoserv/del.cpp
diff --git a/modules/commands/ms_ignore.cpp b/modules/memoserv/ignore.cpp
index c454444ea..c454444ea 100644
--- a/modules/commands/ms_ignore.cpp
+++ b/modules/memoserv/ignore.cpp
diff --git a/modules/commands/ms_info.cpp b/modules/memoserv/info.cpp
index d9bee1cb5..d9bee1cb5 100644
--- a/modules/commands/ms_info.cpp
+++ b/modules/memoserv/info.cpp
diff --git a/modules/commands/ms_list.cpp b/modules/memoserv/list.cpp
index 8215315b0..8215315b0 100644
--- a/modules/commands/ms_list.cpp
+++ b/modules/memoserv/list.cpp
diff --git a/modules/memoserv/main/CMakeLists.txt b/modules/memoserv/main/CMakeLists.txt
new file mode 100644
index 000000000..781f0ef1f
--- /dev/null
+++ b/modules/memoserv/main/CMakeLists.txt
@@ -0,0 +1 @@
+build_subdir(${CMAKE_CURRENT_SOURCE_DIR})
diff --git a/modules/pseudoclients/memoserv/ignore.cpp b/modules/memoserv/main/ignore.cpp
index e85011c00..e85011c00 100644
--- a/modules/pseudoclients/memoserv/ignore.cpp
+++ b/modules/memoserv/main/ignore.cpp
diff --git a/modules/pseudoclients/memoserv/ignore.h b/modules/memoserv/main/ignore.h
index c98b44adf..c98b44adf 100644
--- a/modules/pseudoclients/memoserv/ignore.h
+++ b/modules/memoserv/main/ignore.h
diff --git a/modules/pseudoclients/memoserv/ignoretype.cpp b/modules/memoserv/main/ignoretype.cpp
index 375f83272..375f83272 100644
--- a/modules/pseudoclients/memoserv/ignoretype.cpp
+++ b/modules/memoserv/main/ignoretype.cpp
diff --git a/modules/pseudoclients/memoserv/ignoretype.h b/modules/memoserv/main/ignoretype.h
index 5c656f9b8..5c656f9b8 100644
--- a/modules/pseudoclients/memoserv/ignoretype.h
+++ b/modules/memoserv/main/ignoretype.h
diff --git a/modules/pseudoclients/memoserv/memo.cpp b/modules/memoserv/main/memo.cpp
index bfae64284..bfae64284 100644
--- a/modules/pseudoclients/memoserv/memo.cpp
+++ b/modules/memoserv/main/memo.cpp
diff --git a/modules/pseudoclients/memoserv/memo.h b/modules/memoserv/main/memo.h
index 1a230c1e9..1a230c1e9 100644
--- a/modules/pseudoclients/memoserv/memo.h
+++ b/modules/memoserv/main/memo.h
diff --git a/modules/pseudoclients/memoserv/memoinfo.cpp b/modules/memoserv/main/memoinfo.cpp
index 45d95533e..45d95533e 100644
--- a/modules/pseudoclients/memoserv/memoinfo.cpp
+++ b/modules/memoserv/main/memoinfo.cpp
diff --git a/modules/pseudoclients/memoserv/memoinfo.h b/modules/memoserv/main/memoinfo.h
index 22ea0734f..22ea0734f 100644
--- a/modules/pseudoclients/memoserv/memoinfo.h
+++ b/modules/memoserv/main/memoinfo.h
diff --git a/modules/pseudoclients/memoserv/memoinfotype.cpp b/modules/memoserv/main/memoinfotype.cpp
index 7eb3af72c..7eb3af72c 100644
--- a/modules/pseudoclients/memoserv/memoinfotype.cpp
+++ b/modules/memoserv/main/memoinfotype.cpp
diff --git a/modules/pseudoclients/memoserv/memoinfotype.h b/modules/memoserv/main/memoinfotype.h
index 724a898b5..724a898b5 100644
--- a/modules/pseudoclients/memoserv/memoinfotype.h
+++ b/modules/memoserv/main/memoinfotype.h
diff --git a/modules/pseudoclients/memoserv/memoserv.cpp b/modules/memoserv/main/memoserv.cpp
index a52ee746c..a52ee746c 100644
--- a/modules/pseudoclients/memoserv/memoserv.cpp
+++ b/modules/memoserv/main/memoserv.cpp
diff --git a/modules/pseudoclients/memoserv/memotype.cpp b/modules/memoserv/main/memotype.cpp
index c9144bbaa..c9144bbaa 100644
--- a/modules/pseudoclients/memoserv/memotype.cpp
+++ b/modules/memoserv/main/memotype.cpp
diff --git a/modules/pseudoclients/memoserv/memotype.h b/modules/memoserv/main/memotype.h
index 16ac6f082..16ac6f082 100644
--- a/modules/pseudoclients/memoserv/memotype.h
+++ b/modules/memoserv/main/memotype.h
diff --git a/modules/commands/ms_read.cpp b/modules/memoserv/read.cpp
index 687843124..687843124 100644
--- a/modules/commands/ms_read.cpp
+++ b/modules/memoserv/read.cpp
diff --git a/modules/commands/ms_rsend.cpp b/modules/memoserv/rsend.cpp
index 16f6105fa..16f6105fa 100644
--- a/modules/commands/ms_rsend.cpp
+++ b/modules/memoserv/rsend.cpp
diff --git a/modules/commands/ms_send.cpp b/modules/memoserv/send.cpp
index 0d26b8684..0d26b8684 100644
--- a/modules/commands/ms_send.cpp
+++ b/modules/memoserv/send.cpp
diff --git a/modules/commands/ms_sendall.cpp b/modules/memoserv/sendall.cpp
index 7c5365c4d..7c5365c4d 100644
--- a/modules/commands/ms_sendall.cpp
+++ b/modules/memoserv/sendall.cpp
diff --git a/modules/commands/ms_set.cpp b/modules/memoserv/set.cpp
index c924d0ea0..c924d0ea0 100644
--- a/modules/commands/ms_set.cpp
+++ b/modules/memoserv/set.cpp
diff --git a/modules/commands/ms_staff.cpp b/modules/memoserv/staff.cpp
index f563fd9ea..f563fd9ea 100644
--- a/modules/commands/ms_staff.cpp
+++ b/modules/memoserv/staff.cpp
diff --git a/modules/nickserv/CMakeLists.txt b/modules/nickserv/CMakeLists.txt
new file mode 100644
index 000000000..cd225a94d
--- /dev/null
+++ b/modules/nickserv/CMakeLists.txt
@@ -0,0 +1 @@
+build_modules(${CMAKE_CURRENT_SOURCE_DIR})
diff --git a/modules/commands/ns_access.cpp b/modules/nickserv/access.cpp
index ba2116ac9..ba2116ac9 100644
--- a/modules/commands/ns_access.cpp
+++ b/modules/nickserv/access.cpp
diff --git a/modules/commands/ns_ajoin.cpp b/modules/nickserv/ajoin.cpp
index 135beb403..135beb403 100644
--- a/modules/commands/ns_ajoin.cpp
+++ b/modules/nickserv/ajoin.cpp
diff --git a/modules/commands/ns_alist.cpp b/modules/nickserv/alist.cpp
index e4aaff38b..e4aaff38b 100644
--- a/modules/commands/ns_alist.cpp
+++ b/modules/nickserv/alist.cpp
diff --git a/modules/commands/ns_cert.cpp b/modules/nickserv/cert.cpp
index fc87f8cb0..fc87f8cb0 100644
--- a/modules/commands/ns_cert.cpp
+++ b/modules/nickserv/cert.cpp
diff --git a/modules/commands/ns_drop.cpp b/modules/nickserv/drop.cpp
index 62ee41970..62ee41970 100644
--- a/modules/commands/ns_drop.cpp
+++ b/modules/nickserv/drop.cpp
diff --git a/modules/commands/ns_getemail.cpp b/modules/nickserv/getemail.cpp
index 7b94efbea..7b94efbea 100644
--- a/modules/commands/ns_getemail.cpp
+++ b/modules/nickserv/getemail.cpp
diff --git a/modules/commands/ns_getpass.cpp b/modules/nickserv/getpass.cpp
index a526986ec..a526986ec 100644
--- a/modules/commands/ns_getpass.cpp
+++ b/modules/nickserv/getpass.cpp
diff --git a/modules/commands/ns_group.cpp b/modules/nickserv/group.cpp
index 9a9b933f4..9a9b933f4 100644
--- a/modules/commands/ns_group.cpp
+++ b/modules/nickserv/group.cpp
diff --git a/modules/commands/ns_identify.cpp b/modules/nickserv/identify.cpp
index 122378d8a..122378d8a 100644
--- a/modules/commands/ns_identify.cpp
+++ b/modules/nickserv/identify.cpp
diff --git a/modules/commands/ns_info.cpp b/modules/nickserv/info.cpp
index 7091e53fd..7091e53fd 100644
--- a/modules/commands/ns_info.cpp
+++ b/modules/nickserv/info.cpp
diff --git a/modules/commands/ns_list.cpp b/modules/nickserv/list.cpp
index 2820326d2..2820326d2 100644
--- a/modules/commands/ns_list.cpp
+++ b/modules/nickserv/list.cpp
diff --git a/modules/commands/ns_logout.cpp b/modules/nickserv/logout.cpp
index 9bcb543fc..9bcb543fc 100644
--- a/modules/commands/ns_logout.cpp
+++ b/modules/nickserv/logout.cpp
diff --git a/modules/nickserv/main/CMakeLists.txt b/modules/nickserv/main/CMakeLists.txt
new file mode 100644
index 000000000..781f0ef1f
--- /dev/null
+++ b/modules/nickserv/main/CMakeLists.txt
@@ -0,0 +1 @@
+build_subdir(${CMAKE_CURRENT_SOURCE_DIR})
diff --git a/modules/pseudoclients/nickserv/account.cpp b/modules/nickserv/main/account.cpp
index 85adf1a33..85adf1a33 100644
--- a/modules/pseudoclients/nickserv/account.cpp
+++ b/modules/nickserv/main/account.cpp
diff --git a/modules/pseudoclients/nickserv/account.h b/modules/nickserv/main/account.h
index 584548563..584548563 100644
--- a/modules/pseudoclients/nickserv/account.h
+++ b/modules/nickserv/main/account.h
diff --git a/modules/pseudoclients/nickserv/accounttype.cpp b/modules/nickserv/main/accounttype.cpp
index 3dad436b4..3dad436b4 100644
--- a/modules/pseudoclients/nickserv/accounttype.cpp
+++ b/modules/nickserv/main/accounttype.cpp
diff --git a/modules/pseudoclients/nickserv/accounttype.h b/modules/nickserv/main/accounttype.h
index 792629877..792629877 100644
--- a/modules/pseudoclients/nickserv/accounttype.h
+++ b/modules/nickserv/main/accounttype.h
diff --git a/modules/pseudoclients/nickserv/identifyrequest.cpp b/modules/nickserv/main/identifyrequest.cpp
index 4fc2f9989..4fc2f9989 100644
--- a/modules/pseudoclients/nickserv/identifyrequest.cpp
+++ b/modules/nickserv/main/identifyrequest.cpp
diff --git a/modules/pseudoclients/nickserv/identifyrequest.h b/modules/nickserv/main/identifyrequest.h
index e74d3129e..e74d3129e 100644
--- a/modules/pseudoclients/nickserv/identifyrequest.h
+++ b/modules/nickserv/main/identifyrequest.h
diff --git a/modules/pseudoclients/nickserv/mode.cpp b/modules/nickserv/main/mode.cpp
index 61fe551c1..61fe551c1 100644
--- a/modules/pseudoclients/nickserv/mode.cpp
+++ b/modules/nickserv/main/mode.cpp
diff --git a/modules/pseudoclients/nickserv/mode.h b/modules/nickserv/main/mode.h
index 9fc4c331e..9fc4c331e 100644
--- a/modules/pseudoclients/nickserv/mode.h
+++ b/modules/nickserv/main/mode.h
diff --git a/modules/pseudoclients/nickserv/modetype.h b/modules/nickserv/main/modetype.h
index 0c4aefecc..0c4aefecc 100644
--- a/modules/pseudoclients/nickserv/modetype.h
+++ b/modules/nickserv/main/modetype.h
diff --git a/modules/pseudoclients/nickserv/nick.cpp b/modules/nickserv/main/nick.cpp
index 0ac55ff93..0ac55ff93 100644
--- a/modules/pseudoclients/nickserv/nick.cpp
+++ b/modules/nickserv/main/nick.cpp
diff --git a/modules/pseudoclients/nickserv/nick.h b/modules/nickserv/main/nick.h
index 043d7c052..043d7c052 100644
--- a/modules/pseudoclients/nickserv/nick.h
+++ b/modules/nickserv/main/nick.h
diff --git a/modules/pseudoclients/nickserv/nickserv.cpp b/modules/nickserv/main/nickserv.cpp
index 26f1457cc..26f1457cc 100644
--- a/modules/pseudoclients/nickserv/nickserv.cpp
+++ b/modules/nickserv/main/nickserv.cpp
diff --git a/modules/pseudoclients/nickserv/nicktype.cpp b/modules/nickserv/main/nicktype.cpp
index 9607aaa2f..9607aaa2f 100644
--- a/modules/pseudoclients/nickserv/nicktype.cpp
+++ b/modules/nickserv/main/nicktype.cpp
diff --git a/modules/pseudoclients/nickserv/nicktype.h b/modules/nickserv/main/nicktype.h
index d205845e9..d205845e9 100644
--- a/modules/pseudoclients/nickserv/nicktype.h
+++ b/modules/nickserv/main/nicktype.h
diff --git a/modules/ns_maxemail.cpp b/modules/nickserv/maxemail.cpp
index 38054f819..38054f819 100644
--- a/modules/ns_maxemail.cpp
+++ b/modules/nickserv/maxemail.cpp
diff --git a/modules/commands/ns_recover.cpp b/modules/nickserv/recover.cpp
index 65033bab9..65033bab9 100644
--- a/modules/commands/ns_recover.cpp
+++ b/modules/nickserv/recover.cpp
diff --git a/modules/commands/ns_register.cpp b/modules/nickserv/register.cpp
index c7e6e5af2..c7e6e5af2 100644
--- a/modules/commands/ns_register.cpp
+++ b/modules/nickserv/register.cpp
diff --git a/modules/commands/ns_resetpass.cpp b/modules/nickserv/resetpass.cpp
index 3be5a4c06..3be5a4c06 100644
--- a/modules/commands/ns_resetpass.cpp
+++ b/modules/nickserv/resetpass.cpp
diff --git a/modules/commands/ns_set.cpp b/modules/nickserv/set.cpp
index a75386743..a75386743 100644
--- a/modules/commands/ns_set.cpp
+++ b/modules/nickserv/set.cpp
diff --git a/modules/commands/ns_set_misc.cpp b/modules/nickserv/set_misc.cpp
index 5d03797b1..5d03797b1 100644
--- a/modules/commands/ns_set_misc.cpp
+++ b/modules/nickserv/set_misc.cpp
diff --git a/modules/commands/ns_status.cpp b/modules/nickserv/status.cpp
index 7dc751d8b..7dc751d8b 100644
--- a/modules/commands/ns_status.cpp
+++ b/modules/nickserv/status.cpp
diff --git a/modules/commands/ns_suspend.cpp b/modules/nickserv/suspend.cpp
index 2859eacc1..2859eacc1 100644
--- a/modules/commands/ns_suspend.cpp
+++ b/modules/nickserv/suspend.cpp
diff --git a/modules/commands/ns_update.cpp b/modules/nickserv/update.cpp
index 0022f389d..0022f389d 100644
--- a/modules/commands/ns_update.cpp
+++ b/modules/nickserv/update.cpp
diff --git a/modules/operserv/CMakeLists.txt b/modules/operserv/CMakeLists.txt
new file mode 100644
index 000000000..cd225a94d
--- /dev/null
+++ b/modules/operserv/CMakeLists.txt
@@ -0,0 +1 @@
+build_modules(${CMAKE_CURRENT_SOURCE_DIR})
diff --git a/modules/commands/os_akill.cpp b/modules/operserv/akill.cpp
index 7f366e0c9..7f366e0c9 100644
--- a/modules/commands/os_akill.cpp
+++ b/modules/operserv/akill.cpp
diff --git a/modules/commands/os_chankill.cpp b/modules/operserv/chankill.cpp
index 8d3773e9d..8d3773e9d 100644
--- a/modules/commands/os_chankill.cpp
+++ b/modules/operserv/chankill.cpp
diff --git a/modules/commands/os_config.cpp b/modules/operserv/config.cpp
index 257f8fee4..257f8fee4 100644
--- a/modules/commands/os_config.cpp
+++ b/modules/operserv/config.cpp
diff --git a/modules/commands/os_defcon.cpp b/modules/operserv/defcon.cpp
index 804b66c27..804b66c27 100644
--- a/modules/commands/os_defcon.cpp
+++ b/modules/operserv/defcon.cpp
diff --git a/modules/commands/os_dns.cpp b/modules/operserv/dns.cpp
index a231a1e74..a231a1e74 100644
--- a/modules/commands/os_dns.cpp
+++ b/modules/operserv/dns.cpp
diff --git a/modules/commands/os_forbid.cpp b/modules/operserv/forbid.cpp
index 0a7b1c209..0a7b1c209 100644
--- a/modules/commands/os_forbid.cpp
+++ b/modules/operserv/forbid.cpp
diff --git a/modules/commands/os_ignore.cpp b/modules/operserv/ignore.cpp
index d9563cc29..d9563cc29 100644
--- a/modules/commands/os_ignore.cpp
+++ b/modules/operserv/ignore.cpp
diff --git a/modules/commands/os_info.cpp b/modules/operserv/info.cpp
index 7b292d4b2..7b292d4b2 100644
--- a/modules/commands/os_info.cpp
+++ b/modules/operserv/info.cpp
diff --git a/modules/commands/os_jupe.cpp b/modules/operserv/jupe.cpp
index e2dd30b3a..e2dd30b3a 100644
--- a/modules/commands/os_jupe.cpp
+++ b/modules/operserv/jupe.cpp
diff --git a/modules/commands/os_kick.cpp b/modules/operserv/kick.cpp
index d97e21602..d97e21602 100644
--- a/modules/commands/os_kick.cpp
+++ b/modules/operserv/kick.cpp
diff --git a/modules/commands/os_kill.cpp b/modules/operserv/kill.cpp
index ef6f11ebe..ef6f11ebe 100644
--- a/modules/commands/os_kill.cpp
+++ b/modules/operserv/kill.cpp
diff --git a/modules/commands/os_list.cpp b/modules/operserv/list.cpp
index ed825f373..ed825f373 100644
--- a/modules/commands/os_list.cpp
+++ b/modules/operserv/list.cpp
diff --git a/modules/commands/os_login.cpp b/modules/operserv/login.cpp
index 650c48e3d..650c48e3d 100644
--- a/modules/commands/os_login.cpp
+++ b/modules/operserv/login.cpp
diff --git a/modules/commands/os_logsearch.cpp b/modules/operserv/logsearch.cpp
index 0fa425aba..0fa425aba 100644
--- a/modules/commands/os_logsearch.cpp
+++ b/modules/operserv/logsearch.cpp
diff --git a/modules/operserv/main/CMakeLists.txt b/modules/operserv/main/CMakeLists.txt
new file mode 100644
index 000000000..781f0ef1f
--- /dev/null
+++ b/modules/operserv/main/CMakeLists.txt
@@ -0,0 +1 @@
+build_subdir(${CMAKE_CURRENT_SOURCE_DIR})
diff --git a/modules/pseudoclients/operserv.cpp b/modules/operserv/main/operserv.cpp
index 0a4f1b692..0a4f1b692 100644
--- a/modules/pseudoclients/operserv.cpp
+++ b/modules/operserv/main/operserv.cpp
diff --git a/modules/commands/os_mode.cpp b/modules/operserv/mode.cpp
index 30e1d502b..30e1d502b 100644
--- a/modules/commands/os_mode.cpp
+++ b/modules/operserv/mode.cpp
diff --git a/modules/commands/os_modinfo.cpp b/modules/operserv/modinfo.cpp
index f3c6db00f..f3c6db00f 100644
--- a/modules/commands/os_modinfo.cpp
+++ b/modules/operserv/modinfo.cpp
diff --git a/modules/commands/os_module.cpp b/modules/operserv/module.cpp
index 14bc897e3..14bc897e3 100644
--- a/modules/commands/os_module.cpp
+++ b/modules/operserv/module.cpp
diff --git a/modules/commands/os_news.cpp b/modules/operserv/news.cpp
index 03a1e3a57..03a1e3a57 100644
--- a/modules/commands/os_news.cpp
+++ b/modules/operserv/news.cpp
diff --git a/modules/commands/os_noop.cpp b/modules/operserv/noop.cpp
index a12bef6a2..a12bef6a2 100644
--- a/modules/commands/os_noop.cpp
+++ b/modules/operserv/noop.cpp
diff --git a/modules/commands/os_oline.cpp b/modules/operserv/oline.cpp
index 34c13a4a3..34c13a4a3 100644
--- a/modules/commands/os_oline.cpp
+++ b/modules/operserv/oline.cpp
diff --git a/modules/commands/os_oper.cpp b/modules/operserv/oper.cpp
index 923137013..923137013 100644
--- a/modules/commands/os_oper.cpp
+++ b/modules/operserv/oper.cpp
diff --git a/modules/commands/os_reload.cpp b/modules/operserv/reload.cpp
index 217194e18..217194e18 100644
--- a/modules/commands/os_reload.cpp
+++ b/modules/operserv/reload.cpp
diff --git a/modules/commands/os_session.cpp b/modules/operserv/session.cpp
index 997914360..997914360 100644
--- a/modules/commands/os_session.cpp
+++ b/modules/operserv/session.cpp
diff --git a/modules/commands/os_set.cpp b/modules/operserv/set.cpp
index 45515fa4b..45515fa4b 100644
--- a/modules/commands/os_set.cpp
+++ b/modules/operserv/set.cpp
diff --git a/modules/commands/os_shutdown.cpp b/modules/operserv/shutdown.cpp
index 642be5d84..642be5d84 100644
--- a/modules/commands/os_shutdown.cpp
+++ b/modules/operserv/shutdown.cpp
diff --git a/modules/commands/os_stats.cpp b/modules/operserv/stats.cpp
index 6e74303ce..6e74303ce 100644
--- a/modules/commands/os_stats.cpp
+++ b/modules/operserv/stats.cpp
diff --git a/modules/commands/os_svs.cpp b/modules/operserv/svs.cpp
index 35c3136a8..35c3136a8 100644
--- a/modules/commands/os_svs.cpp
+++ b/modules/operserv/svs.cpp
diff --git a/modules/commands/os_sxline.cpp b/modules/operserv/sxline.cpp
index 3465faae7..3465faae7 100644
--- a/modules/commands/os_sxline.cpp
+++ b/modules/operserv/sxline.cpp
diff --git a/modules/commands/os_update.cpp b/modules/operserv/update.cpp
index 8ff39fb69..8ff39fb69 100644
--- a/modules/commands/os_update.cpp
+++ b/modules/operserv/update.cpp
diff --git a/modules/protocol/CMakeLists.txt b/modules/protocol/CMakeLists.txt
new file mode 100644
index 000000000..cd225a94d
--- /dev/null
+++ b/modules/protocol/CMakeLists.txt
@@ -0,0 +1 @@
+build_modules(${CMAKE_CURRENT_SOURCE_DIR})
diff --git a/modules/m_proxyscan.cpp b/modules/proxyscan.cpp
index 398e021db..398e021db 100644
--- a/modules/m_proxyscan.cpp
+++ b/modules/proxyscan.cpp
diff --git a/modules/m_redis.cpp b/modules/redis.cpp
index 81c958f7c..81c958f7c 100644
--- a/modules/m_redis.cpp
+++ b/modules/redis.cpp
diff --git a/modules/m_rewrite.cpp b/modules/rewrite.cpp
index 37c58d5a9..37c58d5a9 100644
--- a/modules/m_rewrite.cpp
+++ b/modules/rewrite.cpp
diff --git a/modules/m_sasl.cpp b/modules/sasl.cpp
index f12cae8b8..f12cae8b8 100644
--- a/modules/m_sasl.cpp
+++ b/modules/sasl.cpp
diff --git a/modules/m_xmlrpc.cpp b/modules/xmlrpc.cpp
index 2d1cd2c0e..2d1cd2c0e 100644
--- a/modules/m_xmlrpc.cpp
+++ b/modules/xmlrpc.cpp
diff --git a/modules/m_xmlrpc_main.cpp b/modules/xmlrpc_main.cpp
index af0253028..af0253028 100644
--- a/modules/m_xmlrpc_main.cpp
+++ b/modules/xmlrpc_main.cpp