diff options
160 files changed, 384 insertions, 542 deletions
diff --git a/include/modules.h b/include/modules.h index 22a3b9ce7..ae7ceb651 100644 --- a/include/modules.h +++ b/include/modules.h @@ -139,7 +139,28 @@ enum ModuleReturn */ enum Priority { PRIORITY_FIRST, PRIORITY_DONTCARE, PRIORITY_LAST, PRIORITY_BEFORE, PRIORITY_AFTER }; /* Module types, in the order in which they are unloaded. The order these are in is IMPORTANT */ -enum ModType { MT_BEGIN, THIRD, SUPPORTED, CORE, DATABASE, ENCRYPTION, PROTOCOL, MT_END }; +enum +{ + MT_BEGIN, + /* Module is 3rd party. All 3rd party modules should set this. Mutually exclusive to VENDOR. */ + THIRD = 1 << 0, + /* A vendor module, which is made and shipped by Anope. Mutually exclusive to THIRD. */ + VENDOR = 1 << 1, + /* Extra module not required for standard use. Probably requires external dependencies. + * This module does something extreme enough that we want it to show in the default /os modlist command + */ + EXTRA = 1 << 2, + /* Module provides access to a database */ + DATABASE = 1 << 3, + /* Module provides encryption */ + ENCRYPTION = 1 << 4, + /* Module provides a pseudoclient */ + PSEUDOCLIENT = 1 << 5, + /* Module provides IRCd protocol support */ + PROTOCOL = 1 << 6, + MT_END = 1 << 7 +}; +typedef unsigned short ModType; /** Returned by Module::GetVersion, used to see what version of Anope * a module is compiled against. diff --git a/modules/CMakeLists.txt b/modules/CMakeLists.txt index 75d22af4a..5a02b16b4 100644 --- a/modules/CMakeLists.txt +++ b/modules/CMakeLists.txt @@ -3,6 +3,7 @@ add_subdirectory("third/language") # Get a list of ALL files and directories within the current directory file(GLOB MODULES_FOLDERS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*") remove_item_from_list(MODULES_FOLDERS "CMakeFiles") +append_to_list(MODULES_FOLDERS ".") # If using Windows, add the MODULE_COMPILE define if(WIN32) @@ -98,109 +99,111 @@ foreach(MODULE_FOLDER ${MODULES_FOLDERS}) endif(NOT SKIP_DEPENDS AND NOT SKIP_LIBRARIES) endforeach(SRC) - # Get a list of ALL files and directories within this modules directory - file(GLOB SUBMODULE_DIRS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "${MODULE_FOLDER}/*") - remove_item_from_list(SUBMODULE_DIRS "CMakeFiles") - remove_item_from_list(SUBMODULE_DIRS "third/language") - - foreach(SUBDIR ${SUBMODULE_DIRS}) - if(IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/${SUBDIR}") - file(GLOB_RECURSE MODULES_SUBDIR_SRCS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "${SUBDIR}/*.cpp") - sort_list(MODULES_SUBDIR_SRCS) - - # 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}") - - # Get the length of this subdir - string(LENGTH ${SUBDIR} SUBDIR_LEN) - # Calculate the length of the folder - math(EXPR FILE_LEN "${SUBDIR_LEN} - ${FOLDER_LEN}") - # Extract this subfolders name to use to generate the .so file - string(SUBSTRING ${SUBDIR} ${FOLDER_LEN} ${FILE_LEN} SUBDIR_REALNAME) - # Add .so to the end of the directory name, this will be the module's name - set(SO "${SUBDIR_REALNAME}.so") - - # Temporary linker flags for this subdirectory - set(SUBDIR_LDFLAGS "${LDFLAGS}") - # Temporary extra dependencies for this subdirectory - set(SUBDIR_EXTRA_DEPENDS) - # Reset skip_depends - set(SKIP_DEPENDS) - # Reset skip_libraries - set(SKIP_LIBRARIES) - # Reset has_function - set(HAS_FUNCTION TRUE) - - # Iterate through the source files in the subdirectory - foreach(SRC ${MODULES_SUBDIR_SRCS}) + if(NOT MODULE_FOLDER STREQUAL ".") + # Get a list of ALL files and directories within this modules directory + file(GLOB SUBMODULE_DIRS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "${MODULE_FOLDER}/*") + remove_item_from_list(SUBMODULE_DIRS "CMakeFiles") + remove_item_from_list(SUBMODULE_DIRS "third/language") + + foreach(SUBDIR ${SUBMODULE_DIRS}) + if(IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/${SUBDIR}") + file(GLOB_RECURSE MODULES_SUBDIR_SRCS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "${SUBDIR}/*.cpp") + sort_list(MODULES_SUBDIR_SRCS) + + # 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}") + + # Get the length of this subdir + string(LENGTH ${SUBDIR} SUBDIR_LEN) + # Calculate the length of the folder + math(EXPR FILE_LEN "${SUBDIR_LEN} - ${FOLDER_LEN}") + # Extract this subfolders name to use to generate the .so file + string(SUBSTRING ${SUBDIR} ${FOLDER_LEN} ${FILE_LEN} SUBDIR_REALNAME) + # Add .so to the end of the directory name, this will be the module's name + set(SO "${SUBDIR_REALNAME}.so") + + # Temporary linker flags for this subdirectory + set(SUBDIR_LDFLAGS "${LDFLAGS}") + # Temporary extra dependencies for this subdirectory + set(SUBDIR_EXTRA_DEPENDS) + # Reset skip_depends + set(SKIP_DEPENDS) + # Reset skip_libraries + set(SKIP_LIBRARIES) + # Reset has_function + set(HAS_FUNCTION TRUE) + + # Iterate through the source files in the subdirectory + foreach(SRC ${MODULES_SUBDIR_SRCS}) + if(NOT SKIP_DEPENDS AND NOT SKIP_LIBRARIES AND HAS_FUNCTION) + # Temporary variable for the current source's include directories + set(TEMP_INCLUDES) + # Calculate the header file dependencies for the given source file + calculate_depends(${SRC} SKIP_DEPENDS MODULE TEMP_INCLUDES) + # If there were some extra include directories, add them to the list + if(TEMP_INCLUDES) + append_to_list(EXTRA_INCLUDES ${TEMP_INCLUDES}) + endif(TEMP_INCLUDES) + # Reset linker flags + set(TEMP_LDFLAGS) + # Reset extra dependencies + set(TEMP_DEPENDENCIES) + # Calculate the library dependencies for the given source file + calculate_libraries(${SRC} SKIP_LIBRARIES MODULE TEMP_LDFLAGS TEMP_DEPENDENCIES) + # Check the function dependencies for the given source file + check_functions(${SRC} HAS_FUNCTION) + + # Append this source file's linker flags to the subdirectoy's linker flags, if there are any to append + if(TEMP_DEPENDENCIES) + append_to_list(SUBDIR_EXTRA_DEPENDS ${TEMP_DEPDENCIES}) + endif(TEMP_DEPENDENCIES) + endif(NOT SKIP_DEPENDS AND NOT SKIP_LIBRARIES AND HAS_FUNCTION) + endforeach(SRC) + + # Continue if library and function requirements are met if(NOT SKIP_DEPENDS AND NOT SKIP_LIBRARIES AND HAS_FUNCTION) - # Temporary variable for the current source's include directories - set(TEMP_INCLUDES) - # Calculate the header file dependencies for the given source file - calculate_depends(${SRC} SKIP_DEPENDS MODULE TEMP_INCLUDES) - # If there were some extra include directories, add them to the list - if(TEMP_INCLUDES) - append_to_list(EXTRA_INCLUDES ${TEMP_INCLUDES}) - endif(TEMP_INCLUDES) - # Reset linker flags - set(TEMP_LDFLAGS) - # Reset extra dependencies - set(TEMP_DEPENDENCIES) - # Calculate the library dependencies for the given source file - calculate_libraries(${SRC} SKIP_LIBRARIES MODULE TEMP_LDFLAGS TEMP_DEPENDENCIES) - # Check the function dependencies for the given source file - check_functions(${SRC} HAS_FUNCTION) - - # Append this source file's linker flags to the subdirectoy's linker flags, if there are any to append - if(TEMP_DEPENDENCIES) - append_to_list(SUBDIR_EXTRA_DEPENDS ${TEMP_DEPDENCIES}) - endif(TEMP_DEPENDENCIES) + # Remove duplicates from the linker flags + if(SUBDIR_LDFLAGS) + remove_list_duplicates(SUBDIR_LDFLAGS) + endif(SUBDIR_LDFLAGS) + # Remove duplicates from the extra dependencies + if(SUBDIR_EXTRA_DEPENDS) + remove_list_duplicates(SUBDIR_EXTRA_DEPENDS) + endif(SUBDIR_EXTRA_DEPENDS) + + # For Visual Studio only, include win32_memory static library, required to override Visual Studio's overrides of the new/delete operators + if(MSVC) + set(WIN32_MEMORY win32_memory) + else(MSVC) + 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 + add_library(${SO} MODULE ${MODULES_SUBDIR_SRCS}) + set_target_properties(${SO} PROPERTIES LINKER_LANGUAGE CXX PREFIX "" SUFFIX "" LINK_FLAGS "${SUBDIR_LDFLAGS}" INSTALL_RPATH_USE_LINK_PATH ON BUILD_WITH_INSTALL_RPATH ON) + add_dependencies(${SO} ${PROGRAM_NAME}) + target_link_libraries(${SO} ${PROGRAM_NAME}) + if(GETTEXT_FOUND) + add_dependencies(${SO} module_language) + endif(GETTEXT_FOUND) + # 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 + if(WIN32) + target_link_libraries(${SO} ${PROGRAM_NAME} wsock32 Ws2_32 ${WIN32_MEMORY} ${SUBDIR_EXTRA_DEPENDS}) + set_target_properties(${PROGRAM_NAME} PROPERTIES VERSION "${VERSION_DOTTED}") + endif(WIN32) + # Set the module to be installed to the module directory under the data directory + install(TARGETS ${SO} + DESTINATION ${LIB_DIR}/modules + ) endif(NOT SKIP_DEPENDS AND NOT SKIP_LIBRARIES AND HAS_FUNCTION) - endforeach(SRC) - - # Continue if library and function requirements are met - if(NOT SKIP_DEPENDS AND NOT SKIP_LIBRARIES AND HAS_FUNCTION) - # Remove duplicates from the linker flags - if(SUBDIR_LDFLAGS) - remove_list_duplicates(SUBDIR_LDFLAGS) - endif(SUBDIR_LDFLAGS) - # Remove duplicates from the extra dependencies - if(SUBDIR_EXTRA_DEPENDS) - remove_list_duplicates(SUBDIR_EXTRA_DEPENDS) - endif(SUBDIR_EXTRA_DEPENDS) - # For Visual Studio only, include win32_memory static library, required to override Visual Studio's overrides of the new/delete operators - if(MSVC) - set(WIN32_MEMORY win32_memory) - else(MSVC) - 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 - add_library(${SO} MODULE ${MODULES_SUBDIR_SRCS}) - set_target_properties(${SO} PROPERTIES LINKER_LANGUAGE CXX PREFIX "" SUFFIX "" LINK_FLAGS "${SUBDIR_LDFLAGS}" INSTALL_RPATH_USE_LINK_PATH ON BUILD_WITH_INSTALL_RPATH ON) - add_dependencies(${SO} ${PROGRAM_NAME}) - target_link_libraries(${SO} ${PROGRAM_NAME}) - if(GETTEXT_FOUND) - add_dependencies(${SO} module_language) - endif(GETTEXT_FOUND) - # 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 - if(WIN32) - target_link_libraries(${SO} ${PROGRAM_NAME} wsock32 Ws2_32 ${WIN32_MEMORY} ${SUBDIR_EXTRA_DEPENDS}) - set_target_properties(${PROGRAM_NAME} PROPERTIES VERSION "${VERSION_DOTTED}") - endif(WIN32) - # Set the module to be installed to the module directory under the data directory - install(TARGETS ${SO} - DESTINATION ${LIB_DIR}/modules - ) - endif(NOT SKIP_DEPENDS AND NOT SKIP_LIBRARIES AND HAS_FUNCTION) - - # Run the directories CMakeLists.txt if there is one - if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${SUBDIR}/CMakeLists.txt") - add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/${SUBDIR}") - endif(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${SUBDIR}/CMakeLists.txt") - endif(IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/${SUBDIR}") - endforeach(SUBDIR) + # Run the directories CMakeLists.txt if there is one + if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${SUBDIR}/CMakeLists.txt") + add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/${SUBDIR}") + endif(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${SUBDIR}/CMakeLists.txt") + endif(IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/${SUBDIR}") + endforeach(SUBDIR) + endif(NOT MODULE_FOLDER STREQUAL ".") endif(IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/${MODULE_FOLDER}") endforeach(MODULE_FOLDER) diff --git a/modules/extra/bs_autoassign.cpp b/modules/bs_autoassign.cpp index 8bdab26d7..13bde5ff5 100644 --- a/modules/extra/bs_autoassign.cpp +++ b/modules/bs_autoassign.cpp @@ -5,8 +5,6 @@ * * Please read COPYING and README for further details. * - * Based on the original code of Epona by Lara. - * Based on the original code of Services by Andy Church. */ #include "module.h" @@ -16,9 +14,8 @@ class BSAutoAssign : public Module Anope::string bot; public: - BSAutoAssign(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, SUPPORTED) + BSAutoAssign(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR) { - this->SetAuthor("Anope"); Implementation i[] = { I_OnChanRegistered, I_OnReload }; ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation)); diff --git a/modules/commands/bs_assign.cpp b/modules/commands/bs_assign.cpp index 93cb5f907..027193f62 100644 --- a/modules/commands/bs_assign.cpp +++ b/modules/commands/bs_assign.cpp @@ -153,10 +153,9 @@ class BSAssign : public Module CommandBSUnassign commandbsunassign; public: - BSAssign(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), + BSAssign(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), commandbsassign(this), commandbsunassign(this) { - this->SetAuthor("Anope"); } }; diff --git a/modules/commands/bs_badwords.cpp b/modules/commands/bs_badwords.cpp index 147b23b95..90fbb875d 100644 --- a/modules/commands/bs_badwords.cpp +++ b/modules/commands/bs_badwords.cpp @@ -313,10 +313,9 @@ class BSBadwords : public Module CommandBSBadwords commandbsbadwords; public: - BSBadwords(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), + BSBadwords(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), commandbsbadwords(this) { - this->SetAuthor("Anope"); } }; diff --git a/modules/commands/bs_bot.cpp b/modules/commands/bs_bot.cpp index dd6da27d6..f8ecb1a1d 100644 --- a/modules/commands/bs_bot.cpp +++ b/modules/commands/bs_bot.cpp @@ -355,10 +355,9 @@ class BSBot : public Module CommandBSBot commandbsbot; public: - BSBot(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), + BSBot(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), commandbsbot(this) { - this->SetAuthor("Anope"); } }; diff --git a/modules/commands/bs_botlist.cpp b/modules/commands/bs_botlist.cpp index cacfce903..9eac75e88 100644 --- a/modules/commands/bs_botlist.cpp +++ b/modules/commands/bs_botlist.cpp @@ -75,10 +75,9 @@ class BSBotList : public Module CommandBSBotList commandbsbotlist; public: - BSBotList(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), + BSBotList(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), commandbsbotlist(this) { - this->SetAuthor("Anope"); } }; diff --git a/modules/commands/bs_control.cpp b/modules/commands/bs_control.cpp index d78ca6851..32e9392d7 100644 --- a/modules/commands/bs_control.cpp +++ b/modules/commands/bs_control.cpp @@ -138,10 +138,9 @@ class BSControl : public Module CommandBSAct commandbsact; public: - BSControl(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), + BSControl(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), commandbssay(this), commandbsact(this) { - this->SetAuthor("Anope"); } }; diff --git a/modules/commands/bs_info.cpp b/modules/commands/bs_info.cpp index b1e05bb17..6c017dc55 100644 --- a/modules/commands/bs_info.cpp +++ b/modules/commands/bs_info.cpp @@ -238,10 +238,9 @@ class BSInfo : public Module CommandBSInfo commandbsinfo; public: - BSInfo(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), + BSInfo(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), commandbsinfo(this) { - this->SetAuthor("Anope"); } }; diff --git a/modules/commands/bs_kick.cpp b/modules/commands/bs_kick.cpp index 97f6b6035..86248ae80 100644 --- a/modules/commands/bs_kick.cpp +++ b/modules/commands/bs_kick.cpp @@ -789,7 +789,7 @@ class BSKick : public Module } public: - BSKick(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), + BSKick(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), commandbskick(this), commandbskickamsg(this), commandbskickbadwords(this), commandbskickbolds(this), commandbskickcaps(this), commandbskickcolors(this), commandbskickflood(this), commandbskickitalics(this), commandbskickrepeat(this), @@ -797,7 +797,6 @@ class BSKick : public Module purger(this) { - this->SetAuthor("Anope"); ModuleManager::Attach(I_OnPrivmsg, this); } diff --git a/modules/commands/bs_set.cpp b/modules/commands/bs_set.cpp index b7e43eb9b..4bf8609ef 100644 --- a/modules/commands/bs_set.cpp +++ b/modules/commands/bs_set.cpp @@ -493,11 +493,10 @@ class BSSet : public Module CommandBSSetPrivate commandbssetprivate; public: - BSSet(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), + BSSet(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), commandbsset(this), commandbssetbanexpire(this), commandbssetdontkickops(this), commandbssetdontkickvoices(this), commandbssetfantasy(this), commandbssetgreet(this), commandbssetnobot(this), commandbssetprivate(this) { - this->SetAuthor("Anope"); ModuleManager::Attach(I_OnBotBan, this); } diff --git a/modules/commands/cs_access.cpp b/modules/commands/cs_access.cpp index e6f32d8d2..10a4c9885 100644 --- a/modules/commands/cs_access.cpp +++ b/modules/commands/cs_access.cpp @@ -783,10 +783,9 @@ class CSAccess : public Module CommandCSLevels commandcslevels; public: - CSAccess(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), + CSAccess(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), accessprovider(this), commandcsaccess(this), commandcslevels(this) { - this->SetAuthor("Anope"); this->SetPermanent(true); Implementation i[] = { I_OnReload, I_OnCreateChan, I_OnGroupCheckPriv }; diff --git a/modules/commands/cs_akick.cpp b/modules/commands/cs_akick.cpp index f2bd603f9..b2b1c7579 100644 --- a/modules/commands/cs_akick.cpp +++ b/modules/commands/cs_akick.cpp @@ -510,10 +510,9 @@ class CSAKick : public Module CommandCSAKick commandcsakick; public: - CSAKick(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), + CSAKick(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), commandcsakick(this) { - this->SetAuthor("Anope"); Implementation i[] = { I_OnCheckKick }; ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation)); diff --git a/modules/commands/cs_ban.cpp b/modules/commands/cs_ban.cpp index 5aad394a3..7d441f14d 100644 --- a/modules/commands/cs_ban.cpp +++ b/modules/commands/cs_ban.cpp @@ -212,9 +212,8 @@ class CSBan : public Module CommandCSBan commandcsban; public: - CSBan(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), commandcsban(this) + CSBan(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), commandcsban(this) { - this->SetAuthor("Anope"); me = this; } }; diff --git a/modules/commands/cs_clone.cpp b/modules/commands/cs_clone.cpp index 9a33a6fab..da8c82647 100644 --- a/modules/commands/cs_clone.cpp +++ b/modules/commands/cs_clone.cpp @@ -177,9 +177,8 @@ class CSClone : public Module CommandCSClone commandcsclone; public: - CSClone(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), commandcsclone(this) + CSClone(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), commandcsclone(this) { - this->SetAuthor("Anope"); } }; diff --git a/modules/commands/cs_drop.cpp b/modules/commands/cs_drop.cpp index 884544211..ade021dc1 100644 --- a/modules/commands/cs_drop.cpp +++ b/modules/commands/cs_drop.cpp @@ -87,9 +87,8 @@ class CSDrop : public Module CommandCSDrop commandcsdrop; public: - CSDrop(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), commandcsdrop(this) + CSDrop(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), commandcsdrop(this) { - this->SetAuthor("Anope"); } }; diff --git a/modules/commands/cs_enforce.cpp b/modules/commands/cs_enforce.cpp index fd5caf613..0579ebb2b 100644 --- a/modules/commands/cs_enforce.cpp +++ b/modules/commands/cs_enforce.cpp @@ -282,10 +282,9 @@ class CSEnforce : public Module CommandCSEnforce commandcsenforce; public: - CSEnforce(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), + CSEnforce(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), commandcsenforce(this) { - this->SetAuthor("Anope"); } }; diff --git a/modules/commands/cs_entrymsg.cpp b/modules/commands/cs_entrymsg.cpp index 68c36e7c7..bb82e9b24 100644 --- a/modules/commands/cs_entrymsg.cpp +++ b/modules/commands/cs_entrymsg.cpp @@ -273,9 +273,8 @@ class CSEntryMessage : public Module CommandEntryMessage commandentrymsg; public: - CSEntryMessage(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), entrymsg_type("EntryMsg", EntryMsg::Unserialize), commandentrymsg(this) + CSEntryMessage(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), entrymsg_type("EntryMsg", EntryMsg::Unserialize), commandentrymsg(this) { - this->SetAuthor("Anope"); Implementation i[] = { I_OnReload, I_OnJoinChannel }; ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation)); diff --git a/modules/commands/cs_fantasy_stats.cpp b/modules/commands/cs_fantasy_stats.cpp index 580307441..591da28e9 100644 --- a/modules/commands/cs_fantasy_stats.cpp +++ b/modules/commands/cs_fantasy_stats.cpp @@ -68,11 +68,10 @@ class CSStats : public Module MySQLInterface sqlinterface; Anope::string prefix; public: - CSStats(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), + CSStats(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), commandcsstats(this), commandcsgstats(this), sql("", ""), sqlinterface(this) { me = this; - this->SetAuthor("Anope"); Implementation i[] = { I_OnReload }; ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation)); diff --git a/modules/commands/cs_fantasy_top.cpp b/modules/commands/cs_fantasy_top.cpp index 16d65dd05..739f21f41 100644 --- a/modules/commands/cs_fantasy_top.cpp +++ b/modules/commands/cs_fantasy_top.cpp @@ -94,12 +94,11 @@ class CSTop : public Module Anope::string prefix; public: - CSTop(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), + CSTop(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), commandcstop(this), commandcsgtop(this), commandcstop10(this), commandcsgtop10(this), sql("", ""), sqlinterface(this) { me = this; - this->SetAuthor("Anope"); Implementation i[] = { I_OnReload }; ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation)); diff --git a/modules/commands/cs_flags.cpp b/modules/commands/cs_flags.cpp index 4681c3d61..bdff5a6e5 100644 --- a/modules/commands/cs_flags.cpp +++ b/modules/commands/cs_flags.cpp @@ -387,10 +387,9 @@ class CSFlags : public Module CommandCSFlags commandcsflags; public: - CSFlags(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), + CSFlags(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), accessprovider(this), commandcsflags(this) { - this->SetAuthor("Anope"); this->SetPermanent(true); Implementation i[] = { I_OnReload }; diff --git a/modules/commands/cs_getkey.cpp b/modules/commands/cs_getkey.cpp index 1ac5633ea..ec64b45f8 100644 --- a/modules/commands/cs_getkey.cpp +++ b/modules/commands/cs_getkey.cpp @@ -67,9 +67,8 @@ class CSGetKey : public Module CommandCSGetKey commandcsgetkey; public: - CSGetKey(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), commandcsgetkey(this) + CSGetKey(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), commandcsgetkey(this) { - this->SetAuthor("Anope"); } }; diff --git a/modules/commands/cs_info.cpp b/modules/commands/cs_info.cpp index 9485e81fd..a686541be 100644 --- a/modules/commands/cs_info.cpp +++ b/modules/commands/cs_info.cpp @@ -142,10 +142,9 @@ class CSInfo : public Module CommandCSInfo commandcsinfo; public: - CSInfo(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), + CSInfo(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), commandcsinfo(this) { - this->SetAuthor("Anope"); } }; diff --git a/modules/commands/cs_invite.cpp b/modules/commands/cs_invite.cpp index bb59d538e..4b204bfc4 100644 --- a/modules/commands/cs_invite.cpp +++ b/modules/commands/cs_invite.cpp @@ -104,9 +104,8 @@ class CSInvite : public Module CommandCSInvite commandcsinvite; public: - CSInvite(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), commandcsinvite(this) + CSInvite(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), commandcsinvite(this) { - this->SetAuthor("Anope"); } }; diff --git a/modules/commands/cs_kick.cpp b/modules/commands/cs_kick.cpp index 870c18f0c..d7251ec6b 100644 --- a/modules/commands/cs_kick.cpp +++ b/modules/commands/cs_kick.cpp @@ -126,9 +126,8 @@ class CSKick : public Module CommandCSKick commandcskick; public: - CSKick(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), commandcskick(this) + CSKick(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), commandcskick(this) { - this->SetAuthor("Anope"); } }; diff --git a/modules/commands/cs_list.cpp b/modules/commands/cs_list.cpp index 29c8a827b..72f3e35dc 100644 --- a/modules/commands/cs_list.cpp +++ b/modules/commands/cs_list.cpp @@ -166,9 +166,8 @@ class CSList : public Module CommandCSList commandcslist; public: - CSList(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), commandcslist(this) + CSList(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), commandcslist(this) { - this->SetAuthor("Anope"); } }; diff --git a/modules/commands/cs_log.cpp b/modules/commands/cs_log.cpp index 41d8229f6..569617ba5 100644 --- a/modules/commands/cs_log.cpp +++ b/modules/commands/cs_log.cpp @@ -185,10 +185,9 @@ class CSLog : public Module CommandCSLog commandcslog; public: - CSLog(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), + CSLog(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), MSService("MemoServService", "MemoServ"), commandcslog(this) { - this->SetAuthor("Anope"); Implementation i[] = { I_OnLog }; ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation)); diff --git a/modules/commands/cs_mode.cpp b/modules/commands/cs_mode.cpp index f0f7894cf..513a5410e 100644 --- a/modules/commands/cs_mode.cpp +++ b/modules/commands/cs_mode.cpp @@ -485,10 +485,9 @@ class CSMode : public Module CommandCSMode commandcsmode; public: - CSMode(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), + CSMode(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), commandcsmode(this) { - this->SetAuthor("Anope"); } }; diff --git a/modules/commands/cs_register.cpp b/modules/commands/cs_register.cpp index a79942fc3..0a571100c 100644 --- a/modules/commands/cs_register.cpp +++ b/modules/commands/cs_register.cpp @@ -134,10 +134,9 @@ class CSRegister : public Module CommandCSRegister commandcsregister; public: - CSRegister(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), + CSRegister(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), commandcsregister(this) { - this->SetAuthor("Anope"); } }; diff --git a/modules/commands/cs_seen.cpp b/modules/commands/cs_seen.cpp index 66706c8fb..7c88c89b8 100644 --- a/modules/commands/cs_seen.cpp +++ b/modules/commands/cs_seen.cpp @@ -324,9 +324,8 @@ class CSSeen : public Module CommandOSSeen commandosseen; DataBasePurger purger; public: - CSSeen(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), seeninfo_type("SeenInfo", SeenInfo::Unserialize), commandseen(this), commandosseen(this), purger(this) + CSSeen(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), seeninfo_type("SeenInfo", SeenInfo::Unserialize), commandseen(this), commandosseen(this), purger(this) { - this->SetAuthor("Anope"); Implementation eventlist[] = { I_OnReload, I_OnUserConnect, diff --git a/modules/commands/cs_set.cpp b/modules/commands/cs_set.cpp index 67d024c9f..03aa6c59c 100644 --- a/modules/commands/cs_set.cpp +++ b/modules/commands/cs_set.cpp @@ -1154,14 +1154,13 @@ class CSSet : public Module CommandCSSASetNoexpire commandcssasetnoexpire; public: - CSSet(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), + CSSet(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), commandcsset(this), commandcssaset(this), commandcssetautoop(this), commandcssetbantype(this), commandcssetchanstats(this), CSDefChanstats(false), commandcssetdescription(this), commandcssetfounder(this), commandcssetkeeptopic(this), commandcssetpeace(this), commandcssetpersist(this), commandcssetprivate(this), commandcssetrestricted(this), commandcssetsecure(this), commandcssetsecurefounder(this), commandcssetsecureops(this), commandcssetsignkick(this), commandcssetsuccessor(this), commandcssasetnoexpire(this) { - this->SetAuthor("Anope"); Implementation i[] = { I_OnReload, I_OnChanRegistered, I_OnCheckKick, I_OnDelChan }; ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation)); diff --git a/modules/commands/cs_set_misc.cpp b/modules/commands/cs_set_misc.cpp index 3b6e761a7..93897f332 100644 --- a/modules/commands/cs_set_misc.cpp +++ b/modules/commands/cs_set_misc.cpp @@ -135,10 +135,9 @@ class CSSetMisc : public Module CommandCSSetMisc commandcssetmisc; public: - CSSetMisc(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), + CSSetMisc(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), csmiscdata_type("CSMiscData", CSMiscData::Unserialize), commandcssetmisc(this) { - this->SetAuthor("Anope"); Implementation i[] = { I_OnReload, I_OnChanInfo }; ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation)); diff --git a/modules/commands/cs_status.cpp b/modules/commands/cs_status.cpp index 1d1aa619c..50f7080ac 100644 --- a/modules/commands/cs_status.cpp +++ b/modules/commands/cs_status.cpp @@ -104,9 +104,8 @@ class CSStatus : public Module CommandCSStatus commandcsstatus; public: - CSStatus(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), commandcsstatus(this) + CSStatus(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), commandcsstatus(this) { - this->SetAuthor("Anope"); } }; diff --git a/modules/commands/cs_suspend.cpp b/modules/commands/cs_suspend.cpp index 0ea54879e..4927737f6 100644 --- a/modules/commands/cs_suspend.cpp +++ b/modules/commands/cs_suspend.cpp @@ -164,10 +164,9 @@ class CSSuspend : public Module CommandCSUnSuspend commandcsunsuspend; public: - CSSuspend(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), + CSSuspend(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), commandcssuspend(this), commandcsunsuspend(this) { - this->SetAuthor("Anope"); Implementation i[] = { I_OnPreChanExpire, I_OnCheckKick }; ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation)); diff --git a/modules/commands/cs_sync.cpp b/modules/commands/cs_sync.cpp index 3983a52d1..9e6dfb0ec 100644 --- a/modules/commands/cs_sync.cpp +++ b/modules/commands/cs_sync.cpp @@ -55,10 +55,9 @@ class CSSync : public Module { CommandCSSync commandcssync; public: - CSSync(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), + CSSync(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), commandcssync(this) { - this->SetAuthor("Anope"); } }; diff --git a/modules/commands/cs_topic.cpp b/modules/commands/cs_topic.cpp index c98c5c958..64e710017 100644 --- a/modules/commands/cs_topic.cpp +++ b/modules/commands/cs_topic.cpp @@ -122,10 +122,9 @@ class CSTopic : public Module CommandCSTopic commandcstopic; public: - CSTopic(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), + CSTopic(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), commandcstopic(this) { - this->SetAuthor("Anope"); } }; diff --git a/modules/commands/cs_unban.cpp b/modules/commands/cs_unban.cpp index eaf371a34..8b90ee93d 100644 --- a/modules/commands/cs_unban.cpp +++ b/modules/commands/cs_unban.cpp @@ -107,10 +107,9 @@ class CSUnban : public Module CommandCSUnban commandcsunban; public: - CSUnban(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), + CSUnban(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), commandcsunban(this) { - this->SetAuthor("Anope"); } }; diff --git a/modules/commands/cs_updown.cpp b/modules/commands/cs_updown.cpp index ecce1e51d..8a8f3f336 100644 --- a/modules/commands/cs_updown.cpp +++ b/modules/commands/cs_updown.cpp @@ -166,10 +166,9 @@ class CSUpDown : public Module CommandCSDown commandcsdown; public: - CSUpDown(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), + CSUpDown(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), commandcsup(this), commandcsdown(this) { - this->SetAuthor("Anope"); } }; diff --git a/modules/commands/cs_xop.cpp b/modules/commands/cs_xop.cpp index 18a2789c7..1cfa033e2 100644 --- a/modules/commands/cs_xop.cpp +++ b/modules/commands/cs_xop.cpp @@ -539,10 +539,9 @@ class CSXOP : public Module CommandCSXOP commandcsxop; public: - CSXOP(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), + CSXOP(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), accessprovider(this), commandcsxop(this) { - this->SetAuthor("Anope"); this->SetPermanent(true); this->OnReload(); diff --git a/modules/commands/gl_global.cpp b/modules/commands/gl_global.cpp index 7cc4dbdc8..fae4554d4 100644 --- a/modules/commands/gl_global.cpp +++ b/modules/commands/gl_global.cpp @@ -53,10 +53,9 @@ class GLGlobal : public Module CommandGLGlobal commandglglobal; public: - GLGlobal(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), + GLGlobal(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), commandglglobal(this) { - this->SetAuthor("Anope"); } }; diff --git a/modules/commands/help.cpp b/modules/commands/help.cpp index fcac6863c..a55af89ff 100644 --- a/modules/commands/help.cpp +++ b/modules/commands/help.cpp @@ -196,10 +196,9 @@ class Help : public Module CommandHelp commandhelp; public: - Help(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), + Help(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), commandhelp(this) { - this->SetAuthor("Anope"); } }; diff --git a/modules/commands/hs_del.cpp b/modules/commands/hs_del.cpp index 5df23e721..ad9347ce0 100644 --- a/modules/commands/hs_del.cpp +++ b/modules/commands/hs_del.cpp @@ -92,10 +92,9 @@ class HSDel : public Module CommandHSDelAll commandhsdelall; public: - HSDel(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), + HSDel(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), commandhsdel(this), commandhsdelall(this) { - this->SetAuthor("Anope"); } }; diff --git a/modules/commands/hs_group.cpp b/modules/commands/hs_group.cpp index ee997f704..9f7b41d57 100644 --- a/modules/commands/hs_group.cpp +++ b/modules/commands/hs_group.cpp @@ -68,10 +68,9 @@ class HSGroup : public Module CommandHSGroup commandhsgroup; public: - HSGroup(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), + HSGroup(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), commandhsgroup(this) { - this->SetAuthor("Anope"); } }; diff --git a/modules/commands/hs_list.cpp b/modules/commands/hs_list.cpp index 96e6866f0..94533e73d 100644 --- a/modules/commands/hs_list.cpp +++ b/modules/commands/hs_list.cpp @@ -153,10 +153,9 @@ class HSList : public Module CommandHSList commandhslist; public: - HSList(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), + HSList(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), commandhslist(this) { - this->SetAuthor("Anope"); } }; diff --git a/modules/commands/hs_off.cpp b/modules/commands/hs_off.cpp index 3db3c1adf..ad79dfadc 100644 --- a/modules/commands/hs_off.cpp +++ b/modules/commands/hs_off.cpp @@ -56,10 +56,9 @@ class HSOff : public Module CommandHSOff commandhsoff; public: - HSOff(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), + HSOff(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), commandhsoff(this) { - this->SetAuthor("Anope"); } }; diff --git a/modules/commands/hs_on.cpp b/modules/commands/hs_on.cpp index e19482c9a..9f33ac6ac 100644 --- a/modules/commands/hs_on.cpp +++ b/modules/commands/hs_on.cpp @@ -65,10 +65,9 @@ class HSOn : public Module CommandHSOn commandhson; public: - HSOn(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), + HSOn(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), commandhson(this) { - this->SetAuthor("Anope"); } }; diff --git a/modules/commands/hs_request.cpp b/modules/commands/hs_request.cpp index df104f721..1867dbb77 100644 --- a/modules/commands/hs_request.cpp +++ b/modules/commands/hs_request.cpp @@ -348,10 +348,9 @@ class HSRequest : public Module CommandHSWaiting commandhswaiting; public: - HSRequest(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), + HSRequest(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), request_type("HostRequest", HostRequest::Unserialize), commandhsrequest(this), commandhsactive(this), commandhsreject(this), commandhswaiting(this) { - this->SetAuthor("Anope"); if (!IRCD || !IRCD->CanSetVHost) throw ModuleException("Your IRCd does not support vhosts"); diff --git a/modules/commands/hs_set.cpp b/modules/commands/hs_set.cpp index 11ecbca5a..4adc86897 100644 --- a/modules/commands/hs_set.cpp +++ b/modules/commands/hs_set.cpp @@ -211,9 +211,8 @@ class HSSet : public Module CommandHSSetAll commandhssetall; public: - HSSet(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), commandhsset(this), commandhssetall(this) + HSSet(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), commandhsset(this), commandhssetall(this) { - this->SetAuthor("Anope"); } }; diff --git a/modules/commands/ms_cancel.cpp b/modules/commands/ms_cancel.cpp index e03883d91..e0e917b5e 100644 --- a/modules/commands/ms_cancel.cpp +++ b/modules/commands/ms_cancel.cpp @@ -78,10 +78,9 @@ class MSCancel : public Module CommandMSCancel commandmscancel; public: - MSCancel(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), + MSCancel(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), commandmscancel(this) { - this->SetAuthor("Anope"); if (!MemoServService) throw ModuleException("No MemoServ!"); diff --git a/modules/commands/ms_check.cpp b/modules/commands/ms_check.cpp index 984126ee6..9a24e9973 100644 --- a/modules/commands/ms_check.cpp +++ b/modules/commands/ms_check.cpp @@ -76,10 +76,9 @@ class MSCheck : public Module CommandMSCheck commandmscheck; public: - MSCheck(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), + MSCheck(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), commandmscheck(this) { - this->SetAuthor("Anope"); } }; diff --git a/modules/commands/ms_del.cpp b/modules/commands/ms_del.cpp index 33175d023..18927f8ee 100644 --- a/modules/commands/ms_del.cpp +++ b/modules/commands/ms_del.cpp @@ -153,10 +153,9 @@ class MSDel : public Module CommandMSDel commandmsdel; public: - MSDel(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), + MSDel(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), commandmsdel(this) { - this->SetAuthor("Anope"); } }; diff --git a/modules/commands/ms_ignore.cpp b/modules/commands/ms_ignore.cpp index 41e139eff..d1f33abdf 100644 --- a/modules/commands/ms_ignore.cpp +++ b/modules/commands/ms_ignore.cpp @@ -121,10 +121,9 @@ class MSIgnore : public Module CommandMSIgnore commandmsignore; public: - MSIgnore(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), + MSIgnore(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), commandmsignore(this) { - this->SetAuthor("Anope"); if (!MemoServService) throw ModuleException("No MemoServ!"); diff --git a/modules/commands/ms_info.cpp b/modules/commands/ms_info.cpp index 21ec9ba13..517e6b1ac 100644 --- a/modules/commands/ms_info.cpp +++ b/modules/commands/ms_info.cpp @@ -207,10 +207,9 @@ class MSInfo : public Module CommandMSInfo commandmsinfo; public: - MSInfo(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), + MSInfo(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), commandmsinfo(this) { - this->SetAuthor("Anope"); } }; diff --git a/modules/commands/ms_list.cpp b/modules/commands/ms_list.cpp index 3181f9dff..8b7ebeb62 100644 --- a/modules/commands/ms_list.cpp +++ b/modules/commands/ms_list.cpp @@ -156,10 +156,9 @@ class MSList : public Module CommandMSList commandmslist; public: - MSList(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), + MSList(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), commandmslist(this) { - this->SetAuthor("Anope"); } }; diff --git a/modules/commands/ms_read.cpp b/modules/commands/ms_read.cpp index 14b952922..c98708724 100644 --- a/modules/commands/ms_read.cpp +++ b/modules/commands/ms_read.cpp @@ -186,10 +186,9 @@ class MSRead : public Module CommandMSRead commandmsread; public: - MSRead(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), + MSRead(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), commandmsread(this) { - this->SetAuthor("Anope"); } }; diff --git a/modules/commands/ms_rsend.cpp b/modules/commands/ms_rsend.cpp index e5c345c75..782871d84 100644 --- a/modules/commands/ms_rsend.cpp +++ b/modules/commands/ms_rsend.cpp @@ -95,10 +95,9 @@ class MSRSend : public Module CommandMSRSend commandmsrsend; public: - MSRSend(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), + MSRSend(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), commandmsrsend(this) { - this->SetAuthor("Anope"); if (!MemoServService) throw ModuleException("No MemoServ!"); diff --git a/modules/commands/ms_send.cpp b/modules/commands/ms_send.cpp index f92955dcf..15ca4a6ba 100644 --- a/modules/commands/ms_send.cpp +++ b/modules/commands/ms_send.cpp @@ -63,10 +63,9 @@ class MSSend : public Module CommandMSSend commandmssend; public: - MSSend(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), + MSSend(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), commandmssend(this) { - this->SetAuthor("Anope"); if (!MemoServService) throw ModuleException("No MemoServ!"); diff --git a/modules/commands/ms_sendall.cpp b/modules/commands/ms_sendall.cpp index 59d532bf9..d823f7c5f 100644 --- a/modules/commands/ms_sendall.cpp +++ b/modules/commands/ms_sendall.cpp @@ -64,10 +64,9 @@ class MSSendAll : public Module CommandMSSendAll commandmssendall; public: - MSSendAll(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), + MSSendAll(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), commandmssendall(this) { - this->SetAuthor("Anope"); if (!MemoServService) throw ModuleException("No MemoServ!"); diff --git a/modules/commands/ms_set.cpp b/modules/commands/ms_set.cpp index f2fc15c09..b0a2fb8ba 100644 --- a/modules/commands/ms_set.cpp +++ b/modules/commands/ms_set.cpp @@ -299,10 +299,9 @@ class MSSet : public Module CommandMSSet commandmsset; public: - MSSet(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), + MSSet(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), commandmsset(this) { - this->SetAuthor("Anope"); } }; diff --git a/modules/commands/ms_staff.cpp b/modules/commands/ms_staff.cpp index 6a1263fa7..f9d5e81e5 100644 --- a/modules/commands/ms_staff.cpp +++ b/modules/commands/ms_staff.cpp @@ -64,10 +64,9 @@ class MSStaff : public Module CommandMSStaff commandmsstaff; public: - MSStaff(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), + MSStaff(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), commandmsstaff(this) { - this->SetAuthor("Anope"); if (!MemoServService) throw ModuleException("No MemoServ!"); diff --git a/modules/commands/ns_access.cpp b/modules/commands/ns_access.cpp index bd26dbb2c..a026314e0 100644 --- a/modules/commands/ns_access.cpp +++ b/modules/commands/ns_access.cpp @@ -181,10 +181,9 @@ class NSAccess : public Module CommandNSAccess commandnsaccess; public: - NSAccess(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), + NSAccess(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), commandnsaccess(this) { - this->SetAuthor("Anope"); } }; diff --git a/modules/commands/ns_ajoin.cpp b/modules/commands/ns_ajoin.cpp index 3f4d9d3ec..d427e9cf3 100644 --- a/modules/commands/ns_ajoin.cpp +++ b/modules/commands/ns_ajoin.cpp @@ -237,10 +237,9 @@ class NSAJoin : public Module CommandNSAJoin commandnsajoin; public: - NSAJoin(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), + NSAJoin(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), ajoinentry_type("AJoinEntry", AJoinEntry::Unserialize), commandnsajoin(this) { - this->SetAuthor("Anope"); if (!IRCD->CanSVSJoin) throw ModuleException("Your IRCd does not support SVSJOIN"); diff --git a/modules/commands/ns_alist.cpp b/modules/commands/ns_alist.cpp index c8d7eef0f..9c673a7fc 100644 --- a/modules/commands/ns_alist.cpp +++ b/modules/commands/ns_alist.cpp @@ -121,10 +121,9 @@ class NSAList : public Module CommandNSAList commandnsalist; public: - NSAList(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), + NSAList(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), commandnsalist(this) { - this->SetAuthor("Anope"); } }; diff --git a/modules/commands/ns_cert.cpp b/modules/commands/ns_cert.cpp index bbfbdd3e8..1191aaa9b 100644 --- a/modules/commands/ns_cert.cpp +++ b/modules/commands/ns_cert.cpp @@ -219,10 +219,9 @@ class NSCert : public Module } public: - NSCert(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), + NSCert(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), commandnscert(this) { - this->SetAuthor("Anope"); if (!IRCD || !IRCD->CanCertFP) throw ModuleException("Your IRCd does not support ssl client certificates"); diff --git a/modules/commands/ns_drop.cpp b/modules/commands/ns_drop.cpp index e52ca5681..cc03b1001 100644 --- a/modules/commands/ns_drop.cpp +++ b/modules/commands/ns_drop.cpp @@ -112,10 +112,9 @@ class NSDrop : public Module CommandNSDrop commandnsdrop; public: - NSDrop(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), + NSDrop(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), commandnsdrop(this) { - this->SetAuthor("Anope"); } }; diff --git a/modules/commands/ns_getemail.cpp b/modules/commands/ns_getemail.cpp index 7728f3178..386940a0a 100644 --- a/modules/commands/ns_getemail.cpp +++ b/modules/commands/ns_getemail.cpp @@ -69,10 +69,9 @@ class NSGetEMail : public Module { CommandNSGetEMail commandnsgetemail; public: - NSGetEMail(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), + NSGetEMail(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), commandnsgetemail(this) { - this->SetAuthor("Anope"); } }; diff --git a/modules/commands/ns_getpass.cpp b/modules/commands/ns_getpass.cpp index 987e98827..aad6fb55b 100644 --- a/modules/commands/ns_getpass.cpp +++ b/modules/commands/ns_getpass.cpp @@ -62,10 +62,9 @@ class NSGetPass : public Module CommandNSGetPass commandnsgetpass; public: - NSGetPass(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), + NSGetPass(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), commandnsgetpass(this) { - this->SetAuthor("Anope"); Anope::string tmp_pass = "plain:tmp"; if (Anope::Decrypt(tmp_pass, tmp_pass) == -1) diff --git a/modules/commands/ns_group.cpp b/modules/commands/ns_group.cpp index b8191046a..090b47fd4 100644 --- a/modules/commands/ns_group.cpp +++ b/modules/commands/ns_group.cpp @@ -348,10 +348,9 @@ class NSGroup : public Module CommandNSGList commandnsglist; public: - NSGroup(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), + NSGroup(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), commandnsgroup(this), commandnsungroup(this), commandnsglist(this) { - this->SetAuthor("Anope"); if (Config->NoNicknameOwnership) throw ModuleException(modname + " can not be used with options:nonicknameownership enabled"); diff --git a/modules/commands/ns_identify.cpp b/modules/commands/ns_identify.cpp index adbe97de5..037072728 100644 --- a/modules/commands/ns_identify.cpp +++ b/modules/commands/ns_identify.cpp @@ -109,10 +109,9 @@ class NSIdentify : public Module CommandNSIdentify commandnsidentify; public: - NSIdentify(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), + NSIdentify(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), commandnsidentify(this) { - this->SetAuthor("Anope"); } }; diff --git a/modules/commands/ns_info.cpp b/modules/commands/ns_info.cpp index fddb9c5ad..171937730 100644 --- a/modules/commands/ns_info.cpp +++ b/modules/commands/ns_info.cpp @@ -164,10 +164,9 @@ class NSInfo : public Module CommandNSInfo commandnsinfo; public: - NSInfo(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), + NSInfo(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), commandnsinfo(this) { - this->SetAuthor("Anope"); } }; diff --git a/modules/commands/ns_list.cpp b/modules/commands/ns_list.cpp index b96b21412..d1887f287 100644 --- a/modules/commands/ns_list.cpp +++ b/modules/commands/ns_list.cpp @@ -182,10 +182,9 @@ class NSList : public Module CommandNSList commandnslist; public: - NSList(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), + NSList(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), commandnslist(this) { - this->SetAuthor("Anope"); } }; diff --git a/modules/commands/ns_logout.cpp b/modules/commands/ns_logout.cpp index 1147b390f..cdeab3add 100644 --- a/modules/commands/ns_logout.cpp +++ b/modules/commands/ns_logout.cpp @@ -84,10 +84,9 @@ class NSLogout : public Module CommandNSLogout commandnslogout; public: - NSLogout(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), + NSLogout(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), commandnslogout(this) { - this->SetAuthor("Anope"); } }; diff --git a/modules/commands/ns_recover.cpp b/modules/commands/ns_recover.cpp index ee54f3b3f..669d26da9 100644 --- a/modules/commands/ns_recover.cpp +++ b/modules/commands/ns_recover.cpp @@ -201,10 +201,9 @@ class NSRecover : public Module CommandNSRecover commandnsrecover; public: - NSRecover(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), + NSRecover(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), commandnsrecover(this) { - this->SetAuthor("Anope"); if (Config->NoNicknameOwnership) throw ModuleException(modname + " can not be used with options:nonicknameownership enabled"); diff --git a/modules/commands/ns_register.cpp b/modules/commands/ns_register.cpp index 2803d459a..af7853c5a 100644 --- a/modules/commands/ns_register.cpp +++ b/modules/commands/ns_register.cpp @@ -342,10 +342,9 @@ class NSRegister : public Module CommandNSResend commandnsrsend; public: - NSRegister(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), + NSRegister(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), commandnsregister(this), commandnsconfirm(this), commandnsrsend(this) { - this->SetAuthor("Anope"); if (Config->NSRegistration.equals_ci("disable")) throw ModuleException("Module will not load with nickserv:registration disabled."); diff --git a/modules/commands/ns_resetpass.cpp b/modules/commands/ns_resetpass.cpp index e57261a9f..3ccb41ec1 100644 --- a/modules/commands/ns_resetpass.cpp +++ b/modules/commands/ns_resetpass.cpp @@ -66,10 +66,9 @@ class NSResetPass : public Module CommandNSResetPass commandnsresetpass; public: - NSResetPass(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), + NSResetPass(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), commandnsresetpass(this) { - this->SetAuthor("Anope"); if (!Config->UseMail) throw ModuleException("Not using mail."); diff --git a/modules/commands/ns_set.cpp b/modules/commands/ns_set.cpp index f7e3888f6..f8b2b7155 100644 --- a/modules/commands/ns_set.cpp +++ b/modules/commands/ns_set.cpp @@ -1385,7 +1385,7 @@ class NSSet : public Module CommandNSSASetNoexpire commandnssasetnoexpire; public: - NSSet(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), + NSSet(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), commandnsset(this), commandnssaset(this), commandnssetautoop(this), commandnssasetautoop(this), commandnssetchanstats(this), commandnssasetchanstats(this), NSDefChanstats(false), @@ -1401,7 +1401,6 @@ class NSSet : public Module commandnssetsecure(this), commandnssasetsecure(this), commandnssasetnoexpire(this) { - this->SetAuthor("Anope"); Implementation i[] = { I_OnReload, I_OnNickRegister, I_OnPreCommand }; ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation)); diff --git a/modules/commands/ns_set_misc.cpp b/modules/commands/ns_set_misc.cpp index a5a0019b6..35210abd0 100644 --- a/modules/commands/ns_set_misc.cpp +++ b/modules/commands/ns_set_misc.cpp @@ -154,10 +154,9 @@ class NSSetMisc : public Module CommandNSSASetMisc commandnssasetmisc; public: - NSSetMisc(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), + NSSetMisc(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), nsmiscdata_type("NSMiscData", NSMiscData::Unserialize), commandnssetmisc(this), commandnssasetmisc(this) { - this->SetAuthor("Anope"); Implementation i[] = { I_OnReload, I_OnNickInfo }; ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation)); diff --git a/modules/commands/ns_status.cpp b/modules/commands/ns_status.cpp index 8fc803896..68568de0a 100644 --- a/modules/commands/ns_status.cpp +++ b/modules/commands/ns_status.cpp @@ -77,10 +77,9 @@ class NSStatus : public Module CommandNSStatus commandnsstatus; public: - NSStatus(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), + NSStatus(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), commandnsstatus(this) { - this->SetAuthor("Anope"); } }; diff --git a/modules/commands/ns_suspend.cpp b/modules/commands/ns_suspend.cpp index a4cc7f355..dabd47a7e 100644 --- a/modules/commands/ns_suspend.cpp +++ b/modules/commands/ns_suspend.cpp @@ -170,10 +170,9 @@ class NSSuspend : public Module CommandNSUnSuspend commandnsunsuspend; public: - NSSuspend(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), + NSSuspend(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), commandnssuspend(this), commandnsunsuspend(this) { - this->SetAuthor("Anope"); Implementation i[] = { I_OnPreNickExpire }; ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation)); diff --git a/modules/commands/ns_update.cpp b/modules/commands/ns_update.cpp index 309a95087..7acbd8aef 100644 --- a/modules/commands/ns_update.cpp +++ b/modules/commands/ns_update.cpp @@ -55,10 +55,9 @@ class NSUpdate : public Module CommandNSUpdate commandnsupdate; public: - NSUpdate(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), + NSUpdate(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), commandnsupdate(this) { - this->SetAuthor("Anope"); } }; diff --git a/modules/commands/os_akill.cpp b/modules/commands/os_akill.cpp index bdf609b03..47121c51f 100644 --- a/modules/commands/os_akill.cpp +++ b/modules/commands/os_akill.cpp @@ -449,10 +449,9 @@ class OSAKill : public Module CommandOSAKill commandosakill; public: - OSAKill(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), + OSAKill(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), commandosakill(this) { - this->SetAuthor("Anope"); } }; diff --git a/modules/commands/os_chankill.cpp b/modules/commands/os_chankill.cpp index c88011b5b..8253742a6 100644 --- a/modules/commands/os_chankill.cpp +++ b/modules/commands/os_chankill.cpp @@ -108,10 +108,9 @@ class OSChanKill : public Module CommandOSChanKill commandoschankill; public: - OSChanKill(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), + OSChanKill(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), commandoschankill(this) { - this->SetAuthor("Anope"); } }; diff --git a/modules/commands/os_config.cpp b/modules/commands/os_config.cpp index b9c58b2b0..540bcc3e7 100644 --- a/modules/commands/os_config.cpp +++ b/modules/commands/os_config.cpp @@ -217,10 +217,9 @@ class OSConfig : public Module CommandOSConfig commandosconfig; public: - OSConfig(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), + OSConfig(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), commandosconfig(this) { - this->SetAuthor("Anope"); } }; diff --git a/modules/commands/os_defcon.cpp b/modules/commands/os_defcon.cpp index 5d85c2e70..53148c6a8 100644 --- a/modules/commands/os_defcon.cpp +++ b/modules/commands/os_defcon.cpp @@ -329,9 +329,8 @@ class OSDefcon : public Module } public: - OSDefcon(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), session_service("SessionService", "session"), akills("XLineManager", "xlinemanager/sgline"), commandosdefcon(this) + OSDefcon(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), session_service("SessionService", "session"), akills("XLineManager", "xlinemanager/sgline"), commandosdefcon(this) { - this->SetAuthor("Anope"); Implementation i[] = { I_OnReload, I_OnChannelModeSet, I_OnChannelModeUnset, I_OnPreCommand, I_OnUserConnect, I_OnChannelModeAdd, I_OnChannelCreate }; ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation)); diff --git a/modules/commands/os_dns.cpp b/modules/commands/os_dns.cpp index 666baefdf..efcff8fc5 100644 --- a/modules/commands/os_dns.cpp +++ b/modules/commands/os_dns.cpp @@ -663,10 +663,9 @@ class ModuleDNS : public Module bool readd_connected_servers; public: - ModuleDNS(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, SUPPORTED), + ModuleDNS(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, EXTRA | VENDOR), zone_type("DNSZone", DNSZone::Unserialize), dns_type("DNSServer", DNSServer::Unserialize), commandosdns(this) { - this->SetAuthor("Anope"); Implementation i[] = { I_OnReload, I_OnNewServer, I_OnServerQuit, I_OnUserConnect, I_OnPreUserLogoff, I_OnDnsRequest }; ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation)); diff --git a/modules/commands/os_forbid.cpp b/modules/commands/os_forbid.cpp index a33ef66f2..0bdf95da8 100644 --- a/modules/commands/os_forbid.cpp +++ b/modules/commands/os_forbid.cpp @@ -251,10 +251,9 @@ class OSForbid : public Module CommandOSForbid commandosforbid; public: - OSForbid(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), + OSForbid(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), forbiddata_type("ForbidData", ForbidData::Unserialize), forbidService(this), commandosforbid(this) { - this->SetAuthor("Anope"); Implementation i[] = { I_OnUserConnect, I_OnUserNickChange, I_OnJoinChannel, I_OnPreCommand }; ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation)); diff --git a/modules/commands/os_ignore.cpp b/modules/commands/os_ignore.cpp index 3d30237fa..1b7ae61c5 100644 --- a/modules/commands/os_ignore.cpp +++ b/modules/commands/os_ignore.cpp @@ -317,10 +317,9 @@ class OSIgnore : public Module CommandOSIgnore commandosignore; public: - OSIgnore(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), + OSIgnore(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), ignoredata_type("IgnoreData", IgnoreData::Unserialize), osignoreservice(this), commandosignore(this) { - this->SetAuthor("Anope"); Implementation i[] = { I_OnBotPrivmsg }; ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation)); diff --git a/modules/commands/os_jupe.cpp b/modules/commands/os_jupe.cpp index fbe5bac12..4f40a5495 100644 --- a/modules/commands/os_jupe.cpp +++ b/modules/commands/os_jupe.cpp @@ -66,10 +66,9 @@ class OSJupe : public Module CommandOSJupe commandosjupe; public: - OSJupe(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), + OSJupe(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), commandosjupe(this) { - this->SetAuthor("Anope"); } }; diff --git a/modules/commands/os_kick.cpp b/modules/commands/os_kick.cpp index 37866af74..d9ac75c9a 100644 --- a/modules/commands/os_kick.cpp +++ b/modules/commands/os_kick.cpp @@ -70,10 +70,9 @@ class OSKick : public Module CommandOSKick commandoskick; public: - OSKick(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), + OSKick(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), commandoskick(this) { - this->SetAuthor("Anope"); } }; diff --git a/modules/commands/os_kill.cpp b/modules/commands/os_kill.cpp index 898e601e6..d3eeedda5 100644 --- a/modules/commands/os_kill.cpp +++ b/modules/commands/os_kill.cpp @@ -59,10 +59,9 @@ class OSKill : public Module CommandOSKill commandoskill; public: - OSKill(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), + OSKill(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), commandoskill(this) { - this->SetAuthor("Anope"); } }; diff --git a/modules/commands/os_list.cpp b/modules/commands/os_list.cpp index 6880bbbc0..e8092cb4d 100644 --- a/modules/commands/os_list.cpp +++ b/modules/commands/os_list.cpp @@ -225,10 +225,9 @@ class OSList : public Module CommandOSUserList commandosuserlist; public: - OSList(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), + OSList(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), commandoschanlist(this), commandosuserlist(this) { - this->SetAuthor("Anope"); } }; diff --git a/modules/commands/os_login.cpp b/modules/commands/os_login.cpp index 76b9e15ba..f1fc823c1 100644 --- a/modules/commands/os_login.cpp +++ b/modules/commands/os_login.cpp @@ -107,10 +107,9 @@ class OSLogin : public Module CommandOSLogout commandoslogout; public: - OSLogin(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), + OSLogin(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), commandoslogin(this), commandoslogout(this) { - this->SetAuthor("Anope"); ModuleManager::Attach(I_IsServicesOper, this); } diff --git a/modules/commands/os_logsearch.cpp b/modules/commands/os_logsearch.cpp index 6eec4ba74..5a063ad53 100644 --- a/modules/commands/os_logsearch.cpp +++ b/modules/commands/os_logsearch.cpp @@ -148,10 +148,9 @@ class OSLogSearch : public Module CommandOSLogSearch commandoslogsearch; public: - OSLogSearch(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), + OSLogSearch(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), commandoslogsearch(this) { - this->SetAuthor("Anope"); Implementation i[] = { I_OnReload }; ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation)); diff --git a/modules/commands/os_mode.cpp b/modules/commands/os_mode.cpp index db0ac73b5..8af247da5 100644 --- a/modules/commands/os_mode.cpp +++ b/modules/commands/os_mode.cpp @@ -176,10 +176,9 @@ class OSMode : public Module CommandOSUMode commandosumode; public: - OSMode(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), + OSMode(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), commandosmode(this), commandosumode(this) { - this->SetAuthor("Anope"); } }; diff --git a/modules/commands/os_modinfo.cpp b/modules/commands/os_modinfo.cpp index 014418e6e..b6f793796 100644 --- a/modules/commands/os_modinfo.cpp +++ b/modules/commands/os_modinfo.cpp @@ -29,7 +29,7 @@ class CommandOSModInfo : public Command Module *m = ModuleManager::FindModule(file); if (m) { - source.Reply(_("Module: \002%s\002 Version: \002%s\002 Author: \002%s\002 loaded: \002%s\002"), m->name.c_str(), !m->version.empty() ? m->version.c_str() : "?", !m->author.empty() ? m->author.c_str() : "?", Anope::strftime(m->created).c_str()); + source.Reply(_("Module: \002%s\002 Version: \002%s\002 Author: \002%s\002 loaded: \002%s\002"), m->name.c_str(), !m->version.empty() ? m->version.c_str() : "?", !m->author.empty() ? m->author.c_str() : "Unknown", Anope::strftime(m->created).c_str()); std::vector<Anope::string> servicekeys = Service::GetServiceKeys("Command"); for (unsigned i = 0; i < servicekeys.size(); ++i) @@ -76,157 +76,115 @@ class CommandOSModList : public Command CommandOSModList(Module *creator) : Command(creator, "operserv/modlist", 0, 1) { this->SetDesc(_("List loaded modules")); - this->SetSyntax(_("[Core|3rd|protocol|encryption|supported]")); + this->SetSyntax(_("[all|third|vendor|database|encryption|pseudoclient|protocol]")); } void Execute(CommandSource &source, const std::vector<Anope::string> ¶ms) anope_override { const Anope::string ¶m = !params.empty() ? params[0] : ""; + bool third = false, extra = false, vendor = false, database = false, encryption = false, pseudoclient = false, protocol = false; + + if (param.equals_ci("all")) + third = extra = vendor = database = encryption = pseudoclient = protocol = true; + else if (param.equals_ci("third")) + third = true; + else if (param.equals_ci("vendor")) + vendor = true; + else if (param.equals_ci("database")) + database = true; + else if (param.equals_ci("encryption")) + encryption = true; + else if (param.equals_ci("pseudoclient")) + pseudoclient = true; + else if (param.equals_ci("protocol")) + protocol = true; + else + third = extra = database = encryption = protocol = true; + + Module *protomod = ModuleManager::FindFirstOf(PROTOCOL); + + source.Reply(_("Current module list:")); + int count = 0; - int showCore = 0; - int showThird = 1; - int showProto = 1; - int showEnc = 1; - int showSupported = 1; - int showDB = 1; - - char core[] = "Core"; - char third[] = "3rd"; - char proto[] = "Protocol"; - char enc[] = "Encryption"; - char supported[] = "Supported"; - char db[] = "Database"; - - if (!param.empty()) + for (std::list<Module *>::iterator it = ModuleManager::Modules.begin(), it_end = ModuleManager::Modules.end(); it != it_end; ++it) { - if (param.equals_ci(core)) + Module *m = *it; + + bool show = false; + Anope::string mtype; + + if (m->type & PROTOCOL) { - showCore = 1; - showThird = 0; - showProto = 0; - showEnc = 0; - showSupported = 0; - showDB = 0; + show |= protocol; + if (!mtype.empty()) + mtype += ", "; + mtype += "Protocol"; } - else if (param.equals_ci(third)) + if (m->type & PSEUDOCLIENT) { - showCore = 0; - showThird = 1; - showSupported = 0; - showProto = 0; - showEnc = 0; - showDB = 0; + show |= pseudoclient; + if (!mtype.empty()) + mtype += ", "; + mtype += "Pseudoclient"; } - else if (param.equals_ci(proto)) + if (m->type & ENCRYPTION) { - showCore = 0; - showThird = 0; - showProto = 1; - showEnc = 0; - showSupported = 0; - showDB = 0; + show |= encryption; + if (!mtype.empty()) + mtype += ", "; + mtype += "Encryption"; } - else if (param.equals_ci(supported)) + if (m->type & DATABASE) { - showCore = 0; - showThird = 0; - showProto = 0; - showSupported = 1; - showEnc = 0; - showDB = 0; + show |= database; + if (!mtype.empty()) + mtype += ", "; + mtype += "Database"; } - else if (param.equals_ci(enc)) + if (m->type & VENDOR) { - showCore = 0; - showThird = 0; - showProto = 0; - showSupported = 0; - showEnc = 1; - showDB = 0; + show |= vendor; + if (!mtype.empty()) + mtype += ", "; + mtype += "Vendor"; } - else if (param.equals_ci(db)) + if (m->type & EXTRA) { - showCore = 0; - showThird = 0; - showProto = 0; - showSupported = 0; - showEnc = 0; - showDB = 1; + show |= extra; + if (!mtype.empty()) + mtype += ", "; + mtype += "Extra"; + } + if (m->type & THIRD) + { + show |= third; + if (!mtype.empty()) + mtype += ", "; + mtype += "Third"; } - } - - Module *protocol = ModuleManager::FindFirstOf(PROTOCOL); - source.Reply(_("Current module list:")); + if (!show) + continue; + else if (m->type & PROTOCOL && param.empty() && m != protomod) + continue; - for (std::list<Module *>::iterator it = ModuleManager::Modules.begin(), it_end = ModuleManager::Modules.end(); it != it_end; ++it) - { - Module *m = *it; + ++count; - switch (m->type) - { - case CORE: - if (showCore) - { - source.Reply(_("Module: \002%s\002 [%s] [%s]"), m->name.c_str(), m->version.c_str(), core); - ++count; - } - break; - case THIRD: - if (showThird) - { - source.Reply(_("Module: \002%s\002 [%s] [%s]"), m->name.c_str(), m->version.c_str(), third); - ++count; - } - break; - case PROTOCOL: - if (m != protocol) - break; - if (showProto) - { - source.Reply(_("Module: \002%s\002 [%s] [%s]"), m->name.c_str(), m->version.c_str(), proto); - ++count; - } - break; - case SUPPORTED: - if (showSupported) - { - source.Reply(_("Module: \002%s\002 [%s] [%s]"), m->name.c_str(), m->version.c_str(), supported); - ++count; - } - break; - case ENCRYPTION: - if (showEnc) - { - source.Reply(_("Module: \002%s\002 [%s] [%s]"), m->name.c_str(), m->version.c_str(), enc); - ++count; - } - break; - case DATABASE: - if (showDB) - { - source.Reply(_("Module: \002%s\002 [%s] [%s]"), m->name.c_str(), m->version.c_str(), db); - ++count; - } - break; - default: - break; - } + source.Reply(_("Module: \002%s\002 [%s] [%s]"), m->name.c_str(), m->version.c_str(), mtype.c_str()); } + if (!count) - source.Reply(_("No modules currently loaded.")); + source.Reply(_("No modules currently loaded matching that criteria.")); else source.Reply(_("%d modules loaded."), count); - - return; } bool OnHelp(CommandSource &source, const Anope::string &subcommand) anope_override { this->SendSyntax(source); source.Reply(" "); - source.Reply(_("Lists all currently loaded modules.")); + source.Reply(_("Lists currently loaded modules.")); return true; } }; @@ -237,10 +195,9 @@ class OSModInfo : public Module CommandOSModList commandosmodlist; public: - OSModInfo(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), + OSModInfo(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), commandosmodinfo(this), commandosmodlist(this) { - this->SetAuthor("Anope"); } }; diff --git a/modules/commands/os_module.cpp b/modules/commands/os_module.cpp index aa9673019..0de03971e 100644 --- a/modules/commands/os_module.cpp +++ b/modules/commands/os_module.cpp @@ -180,10 +180,9 @@ class OSModule : public Module CommandOSModUnLoad commandosmodunload; public: - OSModule(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), + OSModule(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), commandosmodload(this), commandosmodreload(this), commandosmodunload(this) { - this->SetAuthor("Anope"); this->SetPermanent(true); } diff --git a/modules/commands/os_news.cpp b/modules/commands/os_news.cpp index 0833fbaa6..f72273104 100644 --- a/modules/commands/os_news.cpp +++ b/modules/commands/os_news.cpp @@ -390,10 +390,9 @@ class OSNews : public Module } public: - OSNews(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), + OSNews(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), newsitem_type("NewsItem", NewsItem::Unserialize), newsservice(this), commandoslogonnews(this), commandosopernews(this), commandosrandomnews(this) { - this->SetAuthor("Anope"); Implementation i[] = { I_OnUserModeSet, I_OnUserConnect }; ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation)); diff --git a/modules/commands/os_noop.cpp b/modules/commands/os_noop.cpp index 082294f22..1d619dbb6 100644 --- a/modules/commands/os_noop.cpp +++ b/modules/commands/os_noop.cpp @@ -80,10 +80,9 @@ class OSNOOP : public Module CommandOSNOOP commandosnoop; public: - OSNOOP(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), + OSNOOP(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), commandosnoop(this) { - this->SetAuthor("Anope"); ModuleManager::Attach(I_OnUserModeSet, this); } diff --git a/modules/commands/os_oline.cpp b/modules/commands/os_oline.cpp index ba6d3f54c..e8f7cee9d 100644 --- a/modules/commands/os_oline.cpp +++ b/modules/commands/os_oline.cpp @@ -67,10 +67,9 @@ class OSOLine : public Module CommandOSOLine commandosoline; public: - OSOLine(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), + OSOLine(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), commandosoline(this) { - this->SetAuthor("Anope"); if (!IRCD || !IRCD->CanSVSO) throw ModuleException("Your IRCd does not support OMODE."); diff --git a/modules/commands/os_oper.cpp b/modules/commands/os_oper.cpp index 91efcf575..c3327dd4b 100644 --- a/modules/commands/os_oper.cpp +++ b/modules/commands/os_oper.cpp @@ -207,10 +207,9 @@ class OSOper : public Module CommandOSOper commandosoper; public: - OSOper(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), + OSOper(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), myoper_type("Oper", MyOper::Unserialize), commandosoper(this) { - this->SetAuthor("Anope"); } ~OSOper() diff --git a/modules/commands/os_reload.cpp b/modules/commands/os_reload.cpp index 0370bcd2e..86b3a040e 100644 --- a/modules/commands/os_reload.cpp +++ b/modules/commands/os_reload.cpp @@ -60,10 +60,9 @@ class OSReload : public Module CommandOSReload commandosreload; public: - OSReload(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), + OSReload(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), commandosreload(this) { - this->SetAuthor("Anope"); } }; diff --git a/modules/commands/os_session.cpp b/modules/commands/os_session.cpp index 31846c9db..67d1b79a3 100644 --- a/modules/commands/os_session.cpp +++ b/modules/commands/os_session.cpp @@ -619,10 +619,9 @@ class OSSession : public Module ServiceReference<XLineManager> akills; public: - OSSession(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), + OSSession(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), exception_type("Exception", Exception::Unserialize), ss(this), commandossession(this), commandosexception(this), akills("XLineManager", "xlinemanager/sgline") { - this->SetAuthor("Anope"); this->SetPermanent(true); Implementation i[] = { I_OnUserConnect, I_OnPreUserLogoff }; diff --git a/modules/commands/os_set.cpp b/modules/commands/os_set.cpp index 90d4f70d9..6d701dd11 100644 --- a/modules/commands/os_set.cpp +++ b/modules/commands/os_set.cpp @@ -246,10 +246,9 @@ class OSSet : public Module CommandOSSet commandosset; public: - OSSet(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), + OSSet(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), commandosset(this) { - this->SetAuthor("Anope"); } }; diff --git a/modules/commands/os_shutdown.cpp b/modules/commands/os_shutdown.cpp index 29d1713d5..a658441b3 100644 --- a/modules/commands/os_shutdown.cpp +++ b/modules/commands/os_shutdown.cpp @@ -100,10 +100,9 @@ class OSShutdown : public Module CommandOSShutdown commandosshutdown; public: - OSShutdown(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), + OSShutdown(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), commandosquit(this), commandosrestart(this), commandosshutdown(this) { - this->SetAuthor("Anope"); } }; diff --git a/modules/commands/os_stats.cpp b/modules/commands/os_stats.cpp index 779b8bbf5..7aa8740c7 100644 --- a/modules/commands/os_stats.cpp +++ b/modules/commands/os_stats.cpp @@ -255,10 +255,9 @@ class OSStats : public Module Stats stats_saver; public: - OSStats(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), + OSStats(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), commandosstats(this), stats_type("Stats", Stats::Unserialize) { - this->SetAuthor("Anope"); } }; diff --git a/modules/commands/os_svs.cpp b/modules/commands/os_svs.cpp index 0a0ae9638..13b29e84c 100644 --- a/modules/commands/os_svs.cpp +++ b/modules/commands/os_svs.cpp @@ -166,10 +166,9 @@ class OSSVS : public Module CommandOSSVSPart commandossvspart; public: - OSSVS(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), + OSSVS(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), commandossvsnick(this), commandossvsjoin(this), commandossvspart(this) { - this->SetAuthor("Anope"); } }; diff --git a/modules/commands/os_sxline.cpp b/modules/commands/os_sxline.cpp index e76a611db..1cf921467 100644 --- a/modules/commands/os_sxline.cpp +++ b/modules/commands/os_sxline.cpp @@ -699,10 +699,9 @@ class OSSXLine : public Module CommandOSSQLine commandossqline; public: - OSSXLine(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), + OSSXLine(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), commandossnline(this), commandossqline(this) { - this->SetAuthor("Anope"); } }; diff --git a/modules/commands/os_update.cpp b/modules/commands/os_update.cpp index f71ebca55..bedb835b7 100644 --- a/modules/commands/os_update.cpp +++ b/modules/commands/os_update.cpp @@ -44,10 +44,9 @@ class OSUpdate : public Module CommandOSUpdate commandosupdate; public: - OSUpdate(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), + OSUpdate(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), commandosupdate(this) { - this->SetAuthor("Anope"); } }; diff --git a/modules/extra/cs_statusupdate.cpp b/modules/cs_statusupdate.cpp index 934b928d1..130c0c3dc 100644 --- a/modules/extra/cs_statusupdate.cpp +++ b/modules/cs_statusupdate.cpp @@ -10,9 +10,8 @@ class StatusUpdate : public Module { public: - StatusUpdate(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, SUPPORTED) + StatusUpdate(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR) { - this->SetAuthor("Anope"); Implementation i[] = { I_OnAccessAdd, I_OnAccessDel }; ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation)); diff --git a/modules/database/db_flatfile.cpp b/modules/database/db_flatfile.cpp index a7e65f1cb..50a513c65 100644 --- a/modules/database/db_flatfile.cpp +++ b/modules/database/db_flatfile.cpp @@ -164,9 +164,8 @@ class DBFlatFile : public Module, public Pipe } public: - DBFlatFile(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, DATABASE), last_day(0), use_fork(false), loaded(false) + DBFlatFile(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, DATABASE | VENDOR), last_day(0), use_fork(false), loaded(false) { - this->SetAuthor("Anope"); Implementation i[] = { I_OnReload, I_OnLoadDatabase, I_OnSaveDatabase, I_OnSerializeTypeCreate }; ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation)); diff --git a/modules/database/db_old.cpp b/modules/database/db_old.cpp index 03c80e6bd..dc2e1676b 100644 --- a/modules/database/db_old.cpp +++ b/modules/database/db_old.cpp @@ -1092,9 +1092,8 @@ static void LoadExceptions() class DBOld : public Module { public: - DBOld(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, DATABASE) + DBOld(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, DATABASE | VENDOR) { - this->SetAuthor("Anope"); Implementation i[] = { I_OnLoadDatabase, I_OnUplinkSync }; ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation)); diff --git a/modules/database/db_plain.cpp b/modules/database/db_plain.cpp index 99bdf947a..f2b3bffd2 100644 --- a/modules/database/db_plain.cpp +++ b/modules/database/db_plain.cpp @@ -587,9 +587,8 @@ class DBPlain : public Module /* Backup file names */ std::list<Anope::string> Backups; public: - DBPlain(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, DATABASE) + DBPlain(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, DATABASE | VENDOR) { - this->SetAuthor("Anope"); Implementation i[] = { I_OnReload, I_OnLoadDatabase, I_OnSaveDatabase }; ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation)); diff --git a/modules/database/db_sql.cpp b/modules/database/db_sql.cpp index 78b05a52d..74da4c44c 100644 --- a/modules/database/db_sql.cpp +++ b/modules/database/db_sql.cpp @@ -89,9 +89,8 @@ class DBSQL : public Module, public Pipe } public: - DBSQL(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, DATABASE), sql("", ""), sqlinterface(this), shutting_down(false), loading_databases(false), loaded(false), imported(false) + DBSQL(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, DATABASE | VENDOR), sql("", ""), sqlinterface(this), shutting_down(false), loading_databases(false), loaded(false), imported(false) { - this->SetAuthor("Anope"); Implementation i[] = { I_OnReload, I_OnShutdown, I_OnRestart, I_OnLoadDatabase, I_OnSerializableConstruct, I_OnSerializableDestruct, I_OnSerializableUpdate, I_OnSerializeTypeCreate }; ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation)); diff --git a/modules/database/db_sql_live.cpp b/modules/database/db_sql_live.cpp index c7c48937a..ab08472d8 100644 --- a/modules/database/db_sql_live.cpp +++ b/modules/database/db_sql_live.cpp @@ -66,7 +66,7 @@ class DBMySQL : public Module, public Pipe } public: - DBMySQL(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, DATABASE), SQL("", "") + DBMySQL(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, DATABASE | VENDOR), SQL("", "") { this->lastwarn = 0; this->ro = false; diff --git a/modules/encryption/enc_md5.cpp b/modules/encryption/enc_md5.cpp index c1cf9449e..3bcdb599c 100644 --- a/modules/encryption/enc_md5.cpp +++ b/modules/encryption/enc_md5.cpp @@ -344,10 +344,9 @@ class EMD5 : public Module MD5Provider md5provider; public: - EMD5(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, ENCRYPTION), + EMD5(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, ENCRYPTION | VENDOR), md5provider(this) { - this->SetAuthor("Anope"); Implementation i[] = { I_OnEncrypt, I_OnCheckAuthentication }; ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation)); diff --git a/modules/encryption/enc_none.cpp b/modules/encryption/enc_none.cpp index fe8b03679..5f219000c 100644 --- a/modules/encryption/enc_none.cpp +++ b/modules/encryption/enc_none.cpp @@ -12,9 +12,8 @@ class ENone : public Module { public: - ENone(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, ENCRYPTION) + ENone(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, ENCRYPTION | VENDOR) { - this->SetAuthor("Anope"); Implementation i[] = { I_OnEncrypt, I_OnDecrypt, I_OnCheckAuthentication }; ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation)); diff --git a/modules/encryption/enc_old.cpp b/modules/encryption/enc_old.cpp index dad8bb91f..037a2fffc 100644 --- a/modules/encryption/enc_old.cpp +++ b/modules/encryption/enc_old.cpp @@ -41,10 +41,9 @@ class EOld : public Module inline static char XTOI(char c) { return c > 9 ? c - 'A' + 10 : c - '0'; } public: - EOld(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, ENCRYPTION), + EOld(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, ENCRYPTION | VENDOR), oldmd5provider(this) { - this->SetAuthor("Anope"); ModuleManager::LoadModule("enc_md5", User::Find(creator)); if (!md5) diff --git a/modules/encryption/enc_sha1.cpp b/modules/encryption/enc_sha1.cpp index 0c9c70830..c1f032874 100644 --- a/modules/encryption/enc_sha1.cpp +++ b/modules/encryption/enc_sha1.cpp @@ -197,10 +197,9 @@ class ESHA1 : public Module SHA1Provider sha1provider; public: - ESHA1(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, ENCRYPTION), + ESHA1(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, ENCRYPTION | VENDOR), sha1provider(this) { - this->SetAuthor("Anope"); Implementation i[] = { I_OnEncrypt, I_OnCheckAuthentication }; ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation)); diff --git a/modules/encryption/enc_sha256.cpp b/modules/encryption/enc_sha256.cpp index 0ed0c7786..85fbaf223 100644 --- a/modules/encryption/enc_sha256.cpp +++ b/modules/encryption/enc_sha256.cpp @@ -273,10 +273,9 @@ class ESHA256 : public Module } public: - ESHA256(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, ENCRYPTION), + ESHA256(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, ENCRYPTION | VENDOR), sha256provider(this) { - this->SetAuthor("Anope"); Implementation i[] = { I_OnEncrypt, I_OnCheckAuthentication }; ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation)); diff --git a/modules/extra/m_chanstats.cpp b/modules/extra/m_chanstats.cpp index 3c964b55c..d62befbb0 100644 --- a/modules/extra/m_chanstats.cpp +++ b/modules/extra/m_chanstats.cpp @@ -334,9 +334,8 @@ class MChanstats : public Module public: MChanstats(const Anope::string &modname, const Anope::string &creator) : - Module(modname, creator, CORE), sql("", ""), sqlinterface(this) + Module(modname, creator, EXTRA | VENDOR), sql("", ""), sqlinterface(this) { - this->SetAuthor("Anope"); Implementation i[] = { I_OnPrivmsg, I_OnUserKicked, diff --git a/modules/extra/m_dns.cpp b/modules/extra/m_dns.cpp index 90f9bee9e..3ee7aaa67 100644 --- a/modules/extra/m_dns.cpp +++ b/modules/extra/m_dns.cpp @@ -933,9 +933,8 @@ class ModuleDNS : public Module int port; public: - ModuleDNS(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, SUPPORTED), manager(this) + ModuleDNS(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, EXTRA | VENDOR), manager(this) { - this->SetAuthor("Anope"); Implementation i[] = { I_OnReload, I_OnModuleUnload }; ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation)); diff --git a/modules/extra/m_httpd.cpp b/modules/extra/m_httpd.cpp index f1e5392c5..6972bcdf1 100644 --- a/modules/extra/m_httpd.cpp +++ b/modules/extra/m_httpd.cpp @@ -331,9 +331,8 @@ class HTTPD : public Module ServiceReference<SSLService> sslref; std::map<Anope::string, HTTPProvider *> providers; public: - HTTPD(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, SUPPORTED), sslref("SSLService", "ssl") + HTTPD(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, EXTRA | VENDOR), sslref("SSLService", "ssl") { - this->SetAuthor("Anope"); Implementation i[] = { I_OnReload }; ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation)); diff --git a/modules/extra/m_ldap.cpp b/modules/extra/m_ldap.cpp index d53e04992..80a6b5a9e 100644 --- a/modules/extra/m_ldap.cpp +++ b/modules/extra/m_ldap.cpp @@ -403,7 +403,7 @@ class ModuleLDAP : public Module, public Pipe std::map<Anope::string, LDAPService *> LDAPServices; public: - ModuleLDAP(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, SUPPORTED) + ModuleLDAP(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, EXTRA | VENDOR) { me = this; diff --git a/modules/extra/m_ldap_authentication.cpp b/modules/extra/m_ldap_authentication.cpp index 5ddd9da2d..cc5626cd3 100644 --- a/modules/extra/m_ldap_authentication.cpp +++ b/modules/extra/m_ldap_authentication.cpp @@ -216,9 +216,8 @@ class NSIdentifyLDAP : public Module Anope::string disable_email_reason; public: NSIdentifyLDAP(const Anope::string &modname, const Anope::string &creator) : - Module(modname, creator, SUPPORTED), ldap("LDAPProvider", "ldap/main"), iinterface(this), oninterface(this), orinterface(this) + Module(modname, creator, EXTRA | VENDOR), ldap("LDAPProvider", "ldap/main"), iinterface(this), oninterface(this), orinterface(this) { - this->SetAuthor("Anope"); me = this; diff --git a/modules/extra/m_ldap_oper.cpp b/modules/extra/m_ldap_oper.cpp index ed2f5900a..f44628c63 100644 --- a/modules/extra/m_ldap_oper.cpp +++ b/modules/extra/m_ldap_oper.cpp @@ -86,9 +86,8 @@ class LDAPOper : public Module Anope::string filter; public: LDAPOper(const Anope::string &modname, const Anope::string &creator) : - Module(modname, creator, SUPPORTED), ldap("LDAPProvider", "ldap/main"), iinterface(this) + Module(modname, creator, EXTRA | VENDOR), ldap("LDAPProvider", "ldap/main"), iinterface(this) { - this->SetAuthor("Anope"); Implementation i[] = { I_OnReload, I_OnNickIdentify, I_OnDelCore }; ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation)); diff --git a/modules/extra/m_mysql.cpp b/modules/extra/m_mysql.cpp index e072f8dfe..8eecb4a23 100644 --- a/modules/extra/m_mysql.cpp +++ b/modules/extra/m_mysql.cpp @@ -165,7 +165,7 @@ class ModuleSQL : public Module, public Pipe /* The thread used to execute queries */ DispatcherThread *DThread; - ModuleSQL(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, SUPPORTED) + ModuleSQL(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, EXTRA | VENDOR) { me = this; diff --git a/modules/extra/m_proxyscan.cpp b/modules/extra/m_proxyscan.cpp index e14f82df6..78f42a910 100644 --- a/modules/extra/m_proxyscan.cpp +++ b/modules/extra/m_proxyscan.cpp @@ -221,10 +221,9 @@ class ModuleProxyScan : public Module } connectionTimeout; public: - ModuleProxyScan(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, SUPPORTED), + ModuleProxyScan(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, EXTRA | VENDOR), connectionTimeout(this, 5) { - this->SetAuthor("Anope"); Implementation i[] = { I_OnReload, I_OnUserConnect }; ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation)); diff --git a/modules/extra/m_regex_pcre.cpp b/modules/extra/m_regex_pcre.cpp index 998a7692d..b6bf88af1 100644 --- a/modules/extra/m_regex_pcre.cpp +++ b/modules/extra/m_regex_pcre.cpp @@ -44,10 +44,9 @@ class ModuleRegexPCRE : public Module PCRERegexProvider pcre_regex_provider; public: - ModuleRegexPCRE(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, SUPPORTED), + ModuleRegexPCRE(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, EXTRA | VENDOR), pcre_regex_provider(this) { - this->SetAuthor("Anope"); this->SetPermanent(true); } }; diff --git a/modules/extra/m_regex_posix.cpp b/modules/extra/m_regex_posix.cpp index 409a057ba..551d978b8 100644 --- a/modules/extra/m_regex_posix.cpp +++ b/modules/extra/m_regex_posix.cpp @@ -46,10 +46,9 @@ class ModuleRegexPOSIX : public Module POSIXRegexProvider posix_regex_provider; public: - ModuleRegexPOSIX(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, SUPPORTED), + ModuleRegexPOSIX(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, EXTRA | VENDOR), posix_regex_provider(this) { - this->SetAuthor("Anope"); this->SetPermanent(true); } }; diff --git a/modules/extra/m_regex_tre.cpp b/modules/extra/m_regex_tre.cpp index 8cfbd3b18..760097b08 100644 --- a/modules/extra/m_regex_tre.cpp +++ b/modules/extra/m_regex_tre.cpp @@ -47,10 +47,9 @@ class ModuleRegexTRE : public Module TRERegexProvider tre_regex_provider; public: - ModuleRegexTRE(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, SUPPORTED), + ModuleRegexTRE(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, EXTRA | VENDOR), tre_regex_provider(this) { - this->SetAuthor("Anope"); this->SetPermanent(true); } }; diff --git a/modules/extra/m_sql_authentication.cpp b/modules/extra/m_sql_authentication.cpp index abdd745a5..7fcdf4e13 100644 --- a/modules/extra/m_sql_authentication.cpp +++ b/modules/extra/m_sql_authentication.cpp @@ -78,9 +78,8 @@ class ModuleSQLAuthentication : public Module ServiceReference<SQL::Provider> SQL; public: - ModuleSQLAuthentication(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, SUPPORTED) + ModuleSQLAuthentication(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, EXTRA | VENDOR) { - this->SetAuthor("Anope"); me = this; diff --git a/modules/extra/m_sql_oper.cpp b/modules/extra/m_sql_oper.cpp index f786ad36d..bbcd108c4 100644 --- a/modules/extra/m_sql_oper.cpp +++ b/modules/extra/m_sql_oper.cpp @@ -94,9 +94,8 @@ class ModuleSQLOper : public Module ServiceReference<SQL::Provider> SQL; public: - ModuleSQLOper(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, SUPPORTED) + ModuleSQLOper(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, EXTRA | VENDOR) { - this->SetAuthor("Anope"); Implementation i[] = { I_OnReload, I_OnNickIdentify }; ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation)); diff --git a/modules/extra/m_sqlite.cpp b/modules/extra/m_sqlite.cpp index 69fd16b9f..623e1e8b1 100644 --- a/modules/extra/m_sqlite.cpp +++ b/modules/extra/m_sqlite.cpp @@ -64,7 +64,7 @@ class ModuleSQLite : public Module /* SQL connections */ std::map<Anope::string, SQLiteService *> SQLiteServices; public: - ModuleSQLite(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, SUPPORTED) + ModuleSQLite(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, EXTRA | VENDOR) { Implementation i[] = { I_OnReload }; ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation)); diff --git a/modules/extra/m_ssl.cpp b/modules/extra/m_ssl.cpp index 7158a5ce5..5ecf30cfc 100644 --- a/modules/extra/m_ssl.cpp +++ b/modules/extra/m_ssl.cpp @@ -92,11 +92,10 @@ class SSLModule : public Module public: MySSLService service; - SSLModule(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, SUPPORTED), service(this, "ssl") + SSLModule(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, EXTRA | VENDOR), service(this, "ssl") { me = this; - this->SetAuthor("Anope"); this->SetPermanent(true); SSL_library_init(); diff --git a/modules/extra/m_xmlrpc.cpp b/modules/extra/m_xmlrpc.cpp index a3b999a5e..060001940 100644 --- a/modules/extra/m_xmlrpc.cpp +++ b/modules/extra/m_xmlrpc.cpp @@ -161,7 +161,7 @@ class ModuleXMLRPC : public Module public: MyXMLRPCServiceInterface xmlrpcinterface; - ModuleXMLRPC(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, SUPPORTED), xmlrpcinterface(this, "xmlrpc") + ModuleXMLRPC(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, EXTRA | VENDOR), xmlrpcinterface(this, "xmlrpc") { OnReload(); diff --git a/modules/extra/m_xmlrpc_main.cpp b/modules/extra/m_xmlrpc_main.cpp index 9166f27df..0ba748f0b 100644 --- a/modules/extra/m_xmlrpc_main.cpp +++ b/modules/extra/m_xmlrpc_main.cpp @@ -258,7 +258,7 @@ class ModuleXMLRPCMain : public Module MyXMLRPCEvent stats; public: - ModuleXMLRPCMain(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, SUPPORTED), xmlrpc("XMLRPCServiceInterface", "xmlrpc") + ModuleXMLRPCMain(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, EXTRA | VENDOR), xmlrpc("XMLRPCServiceInterface", "xmlrpc") { me = this; diff --git a/modules/extra/webcpanel/webcpanel.cpp b/modules/extra/webcpanel/webcpanel.cpp index 77e99dd4e..e2a026559 100644 --- a/modules/extra/webcpanel/webcpanel.cpp +++ b/modules/extra/webcpanel/webcpanel.cpp @@ -41,7 +41,7 @@ class ModuleWebCPanel : public Module public: - ModuleWebCPanel(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, SUPPORTED), + ModuleWebCPanel(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, EXTRA | VENDOR), panel(this, "webcpanel"), style_css("style.css", "/static/style.css", "text/css"), logo_png("logo.png", "/static/logo.png", "image/png"), favicon_ico("favicon.ico", "/favicon.ico", "image/x-icon"), index("/"), logout("/logout"), _register("/register"), confirm("/confirm"), @@ -49,7 +49,6 @@ class ModuleWebCPanel : public Module chanserv_info(Config->ChanServ, "/chanserv/info"), chanserv_set(Config->ChanServ, "/chanserv/set"), chanserv_access(Config->ChanServ, "/chanserv/access"), chanserv_akick(Config->ChanServ, "/chanserv/akick"), chanserv_drop(Config->ChanServ, "/chanserv/drop"), memoserv_memos(Config->MemoServ, "/memoserv/memos"), hostserv_request(Config->HostServ, "/hostserv/request"), operserv_akill(Config->OperServ, "/operserv/akill") { - this->SetAuthor("Anope"); me = this; diff --git a/modules/extra/m_dnsbl.cpp b/modules/m_dnsbl.cpp index 49d39d980..cf5a2b861 100644 --- a/modules/extra/m_dnsbl.cpp +++ b/modules/m_dnsbl.cpp @@ -6,7 +6,7 @@ */ #include "module.h" -#include "dns.h" +#include "extra/dns.h" using namespace DNS; @@ -88,9 +88,8 @@ class ModuleDNSBL : public Module bool add_to_akill; public: - ModuleDNSBL(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, SUPPORTED) + ModuleDNSBL(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR) { - this->SetAuthor("Anope"); Implementation i[] = { I_OnReload, I_OnUserConnect }; ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation)); diff --git a/modules/extra/m_helpchan.cpp b/modules/m_helpchan.cpp index 32d1859fc..e0163b925 100644 --- a/modules/extra/m_helpchan.cpp +++ b/modules/m_helpchan.cpp @@ -12,9 +12,8 @@ class HelpChannel : public Module Anope::string HelpChan; public: - HelpChannel(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, SUPPORTED) + HelpChannel(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR) { - this->SetAuthor("Anope"); Implementation i[] = { I_OnChannelModeSet, I_OnReload }; ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation)); @@ -28,7 +27,7 @@ class HelpChannel : public Module { User *u = User::Find(param); - if (u && c->ci->AccessFor(u).HasPriv("OPDEOPME")) + if (u && c->ci->AccessFor(u).HasPriv("OPME")) u->SetMode(OperServ, "HELPOP"); } diff --git a/modules/extra/m_rewrite.cpp b/modules/m_rewrite.cpp index 2df259e3d..1e281de94 100644 --- a/modules/extra/m_rewrite.cpp +++ b/modules/m_rewrite.cpp @@ -153,9 +153,8 @@ class ModuleRewrite : public Module RewriteCommand cmdrewrite; public: - ModuleRewrite(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, SUPPORTED), cmdrewrite(this) + ModuleRewrite(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), cmdrewrite(this) { - this->SetAuthor("Anope"); Implementation i[] = { I_OnReload }; ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation)); diff --git a/modules/extra/ns_maxemail.cpp b/modules/ns_maxemail.cpp index fda500a07..bf90374d0 100644 --- a/modules/extra/ns_maxemail.cpp +++ b/modules/ns_maxemail.cpp @@ -51,9 +51,8 @@ class NSMaxEmail : public Module } public: - NSMaxEmail(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, SUPPORTED) + NSMaxEmail(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR) { - this->SetAuthor("Anope"); Implementation i[] = { I_OnReload, I_OnPreCommand }; ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation)); diff --git a/modules/protocol/bahamut.cpp b/modules/protocol/bahamut.cpp index 1f15e3c06..bebca302b 100644 --- a/modules/protocol/bahamut.cpp +++ b/modules/protocol/bahamut.cpp @@ -542,7 +542,7 @@ class ProtoBahamut : public Module } public: - ProtoBahamut(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, PROTOCOL), + ProtoBahamut(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, PROTOCOL | VENDOR), ircd_proto(this), message_away(this), message_capab(this), message_error(this), message_join(this), message_kick(this), message_kill(this), message_motd(this), message_part(this), @@ -552,7 +552,6 @@ class ProtoBahamut : public Module message_burst(this), message_mode(this, "MODE"), message_svsmode(this, "SVSMODE"), message_nick(this), message_server(this), message_sjoin(this), message_topic(this) { - this->SetAuthor("Anope"); this->AddModes(); diff --git a/modules/protocol/charybdis.cpp b/modules/protocol/charybdis.cpp index 07acda4f2..f4efbea50 100644 --- a/modules/protocol/charybdis.cpp +++ b/modules/protocol/charybdis.cpp @@ -382,7 +382,7 @@ class ProtoCharybdis : public Module } public: - ProtoCharybdis(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, PROTOCOL), + ProtoCharybdis(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, PROTOCOL | VENDOR), ircd_proto(this), message_away(this), message_capab(this), message_error(this), message_kick(this), message_kill(this), message_mode(this), message_motd(this), message_part(this), message_ping(this), message_privmsg(this), @@ -401,7 +401,6 @@ class ProtoCharybdis : public Module message_encap(this), message_euid(this), message_pass(this), message_server(this) { - this->SetAuthor("Anope"); Implementation i[] = { I_OnChannelCreate, I_OnMLock, I_OnUnMLock }; ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation)); diff --git a/modules/protocol/hybrid.cpp b/modules/protocol/hybrid.cpp index 3247787f1..4953a37cd 100644 --- a/modules/protocol/hybrid.cpp +++ b/modules/protocol/hybrid.cpp @@ -592,7 +592,7 @@ class ProtoHybrid : public Module } public: - ProtoHybrid(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, PROTOCOL), + ProtoHybrid(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, PROTOCOL | VENDOR), ircd_proto(this), message_away(this), message_capab(this), message_error(this), message_kick(this), message_kill(this), message_mode(this), message_motd(this), message_part(this), message_ping(this), message_privmsg(this), @@ -603,7 +603,6 @@ public: message_nick(this), message_pass(this), message_pong(this), message_server(this), message_sid(this), message_sjoin(this), message_svsmode(this), message_tburst(this), message_tmode(this), message_uid(this) { - this->SetAuthor("Anope"); this->AddModes(); ModuleManager::Attach(I_OnUserNickChange, this); diff --git a/modules/protocol/inspircd11.cpp b/modules/protocol/inspircd11.cpp index 845183642..82eb8e31c 100644 --- a/modules/protocol/inspircd11.cpp +++ b/modules/protocol/inspircd11.cpp @@ -859,7 +859,7 @@ class ProtoInspIRCd : public Module } public: - ProtoInspIRCd(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, PROTOCOL), + ProtoInspIRCd(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, PROTOCOL | VENDOR), ircd_proto(this), message_away(this), message_error(this), message_join(this), message_kick(this), message_kill(this), message_motd(this), message_part(this), message_ping(this), message_privmsg(this), message_quit(this), @@ -871,7 +871,6 @@ class ProtoInspIRCd : public Module message_fmode(this), message_ftopic(this), message_idle(this), message_mode(this), message_nick(this), message_opertype(this), message_rsquit(this), message_server(this) { - this->SetAuthor("Anope"); Servers::Capab.insert("NOQUIT"); diff --git a/modules/protocol/inspircd12.cpp b/modules/protocol/inspircd12.cpp index d006f3f01..094f514cc 100644 --- a/modules/protocol/inspircd12.cpp +++ b/modules/protocol/inspircd12.cpp @@ -1203,7 +1203,7 @@ class ProtoInspIRCd : public Module IRCDMessageUID message_uid; public: - ProtoInspIRCd(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, PROTOCOL), + ProtoInspIRCd(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, PROTOCOL | VENDOR), ircd_proto(this), message_away(this), message_error(this), message_join(this), message_kick(this), message_kill(this), message_motd(this), message_part(this), message_ping(this), message_privmsg(this), message_quit(this), @@ -1214,7 +1214,6 @@ class ProtoInspIRCd : public Module message_idle(this), message_metadata(this), message_mode(this), message_nick(this), message_opertype(this), message_rsquit(this), message_setident(this), message_server(this), message_time(this), message_uid(this) { - this->SetAuthor("Anope"); Implementation i[] = { I_OnUserNickChange }; ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation)); diff --git a/modules/protocol/inspircd20.cpp b/modules/protocol/inspircd20.cpp index 2fb067bc2..6d51c7932 100644 --- a/modules/protocol/inspircd20.cpp +++ b/modules/protocol/inspircd20.cpp @@ -661,7 +661,7 @@ class ProtoInspIRCd : public Module } public: - ProtoInspIRCd(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, PROTOCOL), + ProtoInspIRCd(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, PROTOCOL | VENDOR), ircd_proto(this), message_away(this), message_error(this), message_join(this), message_kick(this), message_kill(this), message_motd(this), message_part(this), message_ping(this), message_privmsg(this), message_quit(this), @@ -684,7 +684,6 @@ class ProtoInspIRCd : public Module message_capab(this), message_encap(this), message_fident(this) { - this->SetAuthor("Anope"); if (ModuleManager::LoadModule("inspircd12", User::Find(creator)) != MOD_ERR_OK) throw ModuleException("Unable to load inspircd12"); diff --git a/modules/protocol/ngircd.cpp b/modules/protocol/ngircd.cpp index 137251872..4f6d75642 100644 --- a/modules/protocol/ngircd.cpp +++ b/modules/protocol/ngircd.cpp @@ -641,7 +641,7 @@ class ProtongIRCd : public Module } public: - ProtongIRCd(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, PROTOCOL), + ProtongIRCd(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, PROTOCOL | VENDOR), ircd_proto(this), message_capab(this), message_error(this), message_kick(this), message_kill(this), message_motd(this), message_part(this), message_ping(this), message_privmsg(this), message_squery(this, "SQUERY"), @@ -651,7 +651,6 @@ class ProtongIRCd : public Module message_mode(this), message_nick(this), message_njoin(this), message_pong(this), message_server(this), message_topic(this) { - this->SetAuthor("Anope"); Servers::Capab.insert("QS"); diff --git a/modules/protocol/plexus.cpp b/modules/protocol/plexus.cpp index c22c43192..9af7351ff 100644 --- a/modules/protocol/plexus.cpp +++ b/modules/protocol/plexus.cpp @@ -353,7 +353,7 @@ class ProtoPlexus : public Module } public: - ProtoPlexus(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, PROTOCOL), + ProtoPlexus(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, PROTOCOL | VENDOR), ircd_proto(this), message_away(this), message_capab(this), message_error(this), message_kick(this), message_kill(this), message_mode(this), message_motd(this), message_part(this), message_ping(this), message_privmsg(this), message_quit(this), @@ -367,7 +367,6 @@ class ProtoPlexus : public Module message_encap(this), message_pass(this), message_server(this), message_uid(this) { - this->SetAuthor("Anope"); if (ModuleManager::LoadModule("hybrid", User::Find(creator)) != MOD_ERR_OK) throw ModuleException("Unable to load hybrid"); diff --git a/modules/protocol/ratbox.cpp b/modules/protocol/ratbox.cpp index 129752c06..1ac129065 100644 --- a/modules/protocol/ratbox.cpp +++ b/modules/protocol/ratbox.cpp @@ -228,7 +228,7 @@ class ProtoRatbox : public Module } public: - ProtoRatbox(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, PROTOCOL), + ProtoRatbox(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, PROTOCOL | VENDOR), ircd_proto(this), message_away(this), message_capab(this), message_error(this), message_kick(this), message_kill(this), message_mode(this), message_motd(this), message_part(this), message_ping(this), message_privmsg(this), @@ -242,7 +242,6 @@ class ProtoRatbox : public Module message_encap(this), message_pass(this), message_server(this), message_tburst(this), message_uid(this) { - this->SetAuthor("Anope"); if (ModuleManager::LoadModule("hybrid", User::Find(creator)) != MOD_ERR_OK) throw ModuleException("Unable to load hybrid"); diff --git a/modules/protocol/unreal.cpp b/modules/protocol/unreal.cpp index 25094a24d..d14927ee1 100644 --- a/modules/protocol/unreal.cpp +++ b/modules/protocol/unreal.cpp @@ -1196,7 +1196,7 @@ class ProtoUnreal : public Module } public: - ProtoUnreal(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, PROTOCOL), + ProtoUnreal(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, PROTOCOL | VENDOR), ircd_proto(this), message_away(this), message_error(this), message_join(this), message_kick(this), message_kill(this), message_motd(this), message_part(this), message_ping(this), message_privmsg(this), message_quit(this), @@ -1208,7 +1208,6 @@ class ProtoUnreal : public Module message_sasl(this), message_sdesc(this), message_sethost(this), message_setident(this), message_setname(this), message_server(this), message_sjoin(this), message_topic(this), message_umode2(this) { - this->SetAuthor("Anope"); this->AddModes(); diff --git a/modules/pseudoclients/botserv.cpp b/modules/pseudoclients/botserv.cpp index 2f157b809..29c1b1143 100644 --- a/modules/pseudoclients/botserv.cpp +++ b/modules/pseudoclients/botserv.cpp @@ -16,9 +16,8 @@ class BotServCore : public Module { public: - BotServCore(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE) + BotServCore(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, PSEUDOCLIENT | VENDOR) { - this->SetAuthor("Anope"); BotServ = BotInfo::Find(Config->BotServ); if (!BotServ) diff --git a/modules/pseudoclients/chanserv.cpp b/modules/pseudoclients/chanserv.cpp index 21a2f75f7..2c5cffcea 100644 --- a/modules/pseudoclients/chanserv.cpp +++ b/modules/pseudoclients/chanserv.cpp @@ -67,9 +67,8 @@ class ChanServCore : public Module ExpireCallback expires; public: - ChanServCore(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), expires(this) + ChanServCore(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, PSEUDOCLIENT | VENDOR), expires(this) { - this->SetAuthor("Anope"); ChanServ = BotInfo::Find(Config->ChanServ); if (!ChanServ) diff --git a/modules/pseudoclients/global.cpp b/modules/pseudoclients/global.cpp index 62a3d1609..02b199afa 100644 --- a/modules/pseudoclients/global.cpp +++ b/modules/pseudoclients/global.cpp @@ -48,10 +48,9 @@ class GlobalCore : public Module MyGlobalService myglobalservice; public: - GlobalCore(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), + GlobalCore(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, PSEUDOCLIENT | VENDOR), myglobalservice(this) { - this->SetAuthor("Anope"); Global = BotInfo::Find(Config->Global); if (!Global) diff --git a/modules/pseudoclients/hostserv.cpp b/modules/pseudoclients/hostserv.cpp index f11526e7a..d8cd74d69 100644 --- a/modules/pseudoclients/hostserv.cpp +++ b/modules/pseudoclients/hostserv.cpp @@ -16,9 +16,8 @@ class HostServCore : public Module { public: - HostServCore(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE) + HostServCore(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, PSEUDOCLIENT | VENDOR) { - this->SetAuthor("Anope"); if (!IRCD || !IRCD->CanSetVHost) throw ModuleException("Your IRCd does not support vhosts"); diff --git a/modules/pseudoclients/memoserv.cpp b/modules/pseudoclients/memoserv.cpp index d28774e34..5eca5cd4e 100644 --- a/modules/pseudoclients/memoserv.cpp +++ b/modules/pseudoclients/memoserv.cpp @@ -140,10 +140,9 @@ class MemoServCore : public Module { MyMemoServService mymemoserv; public: - MemoServCore(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), + MemoServCore(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, PSEUDOCLIENT | VENDOR), mymemoserv(this) { - this->SetAuthor("Anope"); MemoServ = BotInfo::Find(Config->MemoServ); if (!MemoServ) diff --git a/modules/pseudoclients/nickserv.cpp b/modules/pseudoclients/nickserv.cpp index 35319e552..cde1fbbf7 100644 --- a/modules/pseudoclients/nickserv.cpp +++ b/modules/pseudoclients/nickserv.cpp @@ -189,9 +189,8 @@ class NickServCore : public Module ExpireCallback expires; public: - NickServCore(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), mynickserv(this), expires(this) + NickServCore(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, PSEUDOCLIENT | VENDOR), mynickserv(this), expires(this) { - this->SetAuthor("Anope"); NickServ = BotInfo::Find(Config->NickServ); if (!NickServ) diff --git a/modules/pseudoclients/operserv.cpp b/modules/pseudoclients/operserv.cpp index b2463dc4f..ab67ceb47 100644 --- a/modules/pseudoclients/operserv.cpp +++ b/modules/pseudoclients/operserv.cpp @@ -158,10 +158,9 @@ class OperServCore : public Module SNLineManager snlines; public: - OperServCore(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), + OperServCore(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, PSEUDOCLIENT | VENDOR), sglines(this), sqlines(this), snlines(this) { - this->SetAuthor("Anope"); OperServ = BotInfo::Find(Config->OperServ); if (!OperServ) diff --git a/src/module.cpp b/src/module.cpp index a20e7520b..fd7ba63de 100644 --- a/src/module.cpp +++ b/src/module.cpp @@ -23,10 +23,19 @@ Module::Module(const Anope::string &modname, const Anope::string &, ModType modt this->created = Anope::CurTime; this->SetVersion(Anope::Version()); + if (type & VENDOR) + this->SetAuthor("Anope"); + else + { + /* Not vendor implies third */ + type |= THIRD; + this->SetAuthor("Unknown"); + } + if (ModuleManager::FindModule(this->name)) throw CoreException("Module already exists!"); - if (Anope::NoThird && modtype == THIRD) + if (Anope::NoThird && type & THIRD) throw ModuleException("Third party modules may not be loaded"); ModuleManager::Modules.push_back(this); diff --git a/src/modulemanager.cpp b/src/modulemanager.cpp index 229067979..a6fa1fffd 100644 --- a/src/modulemanager.cpp +++ b/src/modulemanager.cpp @@ -260,7 +260,7 @@ Module *ModuleManager::FindFirstOf(ModType type) { Module *m = *it; - if (m->type == type) + if (m->type & type) return m; } @@ -459,17 +459,20 @@ bool ModuleManager::SetPriority(Module *mod, Implementation i, Priority s, Modul void ModuleManager::UnloadAll() { - std::vector<Anope::string> modules[MT_END]; - for (std::list<Module *>::iterator it = Modules.begin(), it_end = Modules.end(); it != it_end; ++it) - if ((*it)->type != PROTOCOL && !(*it)->GetPermanent()) - modules[(*it)->type].push_back((*it)->name); - - for (size_t i = MT_BEGIN + 1; i != MT_END; ++i) - for (unsigned j = 0; j < modules[i].size(); ++j) + std::vector<Anope::string> modules; + for (size_t i = 1, j = 0; i != MT_END; i <<= 1, j |= i) + for (std::list<Module *>::iterator it = Modules.begin(), it_end = Modules.end(); it != it_end; ++it) { - Module *m = FindModule(modules[i][j]); - if (m != NULL) - UnloadModule(m, NULL); + Module *m = *it; + if ((m->type & j) == m->type) + modules.push_back(m->name); } + + for (unsigned i = 0; i < modules.size(); ++i) + { + Module *m = FindModule(modules[i]); + if (m != NULL) + UnloadModule(m, NULL); + } } |