From 44637154da89028a99920bd6ead5d917d8a894a4 Mon Sep 17 00:00:00 2001 From: Adam Date: Tue, 1 Apr 2014 22:24:50 -0400 Subject: Require cmake 2.8 and C++11 support --- modules/CMakeLists.txt | 194 ++++++++++++----------------- modules/bs_autoassign.cpp | 2 +- modules/commands/bs_assign.cpp | 16 +-- modules/commands/bs_badwords.cpp | 22 ++-- modules/commands/bs_bot.cpp | 4 +- modules/commands/bs_botlist.cpp | 4 +- modules/commands/bs_control.cpp | 8 +- modules/commands/bs_info.cpp | 6 +- modules/commands/bs_kick.cpp | 68 +++++----- modules/commands/bs_set.cpp | 16 +-- modules/commands/cs_access.cpp | 28 ++--- modules/commands/cs_akick.cpp | 10 +- modules/commands/cs_ban.cpp | 6 +- modules/commands/cs_clone.cpp | 4 +- modules/commands/cs_drop.cpp | 4 +- modules/commands/cs_enforce.cpp | 4 +- modules/commands/cs_entrymsg.cpp | 10 +- modules/commands/cs_flags.cpp | 12 +- modules/commands/cs_getkey.cpp | 4 +- modules/commands/cs_info.cpp | 4 +- modules/commands/cs_invite.cpp | 4 +- modules/commands/cs_kick.cpp | 4 +- modules/commands/cs_list.cpp | 10 +- modules/commands/cs_log.cpp | 14 +-- modules/commands/cs_mode.cpp | 40 +++--- modules/commands/cs_register.cpp | 4 +- modules/commands/cs_seen.cpp | 26 ++-- modules/commands/cs_set.cpp | 92 +++++++------- modules/commands/cs_set_misc.cpp | 14 +-- modules/commands/cs_status.cpp | 4 +- modules/commands/cs_suspend.cpp | 18 +-- modules/commands/cs_sync.cpp | 4 +- modules/commands/cs_topic.cpp | 14 +-- modules/commands/cs_unban.cpp | 4 +- modules/commands/cs_updown.cpp | 8 +- modules/commands/cs_xop.cpp | 16 +-- modules/commands/gl_global.cpp | 4 +- modules/commands/greet.cpp | 18 +-- modules/commands/help.cpp | 2 +- modules/commands/hs_del.cpp | 8 +- modules/commands/hs_group.cpp | 10 +- modules/commands/hs_list.cpp | 4 +- modules/commands/hs_off.cpp | 4 +- modules/commands/hs_on.cpp | 4 +- modules/commands/hs_request.cpp | 18 +-- modules/commands/hs_set.cpp | 8 +- modules/commands/ms_cancel.cpp | 4 +- modules/commands/ms_check.cpp | 4 +- modules/commands/ms_del.cpp | 6 +- modules/commands/ms_ignore.cpp | 4 +- modules/commands/ms_info.cpp | 4 +- modules/commands/ms_list.cpp | 6 +- modules/commands/ms_read.cpp | 6 +- modules/commands/ms_rsend.cpp | 4 +- modules/commands/ms_send.cpp | 4 +- modules/commands/ms_sendall.cpp | 4 +- modules/commands/ms_set.cpp | 4 +- modules/commands/ms_staff.cpp | 4 +- modules/commands/ns_access.cpp | 6 +- modules/commands/ns_ajoin.cpp | 8 +- modules/commands/ns_alist.cpp | 4 +- modules/commands/ns_cert.cpp | 28 ++--- modules/commands/ns_drop.cpp | 4 +- modules/commands/ns_getemail.cpp | 4 +- modules/commands/ns_getpass.cpp | 4 +- modules/commands/ns_group.cpp | 16 +-- modules/commands/ns_identify.cpp | 8 +- modules/commands/ns_info.cpp | 12 +- modules/commands/ns_list.cpp | 14 +-- modules/commands/ns_logout.cpp | 4 +- modules/commands/ns_recover.cpp | 12 +- modules/commands/ns_register.cpp | 20 +-- modules/commands/ns_resetpass.cpp | 6 +- modules/commands/ns_set.cpp | 104 ++++++++-------- modules/commands/ns_set_misc.cpp | 14 +-- modules/commands/ns_status.cpp | 4 +- modules/commands/ns_suspend.cpp | 16 +-- modules/commands/ns_update.cpp | 4 +- modules/commands/os_akill.cpp | 8 +- modules/commands/os_chankill.cpp | 4 +- modules/commands/os_config.cpp | 4 +- modules/commands/os_defcon.cpp | 20 +-- modules/commands/os_dns.cpp | 20 +-- modules/commands/os_forbid.cpp | 24 ++-- modules/commands/os_ignore.cpp | 20 +-- modules/commands/os_info.cpp | 10 +- modules/commands/os_jupe.cpp | 4 +- modules/commands/os_kick.cpp | 4 +- modules/commands/os_kill.cpp | 4 +- modules/commands/os_list.cpp | 8 +- modules/commands/os_login.cpp | 14 +-- modules/commands/os_logsearch.cpp | 4 +- modules/commands/os_mode.cpp | 8 +- modules/commands/os_modinfo.cpp | 8 +- modules/commands/os_module.cpp | 12 +- modules/commands/os_news.cpp | 22 ++-- modules/commands/os_noop.cpp | 6 +- modules/commands/os_oline.cpp | 4 +- modules/commands/os_oper.cpp | 6 +- modules/commands/os_reload.cpp | 4 +- modules/commands/os_session.cpp | 36 +++--- modules/commands/os_set.cpp | 4 +- modules/commands/os_shutdown.cpp | 12 +- modules/commands/os_stats.cpp | 6 +- modules/commands/os_svs.cpp | 12 +- modules/commands/os_sxline.cpp | 16 +-- modules/commands/os_update.cpp | 4 +- modules/cs_statusupdate.cpp | 4 +- modules/database/db_flatfile.cpp | 20 +-- modules/database/db_old.cpp | 4 +- modules/database/db_redis.cpp | 34 ++--- modules/database/db_sql.cpp | 26 ++-- modules/database/db_sql_live.cpp | 18 +-- modules/encryption/enc_bcrypt.cpp | 6 +- modules/encryption/enc_md5.cpp | 14 +-- modules/encryption/enc_none.cpp | 6 +- modules/encryption/enc_old.cpp | 8 +- modules/encryption/enc_sha1.cpp | 14 +-- modules/encryption/enc_sha256.cpp | 14 +-- modules/extra/m_ldap.cpp | 18 +-- modules/extra/m_ldap_authentication.cpp | 22 ++-- modules/extra/m_ldap_oper.cpp | 10 +- modules/extra/m_mysql.cpp | 18 +-- modules/extra/m_regex_pcre.cpp | 2 +- modules/extra/m_regex_posix.cpp | 2 +- modules/extra/m_regex_tre.cpp | 2 +- modules/extra/m_sasl_dh-aes.cpp | 4 +- modules/extra/m_sasl_dh-blowfish.cpp | 4 +- modules/extra/m_sql_authentication.cpp | 10 +- modules/extra/m_sql_log.cpp | 4 +- modules/extra/m_sql_oper.cpp | 8 +- modules/extra/m_sqlite.cpp | 6 +- modules/extra/m_ssl_gnutls.cpp | 20 +-- modules/extra/m_ssl_openssl.cpp | 20 +-- modules/extra/stats/cs_fantasy_stats.cpp | 6 +- modules/extra/stats/cs_fantasy_top.cpp | 6 +- modules/extra/stats/irc2sql/irc2sql.h | 46 +++---- modules/extra/stats/m_chanstats.cpp | 38 +++--- modules/fantasy.cpp | 6 +- modules/m_dns.cpp | 38 +++--- modules/m_dnsbl.cpp | 6 +- modules/m_helpchan.cpp | 2 +- modules/m_httpd.cpp | 22 ++-- modules/m_proxyscan.cpp | 26 ++-- modules/m_redis.cpp | 26 ++-- modules/m_rewrite.cpp | 8 +- modules/m_sasl.cpp | 26 ++-- modules/m_xmlrpc.cpp | 6 +- modules/m_xmlrpc_main.cpp | 8 +- modules/ns_maxemail.cpp | 2 +- modules/protocol/bahamut.cpp | 68 +++++----- modules/protocol/charybdis.cpp | 72 +++++------ modules/protocol/hybrid.cpp | 86 ++++++------- modules/protocol/inspircd12.cpp | 116 ++++++++--------- modules/protocol/inspircd20.cpp | 100 +++++++-------- modules/protocol/ngircd.cpp | 64 +++++----- modules/protocol/plexus.cpp | 62 ++++----- modules/protocol/ratbox.cpp | 52 ++++---- modules/protocol/unreal.cpp | 126 +++++++++---------- modules/pseudoclients/botserv.cpp | 22 ++-- modules/pseudoclients/chanserv.cpp | 44 +++---- modules/pseudoclients/global.cpp | 12 +- modules/pseudoclients/hostserv.cpp | 12 +- modules/pseudoclients/memoserv.cpp | 22 ++-- modules/pseudoclients/nickserv.cpp | 48 +++---- modules/pseudoclients/operserv.cpp | 50 ++++---- modules/third/language/CMakeLists.txt | 2 +- modules/webcpanel/pages/chanserv/access.h | 4 +- modules/webcpanel/pages/chanserv/akick.h | 4 +- modules/webcpanel/pages/chanserv/drop.h | 2 +- modules/webcpanel/pages/chanserv/info.h | 2 +- modules/webcpanel/pages/chanserv/modes.h | 4 +- modules/webcpanel/pages/chanserv/set.h | 4 +- modules/webcpanel/pages/confirm.h | 2 +- modules/webcpanel/pages/hostserv/request.h | 2 +- modules/webcpanel/pages/index.cpp | 4 +- modules/webcpanel/pages/index.h | 2 +- modules/webcpanel/pages/logout.h | 2 +- modules/webcpanel/pages/memoserv/memos.h | 2 +- modules/webcpanel/pages/nickserv/access.h | 2 +- modules/webcpanel/pages/nickserv/alist.h | 2 +- modules/webcpanel/pages/nickserv/cert.h | 2 +- modules/webcpanel/pages/nickserv/info.h | 2 +- modules/webcpanel/pages/operserv/akill.h | 2 +- modules/webcpanel/pages/register.h | 2 +- modules/webcpanel/static_fileserver.h | 2 +- modules/webcpanel/webcpanel.cpp | 2 +- modules/webcpanel/webcpanel.h | 2 +- 188 files changed, 1501 insertions(+), 1535 deletions(-) (limited to 'modules') diff --git a/modules/CMakeLists.txt b/modules/CMakeLists.txt index e9afbf45b..1ae397cc3 100644 --- a/modules/CMakeLists.txt +++ b/modules/CMakeLists.txt @@ -19,14 +19,6 @@ macro(build_modules SRC) file(RELATIVE_PATH FNAME ${SRC} ${MODULE_SRC}) # Convert the real source file extension to have a .so extension string(REGEX REPLACE "\\.cpp$" ".so" SO ${FNAME}) - # Temporary variable for the current source's include directories - set(TEMP_INCLUDES) - # Calculate the header file dependencies for the given source file - calculate_depends(${MODULE_SRC} 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) @@ -34,44 +26,37 @@ macro(build_modules SRC) set(TEMP_DEPENDENCIES) # Calculate the library dependencies for the given source file calculate_libraries(${MODULE_SRC} TEMP_LDFLAGS TEMP_DEPENDENCIES) - # Reset has_function - set(HAS_FUNCTION) - # Check the function dependencies for the given source file - check_functions(${MODULE_SRC} HAS_FUNCTION) - # Only continue if this module has all of the required functions - if(HAS_FUNCTION) - # 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 its linker flags, also set it to depend on the main Anope executable to be built beforehand - add_library(${SO} MODULE ${MODULE_SRC}) - # Windows requires this because it's weird - if(WIN32) - set(WIN32_NO_LIBS "/nodefaultlib:\"libcmt.lib\"") - else(WIN32) - set(WIN32_NO_LIBS) - endif(WIN32) - set_target_properties(${SO} PROPERTIES LINKER_LANGUAGE CXX PREFIX "" SUFFIX "" LINK_FLAGS "${TEMP_LDFLAGS} ${WIN32_NO_LIBS}" INSTALL_RPATH_USE_LINK_PATH ON BUILD_WITH_INSTALL_RPATH ON) - add_dependencies(${SO} ${PROGRAM_NAME}) - if(GETTEXT_FOUND) - add_dependencies(${SO} module_language) - endif(GETTEXT_FOUND) - target_link_libraries(${SO} ${TEMP_DEPENDENCIES}) - # For Windows only, have the module link to the export library of Anope as well as wsock32 and Ws2_32 libraries (most of the modules probably don't need this, but this is to be on the safe side), also set its version - if(WIN32) - target_link_libraries(${SO} ${PROGRAM_NAME} wsock32 Ws2_32 ${WIN32_MEMORY}) - set_target_properties(${PROGRAM_NAME} PROPERTIES VERSION "${VERSION_DOTTED}") - else(WIN32) - if(APPLE) - target_link_libraries(${SO} ${PROGRAM_NAME}) - endif(APPLE) - endif(WIN32) - # Set the module to be installed to the module directory under the data directory - install(TARGETS ${SO} DESTINATION ${LIB_DIR}/modules) - endif(HAS_FUNCTION) + # 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 its linker flags, also set it to depend on the main Anope executable to be built beforehand + add_library(${SO} MODULE ${MODULE_SRC}) + # Windows requires this because it's weird + if(WIN32) + set(WIN32_NO_LIBS "/nodefaultlib:\"libcmt.lib\"") + else(WIN32) + set(WIN32_NO_LIBS) + endif(WIN32) + set_target_properties(${SO} PROPERTIES LINKER_LANGUAGE CXX PREFIX "" SUFFIX "" LINK_FLAGS "${TEMP_LDFLAGS} ${WIN32_NO_LIBS}" INSTALL_RPATH_USE_LINK_PATH ON BUILD_WITH_INSTALL_RPATH ON) + add_dependencies(${SO} ${PROGRAM_NAME}) + if(GETTEXT_FOUND) + add_dependencies(${SO} module_language) + endif(GETTEXT_FOUND) + target_link_libraries(${SO} ${TEMP_DEPENDENCIES}) + # For Windows only, have the module link to the export library of Anope as well as wsock32 and Ws2_32 libraries (most of the modules probably don't need this, but this is to be on the safe side), also set its version + if(WIN32) + target_link_libraries(${SO} ${PROGRAM_NAME} wsock32 Ws2_32 ${WIN32_MEMORY}) + set_target_properties(${PROGRAM_NAME} PROPERTIES VERSION "${VERSION_DOTTED}") + else(WIN32) + if(APPLE) + target_link_libraries(${SO} ${PROGRAM_NAME}) + endif(APPLE) + endif(WIN32) + # Set the module to be installed to the module directory under the data directory + install(TARGETS ${SO} DESTINATION ${LIB_DIR}/modules) endif(CPP) endif(IS_DIRECTORY "${MODULE_SRC}") endforeach(MODULE_SRC ${MODULES_SRCS}) @@ -80,7 +65,7 @@ endmacro(build_modules) macro(build_subdir) file(GLOB_RECURSE MODULES_SUBDIR_SRCS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.cpp") - sort_list(MODULES_SUBDIR_SRCS) + list(SORT MODULES_SUBDIR_SRCS) GET_FILENAME_COMPONENT(FOLDER_NAME ${CMAKE_CURRENT_SOURCE_DIR} NAME) set(SO "${FOLDER_NAME}.so") @@ -88,77 +73,58 @@ macro(build_subdir) # 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(HAS_FUNCTION TRUE) - # Iterate through the source files in the subdirectory foreach(SRC ${MODULES_SUBDIR_SRCS}) - if(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} TEMP_INCLUDES) - # If there were some extra include directories, add them to the list - if(TEMP_INCLUDES) - include_directories(${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(HAS_FUNCTION) + # 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) + + # 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) endforeach(SRC ${MODULES_SUBDIR_SRCS}) - # Continue if library and function requirements are met - if(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}) - if(GETTEXT_FOUND) - add_dependencies(${SO} module_language) - endif(GETTEXT_FOUND) - target_link_libraries(${SO} ${SUBDIR_EXTRA_DEPENDS}) - # For Windows only, have the module link to the export library of Anope as well as wsock32 and Ws2_32 libraries (most of the modules probably don't need this, but this is to be on the safe side), also set it's version - if(WIN32) - target_link_libraries(${SO} ${PROGRAM_NAME} wsock32 Ws2_32 ${WIN32_MEMORY}) - set_target_properties(${PROGRAM_NAME} PROPERTIES VERSION "${VERSION_DOTTED}") - else(WIN32) - if(APPLE) - target_link_libraries(${SO} ${PROGRAM_NAME}) - endif(APPLE) - endif(WIN32) - - # Set the module to be installed to the module directory under the data directory - install(TARGETS ${SO} DESTINATION ${LIB_DIR}/modules) - - endif(HAS_FUNCTION) + # Remove duplicates from the linker flags + if(SUBDIR_LDFLAGS) + list(REMOVE_DUPLICATES SUBDIR_LDFLAGS) + endif(SUBDIR_LDFLAGS) + + # Remove duplicates from the extra dependencies + if(SUBDIR_EXTRA_DEPENDS) + list(REMOVE_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}) + if(GETTEXT_FOUND) + add_dependencies(${SO} module_language) + endif(GETTEXT_FOUND) + target_link_libraries(${SO} ${SUBDIR_EXTRA_DEPENDS}) + # For Windows only, have the module link to the export library of Anope as well as wsock32 and Ws2_32 libraries (most of the modules probably don't need this, but this is to be on the safe side), also set it's version + if(WIN32) + target_link_libraries(${SO} ${PROGRAM_NAME} wsock32 Ws2_32 ${WIN32_MEMORY}) + set_target_properties(${PROGRAM_NAME} PROPERTIES VERSION "${VERSION_DOTTED}") + else(WIN32) + if(APPLE) + target_link_libraries(${SO} ${PROGRAM_NAME}) + endif(APPLE) + endif(WIN32) + + # Set the module to be installed to the module directory under the data directory + install(TARGETS ${SO} DESTINATION ${LIB_DIR}/modules) endmacro(build_subdir) include_directories(${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/modules/bs_autoassign.cpp b/modules/bs_autoassign.cpp index 4c41ad357..f13843648 100644 --- a/modules/bs_autoassign.cpp +++ b/modules/bs_autoassign.cpp @@ -16,7 +16,7 @@ class BSAutoAssign : public Module { } - void OnChanRegistered(ChannelInfo *ci) anope_override + void OnChanRegistered(ChannelInfo *ci) override { const Anope::string &bot = Config->GetModule(this)->Get("bot"); if (bot.empty()) diff --git a/modules/commands/bs_assign.cpp b/modules/commands/bs_assign.cpp index 82572d0eb..3bd00a372 100644 --- a/modules/commands/bs_assign.cpp +++ b/modules/commands/bs_assign.cpp @@ -20,7 +20,7 @@ class CommandBSAssign : public Command this->SetSyntax(_("\037channel\037 \037nick\037")); } - void Execute(CommandSource &source, const std::vector ¶ms) anope_override + void Execute(CommandSource &source, const std::vector ¶ms) override { const Anope::string &chan = params[0]; const Anope::string &nick = params[1]; @@ -71,7 +71,7 @@ class CommandBSAssign : public Command source.Reply(_("Bot \002%s\002 has been assigned to %s."), bi->nick.c_str(), ci->name.c_str()); } - bool OnHelp(CommandSource &source, const Anope::string &subcommand) anope_override + bool OnHelp(CommandSource &source, const Anope::string &subcommand) override { this->SendSyntax(source); source.Reply(" "); @@ -91,7 +91,7 @@ class CommandBSUnassign : public Command this->SetSyntax(_("\037channel\037")); } - void Execute(CommandSource &source, const std::vector ¶ms) anope_override + void Execute(CommandSource &source, const std::vector ¶ms) override { if (Anope::ReadOnly) { @@ -132,7 +132,7 @@ class CommandBSUnassign : public Command source.Reply(_("There is no bot assigned to %s anymore."), ci->name.c_str()); } - bool OnHelp(CommandSource &source, const Anope::string &subcommand) anope_override + bool OnHelp(CommandSource &source, const Anope::string &subcommand) override { this->SendSyntax(source); source.Reply(" "); @@ -154,7 +154,7 @@ class CommandBSSetNoBot : public Command this->SetSyntax(_("\037channel\037 {\037ON|OFF\037}")); } - void Execute(CommandSource &source, const std::vector ¶ms) anope_override + void Execute(CommandSource &source, const std::vector ¶ms) override { ChannelInfo *ci = ChannelInfo::Find(params[0]); const Anope::string &value = params[1]; @@ -191,7 +191,7 @@ class CommandBSSetNoBot : public Command this->OnSyntaxError(source, source.command); } - bool OnHelp(CommandSource &source, const Anope::string &) anope_override + bool OnHelp(CommandSource &source, const Anope::string &) override { this->SendSyntax(source); source.Reply(_(" \n" @@ -217,7 +217,7 @@ class BSAssign : public Module { } - void OnInvite(User *source, Channel *c, User *targ) anope_override + void OnInvite(User *source, Channel *c, User *targ) override { BotInfo *bi; if (Anope::ReadOnly || !c->ci || targ->server != Me || !(bi = dynamic_cast(targ))) @@ -246,7 +246,7 @@ class BSAssign : public Module targ->SendMessage(bi, _("Bot \002%s\002 has been assigned to %s."), bi->nick.c_str(), c->name.c_str()); } - void OnBotInfo(CommandSource &source, BotInfo *bi, ChannelInfo *ci, InfoFormatter &info) anope_override + void OnBotInfo(CommandSource &source, BotInfo *bi, ChannelInfo *ci, InfoFormatter &info) override { if (nobot.HasExt(ci)) info.AddOption(_("No bot")); diff --git a/modules/commands/bs_badwords.cpp b/modules/commands/bs_badwords.cpp index c4155bbc1..551e89987 100644 --- a/modules/commands/bs_badwords.cpp +++ b/modules/commands/bs_badwords.cpp @@ -17,7 +17,7 @@ struct BadWordImpl : BadWord, Serializable BadWordImpl() : Serializable("BadWord") { } ~BadWordImpl(); - void Serialize(Serialize::Data &data) const anope_override + void Serialize(Serialize::Data &data) const override { data["ci"] << this->chan; data["word"] << this->word; @@ -37,7 +37,7 @@ struct BadWordsImpl : BadWords ~BadWordsImpl(); - BadWord* AddBadWord(const Anope::string &word, BadWordType type) anope_override + BadWord* AddBadWord(const Anope::string &word, BadWordType type) override { BadWordImpl *bw = new BadWordImpl(); bw->chan = ci->name; @@ -51,7 +51,7 @@ struct BadWordsImpl : BadWords return bw; } - BadWord* GetBadWord(unsigned index) const anope_override + BadWord* GetBadWord(unsigned index) const override { if (this->badwords->empty() || index >= this->badwords->size()) return NULL; @@ -61,12 +61,12 @@ struct BadWordsImpl : BadWords return bw; } - unsigned GetBadWordCount() const anope_override + unsigned GetBadWordCount() const override { return this->badwords->size(); } - void EraseBadWord(unsigned index) anope_override + void EraseBadWord(unsigned index) override { if (this->badwords->empty() || index >= this->badwords->size()) return; @@ -76,13 +76,13 @@ struct BadWordsImpl : BadWords delete this->badwords->at(index); } - void ClearBadWords() anope_override + void ClearBadWords() override { while (!this->badwords->empty()) delete this->badwords->back(); } - void Check() anope_override + void Check() override { if (this->badwords->empty()) ci->Shrink("badwords"); @@ -169,7 +169,7 @@ class BadwordsDelCallback : public NumberList source.Reply(_("Deleted %d entries from %s bad words list."), deleted, ci->name.c_str()); } - void HandleNumber(unsigned Number) anope_override + void HandleNumber(unsigned Number) override { if (!bw || !Number || Number > bw->GetBadWordCount()) return; @@ -208,7 +208,7 @@ class CommandBSBadwords : public Command { } - void HandleNumber(unsigned Number) anope_override + void HandleNumber(unsigned Number) override { if (!Number || Number > bw->GetBadWordCount()) return; @@ -373,7 +373,7 @@ class CommandBSBadwords : public Command this->SetSyntax(_("\037channel\037 CLEAR")); } - void Execute(CommandSource &source, const std::vector ¶ms) anope_override + void Execute(CommandSource &source, const std::vector ¶ms) override { const Anope::string &cmd = params[1]; const Anope::string &word = params.size() > 2 ? params[2] : ""; @@ -416,7 +416,7 @@ class CommandBSBadwords : public Command this->OnSyntaxError(source, ""); } - bool OnHelp(CommandSource &source, const Anope::string &subcommand) anope_override + bool OnHelp(CommandSource &source, const Anope::string &subcommand) override { this->SendSyntax(source); source.Reply(" "); diff --git a/modules/commands/bs_bot.cpp b/modules/commands/bs_bot.cpp index e25ba8ff0..46550603d 100644 --- a/modules/commands/bs_bot.cpp +++ b/modules/commands/bs_bot.cpp @@ -264,7 +264,7 @@ class CommandBSBot : public Command this->SetSyntax(_("\002DEL \037nick\037\002")); } - void Execute(CommandSource &source, const std::vector ¶ms) anope_override + void Execute(CommandSource &source, const std::vector ¶ms) override { const Anope::string &cmd = params[0]; @@ -337,7 +337,7 @@ class CommandBSBot : public Command return; } - bool OnHelp(CommandSource &source, const Anope::string &subcommand) anope_override + bool OnHelp(CommandSource &source, const Anope::string &subcommand) override { this->SendSyntax(source); source.Reply(" "); diff --git a/modules/commands/bs_botlist.cpp b/modules/commands/bs_botlist.cpp index 33141d255..2bab21881 100644 --- a/modules/commands/bs_botlist.cpp +++ b/modules/commands/bs_botlist.cpp @@ -19,7 +19,7 @@ class CommandBSBotList : public Command this->SetDesc(_("Lists available bots")); } - void Execute(CommandSource &source, const std::vector ¶ms) anope_override + void Execute(CommandSource &source, const std::vector ¶ms) override { unsigned count = 0; ListFormatter list(source.GetAccount()); @@ -57,7 +57,7 @@ class CommandBSBotList : public Command } } - bool OnHelp(CommandSource &source, const Anope::string &subcommand) anope_override + bool OnHelp(CommandSource &source, const Anope::string &subcommand) override { this->SendSyntax(source); source.Reply(" "); diff --git a/modules/commands/bs_control.cpp b/modules/commands/bs_control.cpp index 0307c6abf..0843c6150 100644 --- a/modules/commands/bs_control.cpp +++ b/modules/commands/bs_control.cpp @@ -20,7 +20,7 @@ class CommandBSSay : public Command this->SetSyntax(_("\037channel\037 \037text\037")); } - void Execute(CommandSource &source, const std::vector ¶ms) anope_override + void Execute(CommandSource &source, const std::vector ¶ms) override { const Anope::string &text = params[1]; @@ -62,7 +62,7 @@ class CommandBSSay : public Command Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "to say: " << text; } - bool OnHelp(CommandSource &source, const Anope::string &subcommand) anope_override + bool OnHelp(CommandSource &source, const Anope::string &subcommand) override { this->SendSyntax(source); source.Reply(" "); @@ -80,7 +80,7 @@ class CommandBSAct : public Command this->SetSyntax(_("\037channel\037 \037text\037")); } - void Execute(CommandSource &source, const std::vector ¶ms) anope_override + void Execute(CommandSource &source, const std::vector ¶ms) override { Anope::string message = params[1]; @@ -120,7 +120,7 @@ class CommandBSAct : public Command Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "to say: " << message; } - bool OnHelp(CommandSource &source, const Anope::string &subcommand) anope_override + bool OnHelp(CommandSource &source, const Anope::string &subcommand) override { this->SendSyntax(source); source.Reply(" "); diff --git a/modules/commands/bs_info.cpp b/modules/commands/bs_info.cpp index 55ccc0b13..b04a62c8f 100644 --- a/modules/commands/bs_info.cpp +++ b/modules/commands/bs_info.cpp @@ -42,7 +42,7 @@ class CommandBSInfo : public Command this->SetSyntax(_("{\037channel\037 | \037nickname\037}")); } - void Execute(CommandSource &source, const std::vector ¶ms) anope_override + void Execute(CommandSource &source, const std::vector ¶ms) override { const Anope::string &query = params[0]; @@ -102,7 +102,7 @@ class CommandBSInfo : public Command source.Reply(_("\002%s\002 is not a valid bot or registered channel."), query.c_str()); } - bool OnHelp(CommandSource &source, const Anope::string &subcommand) anope_override + bool OnHelp(CommandSource &source, const Anope::string &subcommand) override { this->SendSyntax(source); source.Reply(" "); @@ -114,7 +114,7 @@ class CommandBSInfo : public Command return true; } - const Anope::string GetDesc(CommandSource &source) const anope_override + const Anope::string GetDesc(CommandSource &source) const override { return Anope::printf(Language::Translate(source.GetAccount(), _("Allows you to see %s information about a channel or a bot")), source.service->nick.c_str()); } diff --git a/modules/commands/bs_kick.cpp b/modules/commands/bs_kick.cpp index c08376e3c..242043105 100644 --- a/modules/commands/bs_kick.cpp +++ b/modules/commands/bs_kick.cpp @@ -31,7 +31,7 @@ struct KickerDataImpl : KickerData dontkickops = dontkickvoices = false; } - void Check(ChannelInfo *ci) anope_override + void Check(ChannelInfo *ci) override { if (amsgs || badwords || bolds || caps || colors || flood || italics || repeat || reverses || underlines) return; @@ -43,7 +43,7 @@ struct KickerDataImpl : KickerData { ExtensibleItem(Module *m, const Anope::string &ename) : ::ExtensibleItem(m, ename) { } - void ExtensibleSerialize(const Extensible *e, const Serializable *s, Serialize::Data &data) const anope_override + void ExtensibleSerialize(const Extensible *e, const Serializable *s, Serialize::Data &data) const override { if (s->GetSerializableType()->GetName() != "ChannelInfo") return; @@ -73,7 +73,7 @@ struct KickerDataImpl : KickerData data["ttb"] << kd->ttb[i] << " "; } - void ExtensibleUnserialize(Extensible *e, Serializable *s, Serialize::Data &data) anope_override + void ExtensibleUnserialize(Extensible *e, Serializable *s, Serialize::Data &data) override { if (s->GetSerializableType()->GetName() != "ChannelInfo") return; @@ -122,12 +122,12 @@ class CommandBSKick : public Command this->SetSyntax(_("\037option\037 \037channel\037 {\037ON|OFF\037} [\037settings\037]")); } - void Execute(CommandSource &source, const std::vector ¶ms) anope_override + void Execute(CommandSource &source, const std::vector ¶ms) override { this->OnSyntaxError(source, ""); } - bool OnHelp(CommandSource &source, const Anope::string &subcommand) anope_override + bool OnHelp(CommandSource &source, const Anope::string &subcommand) override { this->SendSyntax(source); source.Reply(" "); @@ -167,9 +167,9 @@ class CommandBSKickBase : public Command { } - virtual void Execute(CommandSource &source, const std::vector ¶ms) anope_override = 0; + virtual void Execute(CommandSource &source, const std::vector ¶ms) override = 0; - virtual bool OnHelp(CommandSource &source, const Anope::string &subcommand) anope_override = 0; + virtual bool OnHelp(CommandSource &source, const Anope::string &subcommand) override = 0; protected: bool CheckArguments(CommandSource &source, const std::vector ¶ms, ChannelInfo* &ci) @@ -254,7 +254,7 @@ class CommandBSKickAMSG : public CommandBSKickBase this->SetSyntax(_("\037channel\037 {\037ON|OFF\037} [\037ttb\037]")); } - void Execute(CommandSource &source, const std::vector ¶ms) anope_override + void Execute(CommandSource &source, const std::vector ¶ms) override { ChannelInfo *ci; if (CheckArguments(source, params, ci)) @@ -265,7 +265,7 @@ class CommandBSKickAMSG : public CommandBSKickBase } } - bool OnHelp(CommandSource &source, const Anope::string &subcommand) anope_override + bool OnHelp(CommandSource &source, const Anope::string &subcommand) override { this->SendSyntax(source); source.Reply(" "); @@ -290,7 +290,7 @@ class CommandBSKickBadwords : public CommandBSKickBase this->SetSyntax(_("\037channel\037 {\037ON|OFF\037} [\037ttb\037]")); } - void Execute(CommandSource &source, const std::vector ¶ms) anope_override + void Execute(CommandSource &source, const std::vector ¶ms) override { ChannelInfo *ci; if (CheckArguments(source, params, ci)) @@ -302,7 +302,7 @@ class CommandBSKickBadwords : public CommandBSKickBase } - bool OnHelp(CommandSource &source, const Anope::string &subcommand) anope_override + bool OnHelp(CommandSource &source, const Anope::string &subcommand) override { this->SendSyntax(source); source.Reply(" "); @@ -329,7 +329,7 @@ class CommandBSKickBolds : public CommandBSKickBase this->SetSyntax(_("\037channel\037 {\037ON|OFF\037} [\037ttb\037]")); } - void Execute(CommandSource &source, const std::vector ¶ms) anope_override + void Execute(CommandSource &source, const std::vector ¶ms) override { ChannelInfo *ci; if (CheckArguments(source, params, ci)) @@ -340,7 +340,7 @@ class CommandBSKickBolds : public CommandBSKickBase } } - bool OnHelp(CommandSource &source, const Anope::string &subcommand) anope_override + bool OnHelp(CommandSource &source, const Anope::string &subcommand) override { this->SendSyntax(source); source.Reply(" "); @@ -363,7 +363,7 @@ class CommandBSKickCaps : public CommandBSKickBase this->SetSyntax(_("\037channel\037 {\037ON|OFF\037} [\037ttb\037 [\037min\037 [\037percent\037]]]\002")); } - void Execute(CommandSource &source, const std::vector ¶ms) anope_override + void Execute(CommandSource &source, const std::vector ¶ms) override { ChannelInfo *ci; if (!CheckArguments(source, params, ci)) @@ -431,7 +431,7 @@ class CommandBSKickCaps : public CommandBSKickBase kd->Check(ci); } - bool OnHelp(CommandSource &source, const Anope::string &subcommand) anope_override + bool OnHelp(CommandSource &source, const Anope::string &subcommand) override { this->SendSyntax(source); source.Reply(" "); @@ -459,7 +459,7 @@ class CommandBSKickColors : public CommandBSKickBase this->SetSyntax(_("\037channel\037 {\037ON|OFF\037} [\037ttb\037]")); } - void Execute(CommandSource &source, const std::vector ¶ms) anope_override + void Execute(CommandSource &source, const std::vector ¶ms) override { ChannelInfo *ci; if (CheckArguments(source, params, ci)) @@ -470,7 +470,7 @@ class CommandBSKickColors : public CommandBSKickBase } } - bool OnHelp(CommandSource &source, const Anope::string &subcommand) anope_override + bool OnHelp(CommandSource &source, const Anope::string &subcommand) override { this->SendSyntax(source); source.Reply(" "); @@ -493,7 +493,7 @@ class CommandBSKickFlood : public CommandBSKickBase this->SetSyntax(_("\037channel\037 {\037ON|OFF\037} [\037ttb\037 [\037ln\037 [\037secs\037]]]\002")); } - void Execute(CommandSource &source, const std::vector ¶ms) anope_override + void Execute(CommandSource &source, const std::vector ¶ms) override { ChannelInfo *ci; if (!CheckArguments(source, params, ci)) @@ -566,7 +566,7 @@ class CommandBSKickFlood : public CommandBSKickBase kd->Check(ci); } - bool OnHelp(CommandSource &source, const Anope::string &subcommand) anope_override + bool OnHelp(CommandSource &source, const Anope::string &subcommand) override { this->SendSyntax(source); source.Reply(" "); @@ -591,7 +591,7 @@ class CommandBSKickItalics : public CommandBSKickBase this->SetSyntax(_("\037channel\037 {\037ON|OFF\037} [\037ttb\037]")); } - void Execute(CommandSource &source, const std::vector ¶ms) anope_override + void Execute(CommandSource &source, const std::vector ¶ms) override { ChannelInfo *ci; if (CheckArguments(source, params, ci)) @@ -602,7 +602,7 @@ class CommandBSKickItalics : public CommandBSKickBase } } - bool OnHelp(CommandSource &source, const Anope::string &subcommand) anope_override + bool OnHelp(CommandSource &source, const Anope::string &subcommand) override { this->SendSyntax(source); source.Reply(" "); @@ -625,7 +625,7 @@ class CommandBSKickRepeat : public CommandBSKickBase this->SetSyntax(_("\037channel\037 {\037ON|OFF\037} [\037ttb\037 [\037num\037]]\002")); } - void Execute(CommandSource &source, const std::vector ¶ms) anope_override + void Execute(CommandSource &source, const std::vector ¶ms) override { ChannelInfo *ci; if (!CheckArguments(source, params, ci)) @@ -688,7 +688,7 @@ class CommandBSKickRepeat : public CommandBSKickBase kd->Check(ci); } - bool OnHelp(CommandSource &source, const Anope::string &subcommand) anope_override + bool OnHelp(CommandSource &source, const Anope::string &subcommand) override { this->SendSyntax(source); source.Reply(" "); @@ -713,7 +713,7 @@ class CommandBSKickReverses : public CommandBSKickBase this->SetSyntax(_("\037channel\037 {\037ON|OFF\037} [\037ttb\037]")); } - void Execute(CommandSource &source, const std::vector ¶ms) anope_override + void Execute(CommandSource &source, const std::vector ¶ms) override { ChannelInfo *ci; if (CheckArguments(source, params, ci)) @@ -724,7 +724,7 @@ class CommandBSKickReverses : public CommandBSKickBase } } - bool OnHelp(CommandSource &source, const Anope::string &subcommand) anope_override + bool OnHelp(CommandSource &source, const Anope::string &subcommand) override { this->SendSyntax(source); source.Reply(" "); @@ -747,7 +747,7 @@ class CommandBSKickUnderlines : public CommandBSKickBase this->SetSyntax(_("\037channel\037 {\037ON|OFF\037} [\037ttb\037]")); } - void Execute(CommandSource &source, const std::vector ¶ms) anope_override + void Execute(CommandSource &source, const std::vector ¶ms) override { ChannelInfo *ci; if (CheckArguments(source, params, ci)) @@ -758,7 +758,7 @@ class CommandBSKickUnderlines : public CommandBSKickBase } } - bool OnHelp(CommandSource &source, const Anope::string &subcommand) anope_override + bool OnHelp(CommandSource &source, const Anope::string &subcommand) override { this->SendSyntax(source); source.Reply(" "); @@ -781,7 +781,7 @@ class CommandBSSetDontKickOps : public Command this->SetSyntax(_("\037channel\037 {ON | OFF}")); } - void Execute(CommandSource &source, const std::vector ¶ms) anope_override + void Execute(CommandSource &source, const std::vector ¶ms) override { ChannelInfo *ci = ChannelInfo::Find(params[0]); if (ci == NULL) @@ -826,7 +826,7 @@ class CommandBSSetDontKickOps : public Command kd->Check(ci); } - bool OnHelp(CommandSource &source, const Anope::string &) anope_override + bool OnHelp(CommandSource &source, const Anope::string &) override { this->SendSyntax(source); source.Reply(_(" \n" @@ -846,7 +846,7 @@ class CommandBSSetDontKickVoices : public Command this->SetSyntax(_("\037channel\037 {ON | OFF}")); } - void Execute(CommandSource &source, const std::vector ¶ms) anope_override + void Execute(CommandSource &source, const std::vector ¶ms) override { ChannelInfo *ci = ChannelInfo::Find(params[0]); if (ci == NULL) @@ -891,7 +891,7 @@ class CommandBSSetDontKickVoices : public Command kd->Check(ci); } - bool OnHelp(CommandSource &source, const Anope::string &) anope_override + bool OnHelp(CommandSource &source, const Anope::string &) override { this->SendSyntax(source); source.Reply(_(" \n" @@ -978,7 +978,7 @@ class BanDataPurger : public Timer public: BanDataPurger(Module *o) : Timer(o, 300, Anope::CurTime, true) { } - void Tick(time_t) anope_override + void Tick(time_t) override { Log(LOG_DEBUG) << "bs_main: Running bandata purger"; @@ -1095,7 +1095,7 @@ class BSKick : public Module } - void OnBotInfo(CommandSource &source, BotInfo *bi, ChannelInfo *ci, InfoFormatter &info) anope_override + void OnBotInfo(CommandSource &source, BotInfo *bi, ChannelInfo *ci, InfoFormatter &info) override { if (!ci) return; @@ -1210,7 +1210,7 @@ class BSKick : public Module info.AddOption(_("Voices protection")); } - void OnPrivmsg(User *u, Channel *c, Anope::string &msg) anope_override + void OnPrivmsg(User *u, Channel *c, Anope::string &msg) override { /* Now we can make kicker stuff. We try to order the checks * from the fastest one to the slowest one, since there's diff --git a/modules/commands/bs_set.cpp b/modules/commands/bs_set.cpp index 2d08d9ec6..a69ebb8cf 100644 --- a/modules/commands/bs_set.cpp +++ b/modules/commands/bs_set.cpp @@ -20,12 +20,12 @@ class CommandBSSet : public Command this->SetSyntax(_("\037option\037 \037(channel | bot)\037 \037settings\037")); } - void Execute(CommandSource &source, const std::vector ¶ms) anope_override + void Execute(CommandSource &source, const std::vector ¶ms) override { this->OnSyntaxError(source, ""); } - bool OnHelp(CommandSource &source, const Anope::string &subcommand) anope_override + bool OnHelp(CommandSource &source, const Anope::string &subcommand) override { this->SendSyntax(source); source.Reply(" "); @@ -65,7 +65,7 @@ class CommandBSSetBanExpire : public Command public: UnbanTimer(Module *creator, const Anope::string &ch, const Anope::string &bmask, time_t t) : Timer(creator, t), chname(ch), mask(bmask) { } - void Tick(time_t) anope_override + void Tick(time_t) override { Channel *c = Channel::Find(chname); if (c) @@ -79,7 +79,7 @@ class CommandBSSetBanExpire : public Command this->SetSyntax(_("\037channel\037 \037time\037")); } - void Execute(CommandSource &source, const std::vector ¶ms) anope_override + void Execute(CommandSource &source, const std::vector ¶ms) override { const Anope::string &chan = params[0]; const Anope::string &arg = params[1]; @@ -129,7 +129,7 @@ class CommandBSSetBanExpire : public Command source.Reply(_("Bot bans will automatically expire after %s."), Anope::Duration(ci->banexpire, source.GetAccount()).c_str()); } - bool OnHelp(CommandSource &source, const Anope::string &) anope_override + bool OnHelp(CommandSource &source, const Anope::string &) override { this->SendSyntax(source); source.Reply(_(" \n" @@ -150,7 +150,7 @@ class CommandBSSetPrivate : public Command this->SetSyntax(_("\037botname\037 {\037ON|OFF\037}")); } - void Execute(CommandSource &source, const std::vector ¶ms) anope_override + void Execute(CommandSource &source, const std::vector ¶ms) override { BotInfo *bi = BotInfo::Find(params[0], true); const Anope::string &value = params[1]; @@ -181,7 +181,7 @@ class CommandBSSetPrivate : public Command this->OnSyntaxError(source, source.command); } - bool OnHelp(CommandSource &source, const Anope::string &) anope_override + bool OnHelp(CommandSource &source, const Anope::string &) override { this->SendSyntax(source); source.Reply(_(" \n" @@ -204,7 +204,7 @@ class BSSet : public Module { } - void OnBotBan(User *u, ChannelInfo *ci, const Anope::string &mask) anope_override + void OnBotBan(User *u, ChannelInfo *ci, const Anope::string &mask) override { if (!ci->banexpire) return; diff --git a/modules/commands/cs_access.cpp b/modules/commands/cs_access.cpp index b4f682c66..59e028d6c 100644 --- a/modules/commands/cs_access.cpp +++ b/modules/commands/cs_access.cpp @@ -29,7 +29,7 @@ class AccessChanAccess : public ChanAccess { } - bool HasPriv(const Anope::string &name) const anope_override + bool HasPriv(const Anope::string &name) const override { return this->ci->GetLevel(name) != ACCESS_INVALID && this->level >= this->ci->GetLevel(name); } @@ -39,7 +39,7 @@ class AccessChanAccess : public ChanAccess return stringify(this->level); } - void AccessUnserialize(const Anope::string &data) anope_override + void AccessUnserialize(const Anope::string &data) override { try { @@ -50,7 +50,7 @@ class AccessChanAccess : public ChanAccess } } - bool operator>(const ChanAccess &other) const anope_override + bool operator>(const ChanAccess &other) const override { if (this->provider != other.provider) return ChanAccess::operator>(other); @@ -58,7 +58,7 @@ class AccessChanAccess : public ChanAccess return this->level > anope_dynamic_static_cast(&other)->level; } - bool operator<(const ChanAccess &other) const anope_override + bool operator<(const ChanAccess &other) const override { if (this->provider != other.provider) return ChanAccess::operator<(other); @@ -77,7 +77,7 @@ class AccessAccessProvider : public AccessProvider me = this; } - ChanAccess *Create() anope_override + ChanAccess *Create() override { return new AccessChanAccess(this); } @@ -274,7 +274,7 @@ class CommandCSAccess : public Command } } - void HandleNumber(unsigned Number) anope_override + void HandleNumber(unsigned Number) override { if (!Number || Number > ci->GetAccessCount()) return; @@ -355,7 +355,7 @@ class CommandCSAccess : public Command { } - void HandleNumber(unsigned number) anope_override + void HandleNumber(unsigned number) override { if (!number || number > ci->GetAccessCount()) return; @@ -499,7 +499,7 @@ class CommandCSAccess : public Command this->SetSyntax(_("\037channel\037 CLEAR")); } - void Execute(CommandSource &source, const std::vector ¶ms) anope_override + void Execute(CommandSource &source, const std::vector ¶ms) override { const Anope::string &cmd = params[1]; const Anope::string &nick = params.size() > 2 ? params[2] : ""; @@ -555,7 +555,7 @@ class CommandCSAccess : public Command return; } - bool OnHelp(CommandSource &source, const Anope::string &subcommand) anope_override + bool OnHelp(CommandSource &source, const Anope::string &subcommand) override { this->SendSyntax(source); source.Reply(" "); @@ -739,7 +739,7 @@ class CommandCSLevels : public Command this->SetSyntax(_("\037channel\037 RESET")); } - void Execute(CommandSource &source, const std::vector ¶ms) anope_override + void Execute(CommandSource &source, const std::vector ¶ms) override { const Anope::string &cmd = params[1]; const Anope::string &what = params.size() > 2 ? params[2] : ""; @@ -775,7 +775,7 @@ class CommandCSLevels : public Command return; } - bool OnHelp(CommandSource &source, const Anope::string &subcommand) anope_override + bool OnHelp(CommandSource &source, const Anope::string &subcommand) override { if (subcommand.equals_ci("DESC")) { @@ -842,7 +842,7 @@ class CSAccess : public Module } - void OnReload(Configuration::Conf *conf) anope_override + void OnReload(Configuration::Conf *conf) override { defaultLevels.clear(); @@ -868,12 +868,12 @@ class CSAccess : public Module } } - void OnCreateChan(ChannelInfo *ci) anope_override + void OnCreateChan(ChannelInfo *ci) override { reset_levels(ci); } - EventReturn OnGroupCheckPriv(const AccessGroup *group, const Anope::string &priv) anope_override + EventReturn OnGroupCheckPriv(const AccessGroup *group, const Anope::string &priv) override { if (group->ci == NULL) return EVENT_CONTINUE; diff --git a/modules/commands/cs_akick.cpp b/modules/commands/cs_akick.cpp index 873b1cb43..1aff37eb5 100644 --- a/modules/commands/cs_akick.cpp +++ b/modules/commands/cs_akick.cpp @@ -203,7 +203,7 @@ class CommandCSAKick : public Command source.Reply(_("Deleted %d entries from %s autokick list."), deleted, ci->name.c_str()); } - void HandleNumber(unsigned number) anope_override + void HandleNumber(unsigned number) override { if (!number || number > ci->GetAkickCount()) return; @@ -268,7 +268,7 @@ class CommandCSAKick : public Command { } - void HandleNumber(unsigned number) anope_override + void HandleNumber(unsigned number) override { if (!number || number > ci->GetAkickCount()) return; @@ -428,7 +428,7 @@ class CommandCSAKick : public Command this->SetSyntax(_("\037channel\037 CLEAR")); } - void Execute(CommandSource &source, const std::vector ¶ms) anope_override + void Execute(CommandSource &source, const std::vector ¶ms) override { Anope::string chan = params[0]; Anope::string cmd = params[1]; @@ -465,7 +465,7 @@ class CommandCSAKick : public Command return; } - bool OnHelp(CommandSource &source, const Anope::string &subcommand) anope_override + bool OnHelp(CommandSource &source, const Anope::string &subcommand) override { BotInfo *bi = Config->GetClient("NickServ"); this->SendSyntax(source); @@ -518,7 +518,7 @@ class CSAKick : public Module { } - EventReturn OnCheckKick(User *u, Channel *c, Anope::string &mask, Anope::string &reason) anope_override + EventReturn OnCheckKick(User *u, Channel *c, Anope::string &mask, Anope::string &reason) override { if (!c->ci || c->MatchesList(u, "EXCEPT")) return EVENT_CONTINUE; diff --git a/modules/commands/cs_ban.cpp b/modules/commands/cs_ban.cpp index 0395ddd92..3a5e335f1 100644 --- a/modules/commands/cs_ban.cpp +++ b/modules/commands/cs_ban.cpp @@ -23,7 +23,7 @@ class TempBan : public Timer public: TempBan(time_t seconds, Channel *c, const Anope::string &banmask) : Timer(me, seconds), channel(c->name), mask(banmask) { } - void Tick(time_t ctime) anope_override + void Tick(time_t ctime) override { Channel *c = Channel::Find(this->channel); if (c) @@ -40,7 +40,7 @@ class CommandCSBan : public Command this->SetSyntax(_("\037channel\037 [+\037expiry\037] {\037nick\037 | \037mask\037} [\037reason\037]")); } - void Execute(CommandSource &source, const std::vector ¶ms) anope_override + void Execute(CommandSource &source, const std::vector ¶ms) override { const Anope::string &chan = params[0]; @@ -198,7 +198,7 @@ class CommandCSBan : public Command } } - bool OnHelp(CommandSource &source, const Anope::string &subcommand) anope_override + bool OnHelp(CommandSource &source, const Anope::string &subcommand) override { this->SendSyntax(source); source.Reply(" "); diff --git a/modules/commands/cs_clone.cpp b/modules/commands/cs_clone.cpp index e93029466..bfe21783b 100644 --- a/modules/commands/cs_clone.cpp +++ b/modules/commands/cs_clone.cpp @@ -21,7 +21,7 @@ public: this->SetSyntax(_("\037channel\037 \037target\037 [\037what\037]")); } - void Execute(CommandSource &source, const std::vector ¶ms) anope_override + void Execute(CommandSource &source, const std::vector ¶ms) override { const Anope::string &channel = params[0]; const Anope::string &target = params[1]; @@ -187,7 +187,7 @@ public: Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "to clone " << (what.empty() ? "everything from it" : what) << " to " << target_ci->name; } - bool OnHelp(CommandSource &source, const Anope::string &subcommand) anope_override + bool OnHelp(CommandSource &source, const Anope::string &subcommand) override { this->SendSyntax(source); source.Reply(" "); diff --git a/modules/commands/cs_drop.cpp b/modules/commands/cs_drop.cpp index 401573ea2..03d24a18d 100644 --- a/modules/commands/cs_drop.cpp +++ b/modules/commands/cs_drop.cpp @@ -20,7 +20,7 @@ class CommandCSDrop : public Command this->SetSyntax(_("\037channel\037 \037channel\037")); } - void Execute(CommandSource &source, const std::vector ¶ms) anope_override + void Execute(CommandSource &source, const std::vector ¶ms) override { const Anope::string &chan = params[0]; @@ -66,7 +66,7 @@ class CommandCSDrop : public Command c->CheckModes(); } - bool OnHelp(CommandSource &source, const Anope::string &subcommand) anope_override + bool OnHelp(CommandSource &source, const Anope::string &subcommand) override { this->SendSyntax(source); source.Reply(" "); diff --git a/modules/commands/cs_enforce.cpp b/modules/commands/cs_enforce.cpp index 0a4eae539..5ea267e6f 100644 --- a/modules/commands/cs_enforce.cpp +++ b/modules/commands/cs_enforce.cpp @@ -228,7 +228,7 @@ class CommandCSEnforce : public Command this->SetSyntax(_("\037channel\037 \037what\037")); } - void Execute(CommandSource &source, const std::vector ¶ms) anope_override + void Execute(CommandSource &source, const std::vector ¶ms) override { const Anope::string &what = params.size() > 1 ? params[1] : ""; @@ -256,7 +256,7 @@ class CommandCSEnforce : public Command this->OnSyntaxError(source, ""); } - bool OnHelp(CommandSource &source, const Anope::string &subcommand) anope_override + bool OnHelp(CommandSource &source, const Anope::string &subcommand) override { this->SendSyntax(source); source.Reply(" "); diff --git a/modules/commands/cs_entrymsg.cpp b/modules/commands/cs_entrymsg.cpp index 4eec3e07d..d9948a52f 100644 --- a/modules/commands/cs_entrymsg.cpp +++ b/modules/commands/cs_entrymsg.cpp @@ -28,7 +28,7 @@ struct EntryMsgImpl : EntryMsg, Serializable ~EntryMsgImpl(); - void Serialize(Serialize::Data &data) const anope_override + void Serialize(Serialize::Data &data) const override { data["ci"] << this->chan; data["creator"] << this->creator; @@ -43,7 +43,7 @@ struct EntryMessageListImpl : EntryMessageList { EntryMessageListImpl(Extensible *) { } - EntryMsg* Create() anope_override + EntryMsg* Create() override { return new EntryMsgImpl(); } @@ -197,7 +197,7 @@ class CommandEntryMessage : public Command this->SetSyntax(_("\037channel\037 CLEAR")); } - void Execute(CommandSource &source, const std::vector ¶ms) anope_override + void Execute(CommandSource &source, const std::vector ¶ms) override { ChannelInfo *ci = ChannelInfo::Find(params[0]); if (ci == NULL) @@ -232,7 +232,7 @@ class CommandEntryMessage : public Command this->OnSyntaxError(source, ""); } - bool OnHelp(CommandSource &source, const Anope::string &subcommand) anope_override + bool OnHelp(CommandSource &source, const Anope::string &subcommand) override { this->SendSyntax(source); source.Reply(" "); @@ -270,7 +270,7 @@ class CSEntryMessage : public Module { } - void OnJoinChannel(User *u, Channel *c) anope_override + void OnJoinChannel(User *u, Channel *c) override { if (u && c && c->ci && u->server->IsSynced()) { diff --git a/modules/commands/cs_flags.cpp b/modules/commands/cs_flags.cpp index 01314e2d3..b2ade785f 100644 --- a/modules/commands/cs_flags.cpp +++ b/modules/commands/cs_flags.cpp @@ -22,7 +22,7 @@ class FlagsChanAccess : public ChanAccess { } - bool HasPriv(const Anope::string &priv) const anope_override + bool HasPriv(const Anope::string &priv) const override { std::map::iterator it = defaultFlags.find(priv); if (it != defaultFlags.end() && this->flags.count(it->second) > 0) @@ -35,7 +35,7 @@ class FlagsChanAccess : public ChanAccess return Anope::string(this->flags.begin(), this->flags.end()); } - void AccessUnserialize(const Anope::string &data) anope_override + void AccessUnserialize(const Anope::string &data) override { for (unsigned i = data.length(); i > 0; --i) this->flags.insert(data[i - 1]); @@ -69,7 +69,7 @@ class FlagsAccessProvider : public AccessProvider ap = this; } - ChanAccess *Create() anope_override + ChanAccess *Create() override { return new FlagsChanAccess(this); } @@ -376,7 +376,7 @@ class CommandCSFlags : public Command this->SetSyntax(_("\037channel\037 CLEAR")); } - void Execute(CommandSource &source, const std::vector ¶ms) anope_override + void Execute(CommandSource &source, const std::vector ¶ms) override { const Anope::string &chan = params[0]; const Anope::string &cmd = params.size() > 1 ? params[1] : ""; @@ -411,7 +411,7 @@ class CommandCSFlags : public Command this->OnSyntaxError(source, cmd); } - bool OnHelp(CommandSource &source, const Anope::string &subcommand) anope_override + bool OnHelp(CommandSource &source, const Anope::string &subcommand) override { this->SendSyntax(source); source.Reply(" "); @@ -464,7 +464,7 @@ class CSFlags : public Module } - void OnReload(Configuration::Conf *conf) anope_override + void OnReload(Configuration::Conf *conf) override { defaultFlags.clear(); diff --git a/modules/commands/cs_getkey.cpp b/modules/commands/cs_getkey.cpp index c6d57f3b4..187c01c68 100644 --- a/modules/commands/cs_getkey.cpp +++ b/modules/commands/cs_getkey.cpp @@ -20,7 +20,7 @@ class CommandCSGetKey : public Command this->SetSyntax(_("\037channel\037")); } - void Execute(CommandSource &source, const std::vector ¶ms) anope_override + void Execute(CommandSource &source, const std::vector ¶ms) override { const Anope::string &chan = params[0]; @@ -50,7 +50,7 @@ class CommandCSGetKey : public Command source.Reply(_("Key for channel \002%s\002 is \002%s\002."), chan.c_str(), key.c_str()); } - bool OnHelp(CommandSource &source, const Anope::string &subcommand) anope_override + bool OnHelp(CommandSource &source, const Anope::string &subcommand) override { this->SendSyntax(source); source.Reply(" "); diff --git a/modules/commands/cs_info.cpp b/modules/commands/cs_info.cpp index af12aba78..06130f15e 100644 --- a/modules/commands/cs_info.cpp +++ b/modules/commands/cs_info.cpp @@ -21,7 +21,7 @@ class CommandCSInfo : public Command this->AllowUnregistered(true); } - void Execute(CommandSource &source, const std::vector ¶ms) anope_override + void Execute(CommandSource &source, const std::vector ¶ms) override { const Anope::string &chan = params[0]; @@ -69,7 +69,7 @@ class CommandCSInfo : public Command source.Reply(replies[i]); } - bool OnHelp(CommandSource &source, const Anope::string &subcommand) anope_override + bool OnHelp(CommandSource &source, const Anope::string &subcommand) override { this->SendSyntax(source); source.Reply(" "); diff --git a/modules/commands/cs_invite.cpp b/modules/commands/cs_invite.cpp index 1f39eaf7b..0058f4ee6 100644 --- a/modules/commands/cs_invite.cpp +++ b/modules/commands/cs_invite.cpp @@ -20,7 +20,7 @@ class CommandCSInvite : public Command this->SetSyntax(_("\037channel\037 [\037nick\037]")); } - void Execute(CommandSource &source, const std::vector ¶ms) anope_override + void Execute(CommandSource &source, const std::vector ¶ms) override { const Anope::string &chan = params[0]; @@ -84,7 +84,7 @@ class CommandCSInvite : public Command } } - bool OnHelp(CommandSource &source, const Anope::string &subcommand) anope_override + bool OnHelp(CommandSource &source, const Anope::string &subcommand) override { this->SendSyntax(source); source.Reply(" "); diff --git a/modules/commands/cs_kick.cpp b/modules/commands/cs_kick.cpp index dded149eb..55e0a6718 100644 --- a/modules/commands/cs_kick.cpp +++ b/modules/commands/cs_kick.cpp @@ -21,7 +21,7 @@ class CommandCSKick : public Command this->SetSyntax(_("\037channel\037 \037mask\037 [\037reason\037]")); } - void Execute(CommandSource &source, const std::vector ¶ms) anope_override + void Execute(CommandSource &source, const std::vector ¶ms) override { const Anope::string &chan = params[0]; const Anope::string &target = params[1]; @@ -108,7 +108,7 @@ class CommandCSKick : public Command source.Reply(NICK_X_NOT_IN_USE, target.c_str()); } - bool OnHelp(CommandSource &source, const Anope::string &subcommand) anope_override + bool OnHelp(CommandSource &source, const Anope::string &subcommand) override { this->SendSyntax(source); source.Reply(" "); diff --git a/modules/commands/cs_list.cpp b/modules/commands/cs_list.cpp index d58d105b7..735a836de 100644 --- a/modules/commands/cs_list.cpp +++ b/modules/commands/cs_list.cpp @@ -20,7 +20,7 @@ class CommandCSList : public Command this->SetSyntax(_("\037pattern\037 [SUSPENDED] [NOEXPIRE]")); } - void Exe