mirror of
https://github.com/anope/anope.git
synced 2026-06-12 19:14:47 +02:00
Move some of the modules in extras/ that arent really extra out of extras. Mark our modules as VENDOR and allow modules to have multple types.
This commit is contained in:
+22
-1
@@ -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.
|
||||
|
||||
+97
-94
@@ -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")
|
||||
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)
|
||||
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}")
|
||||
# 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")
|
||||
# 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)
|
||||
# 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})
|
||||
# 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)
|
||||
# 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)
|
||||
|
||||
# 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)
|
||||
# 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)
|
||||
|
||||
|
||||
@@ -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));
|
||||
@@ -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");
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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");
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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");
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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");
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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");
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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");
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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 };
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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");
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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");
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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");
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -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 };
|
||||
|
||||
@@ -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");
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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");
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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");
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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");
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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");
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -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");
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -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");
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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");
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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");
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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");
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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");
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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");
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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");
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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");
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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");
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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");
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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");
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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");
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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!");
|
||||
|
||||
@@ -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");
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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");
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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!");
|
||||
|
||||
@@ -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");
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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");
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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");
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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!");
|
||||
|
||||
@@ -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!");
|
||||
|
||||
@@ -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!");
|
||||
|
||||
@@ -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");
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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!");
|
||||
|
||||
@@ -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");
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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");
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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");
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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");
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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");
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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");
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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");
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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");
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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.");
|
||||
|
||||
@@ -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.");
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -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");
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -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");
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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");
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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");
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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");
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -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");
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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");
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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");
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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");
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -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");
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
+85
-128
@@ -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] : "";
|
||||
|
||||
int count = 0;
|
||||
int showCore = 0;
|
||||
int showThird = 1;
|
||||
int showProto = 1;
|
||||
int showEnc = 1;
|
||||
int showSupported = 1;
|
||||
int showDB = 1;
|
||||
bool third = false, extra = false, vendor = false, database = false, encryption = false, pseudoclient = false, protocol = false;
|
||||
|
||||
char core[] = "Core";
|
||||
char third[] = "3rd";
|
||||
char proto[] = "Protocol";
|
||||
char enc[] = "Encryption";
|
||||
char supported[] = "Supported";
|
||||
char db[] = "Database";
|
||||
|
||||
if (!param.empty())
|
||||
{
|
||||
if (param.equals_ci(core))
|
||||
{
|
||||
showCore = 1;
|
||||
showThird = 0;
|
||||
showProto = 0;
|
||||
showEnc = 0;
|
||||
showSupported = 0;
|
||||
showDB = 0;
|
||||
}
|
||||
else if (param.equals_ci(third))
|
||||
{
|
||||
showCore = 0;
|
||||
showThird = 1;
|
||||
showSupported = 0;
|
||||
showProto = 0;
|
||||
showEnc = 0;
|
||||
showDB = 0;
|
||||
}
|
||||
else if (param.equals_ci(proto))
|
||||
{
|
||||
showCore = 0;
|
||||
showThird = 0;
|
||||
showProto = 1;
|
||||
showEnc = 0;
|
||||
showSupported = 0;
|
||||
showDB = 0;
|
||||
}
|
||||
else if (param.equals_ci(supported))
|
||||
{
|
||||
showCore = 0;
|
||||
showThird = 0;
|
||||
showProto = 0;
|
||||
showSupported = 1;
|
||||
showEnc = 0;
|
||||
showDB = 0;
|
||||
}
|
||||
else if (param.equals_ci(enc))
|
||||
{
|
||||
showCore = 0;
|
||||
showThird = 0;
|
||||
showProto = 0;
|
||||
showSupported = 0;
|
||||
showEnc = 1;
|
||||
showDB = 0;
|
||||
}
|
||||
else if (param.equals_ci(db))
|
||||
{
|
||||
showCore = 0;
|
||||
showThird = 0;
|
||||
showProto = 0;
|
||||
showSupported = 0;
|
||||
showEnc = 0;
|
||||
showDB = 1;
|
||||
}
|
||||
}
|
||||
|
||||
Module *protocol = ModuleManager::FindFirstOf(PROTOCOL);
|
||||
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;
|
||||
for (std::list<Module *>::iterator it = ModuleManager::Modules.begin(), it_end = ModuleManager::Modules.end(); it != it_end; ++it)
|
||||
{
|
||||
Module *m = *it;
|
||||
|
||||
switch (m->type)
|
||||
bool show = false;
|
||||
Anope::string mtype;
|
||||
|
||||
if (m->type & PROTOCOL)
|
||||
{
|
||||
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;
|
||||
show |= protocol;
|
||||
if (!mtype.empty())
|
||||
mtype += ", ";
|
||||
mtype += "Protocol";
|
||||
}
|
||||
if (m->type & PSEUDOCLIENT)
|
||||
{
|
||||
show |= pseudoclient;
|
||||
if (!mtype.empty())
|
||||
mtype += ", ";
|
||||
mtype += "Pseudoclient";
|
||||
}
|
||||
if (m->type & ENCRYPTION)
|
||||
{
|
||||
show |= encryption;
|
||||
if (!mtype.empty())
|
||||
mtype += ", ";
|
||||
mtype += "Encryption";
|
||||
}
|
||||
if (m->type & DATABASE)
|
||||
{
|
||||
show |= database;
|
||||
if (!mtype.empty())
|
||||
mtype += ", ";
|
||||
mtype += "Database";
|
||||
}
|
||||
if (m->type & VENDOR)
|
||||
{
|
||||
show |= vendor;
|
||||
if (!mtype.empty())
|
||||
mtype += ", ";
|
||||
mtype += "Vendor";
|
||||
}
|
||||
if (m->type & EXTRA)
|
||||
{
|
||||
show |= extra;
|
||||
if (!mtype.empty())
|
||||
mtype += ", ";
|
||||
mtype += "Extra";
|
||||
}
|
||||
if (m->type & THIRD)
|
||||
{
|
||||
show |= third;
|
||||
if (!mtype.empty())
|
||||
mtype += ", ";
|
||||
mtype += "Third";
|
||||
}
|
||||
|
||||
if (!show)
|
||||
continue;
|
||||
else if (m->type & PROTOCOL && param.empty() && m != protomod)
|
||||
continue;
|
||||
|
||||
++count;
|
||||
|
||||
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");
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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);
|
||||
|
||||
}
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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.");
|
||||
|
||||
@@ -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()
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user