mirror of
https://github.com/anope/anope.git
synced 2026-06-17 05:24:47 +02:00
Compare commits
34 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 0bb51f6551 | |||
| 28ce7bccb6 | |||
| a70ef47359 | |||
| 90ac540960 | |||
| 909a77efb9 | |||
| 59c8867e64 | |||
| 08d47a5dad | |||
| 41403c7e36 | |||
| b8ef28509c | |||
| cf6e56130a | |||
| a3f6ffd2c7 | |||
| b9554f8539 | |||
| 84dc0f3cc8 | |||
| 75f764e353 | |||
| 302c4f334e | |||
| 5148b349b7 | |||
| bbe31a6a38 | |||
| 8cb310c72e | |||
| 4a1ad182d4 | |||
| 75a893b18d | |||
| 753db88ae9 | |||
| 9f6f0b445b | |||
| dfa0bf5e5d | |||
| cc35c22d2a | |||
| 1dafc96521 | |||
| 5d1dd21887 | |||
| 8b6c6fdd81 | |||
| 1a5d49b7f6 | |||
| 0b3e55ed8f | |||
| 7a09cebcfb | |||
| da5c68f274 | |||
| 9782c1f94b | |||
| ee6b022f4d | |||
| 85b0e9d02f |
@@ -4,6 +4,7 @@ on:
|
||||
push:
|
||||
schedule:
|
||||
- cron: '0 0 * * 0'
|
||||
workflow_dispatch:
|
||||
jobs:
|
||||
build:
|
||||
if: "!contains(github.event.head_commit.message, '[skip alpine ci]')"
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
name: Ubuntu CI
|
||||
on:
|
||||
- pull_request
|
||||
- push
|
||||
pull_request:
|
||||
push:
|
||||
schedule:
|
||||
- cron: '0 0 * * 0'
|
||||
workflow_dispatch:
|
||||
jobs:
|
||||
build:
|
||||
if: "!contains(github.event.head_commit.message, '[skip ubuntu ci]')"
|
||||
|
||||
@@ -7,6 +7,7 @@ on:
|
||||
- published
|
||||
schedule:
|
||||
- cron: '0 0 * * 0'
|
||||
workflow_dispatch:
|
||||
jobs:
|
||||
build:
|
||||
if: "!contains(github.event.head_commit.message, '[skip windows ci]')"
|
||||
|
||||
@@ -14,5 +14,6 @@ modules/ssl_openssl.cpp
|
||||
modules/stats
|
||||
modules/xmlrpc.cpp
|
||||
run/
|
||||
*.diff
|
||||
*.mo
|
||||
*.pot
|
||||
|
||||
+4
-2
@@ -107,6 +107,7 @@ include(CheckFunctionExists)
|
||||
include(CheckTypeSize)
|
||||
include(CheckLibraryExists)
|
||||
include(CheckCXXCompilerFlag)
|
||||
include(FindPkgConfig)
|
||||
|
||||
# If extra include directories were specified, tell cmake about them.
|
||||
if(EXTRA_INCLUDE)
|
||||
@@ -121,7 +122,7 @@ endif()
|
||||
# setup conan
|
||||
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/conanbuildinfo.cmake")
|
||||
include("${CMAKE_CURRENT_SOURCE_DIR}/conanbuildinfo.cmake")
|
||||
conan_basic_setup()
|
||||
conan_basic_setup(TARGETS)
|
||||
endif()
|
||||
|
||||
# Find gettext
|
||||
@@ -159,7 +160,8 @@ if(MSVC)
|
||||
# Otherwise, we're not using Visual Studio
|
||||
else()
|
||||
# Set the compile flags to have all warnings on (including shadowed variables)
|
||||
set(CXXFLAGS "${CXXFLAGS} -fvisibility=hidden -fvisibility-inlines-hidden -Wall -Wextra -Wformat=2 -Wmissing-format-attribute -Wpedantic -Wno-format-nonliteral -Wno-format-zero-length -Wno-unused-parameter ${CMAKE_CXX_FLAGS}")
|
||||
set(CXXFLAGS "${CXXFLAGS} -fvisibility=hidden -fvisibility-inlines-hidden -Wall -Wextra -Wformat=2 -Wmissing-format-attribute -Wpedantic")
|
||||
set(CXXFLAGS "${CXXFLAGS} -Wno-format-nonliteral -Wno-format-y2k -Wno-format-zero-length -Wno-date-time -Wno-unused-parameter ${CMAKE_CXX_FLAGS}")
|
||||
endif()
|
||||
|
||||
# If CMake has found that the given system requires a special library for dl* calls, include it with the linker flags
|
||||
|
||||
+26
-84
@@ -1,87 +1,3 @@
|
||||
###############################################################################
|
||||
# calculate_libraries(<source filename> <output variable for linker flags> <output variable for extra depends>)
|
||||
#
|
||||
# This macro is used in most of the module (sub)directories to calculate the
|
||||
# library dependencies for the given source file.
|
||||
###############################################################################
|
||||
macro(calculate_libraries SRC SRC_LDFLAGS EXTRA_DEPENDS)
|
||||
# Set up a temporary LDFLAGS for this file
|
||||
set(THIS_LDFLAGS "${LDFLAGS}")
|
||||
# Reset extra dependencies
|
||||
set(EXTRA_DEPENDENCIES)
|
||||
# Reset library paths
|
||||
set(LIBRARY_PATHS)
|
||||
# Reset libraries
|
||||
set(LIBRARIES)
|
||||
# Check to see if there are any lines matching: /* RequiredLibraries: [something] */
|
||||
if(WIN32)
|
||||
file(STRINGS ${SRC} REQUIRED_LIBRARIES REGEX "/\\*[ \t]*RequiredWindowsLibraries:[ \t]*.*[ \t]*\\*/")
|
||||
else()
|
||||
file(STRINGS ${SRC} REQUIRED_LIBRARIES REGEX "/\\*[ \t]*RequiredLibraries:[ \t]*.*[ \t]*\\*/")
|
||||
endif()
|
||||
# Iterate through those lines
|
||||
foreach(REQUIRED_LIBRARY ${REQUIRED_LIBRARIES})
|
||||
# Strip off the /* RequiredLibraries: and */ from the line
|
||||
string(REGEX REPLACE "/\\*[ \t]*Required.*Libraries:[ \t]*([^ \t]*)[ \t]*\\*/" "\\1" REQUIRED_LIBRARY ${REQUIRED_LIBRARY})
|
||||
# Replace all commas with semicolons
|
||||
string(REGEX REPLACE "," ";" REQUIRED_LIBRARY ${REQUIRED_LIBRARY})
|
||||
# Iterate through the libraries given
|
||||
foreach(LIBRARY ${REQUIRED_LIBRARY})
|
||||
# If the library has multiple names extract the alternate.
|
||||
unset(LIBRARY_ALT)
|
||||
if (${LIBRARY} MATCHES "^.+\\|.+$")
|
||||
string(REGEX REPLACE ".+\\|(.*)" "\\1" LIBRARY_ALT ${LIBRARY})
|
||||
string(REGEX REPLACE "(.+)\\|.*" "\\1" LIBRARY ${LIBRARY})
|
||||
endif()
|
||||
# Locate the library to see if it exists
|
||||
if(DEFAULT_LIBRARY_DIRS OR DEFINED $ENV{VCINSTALLDIR})
|
||||
find_library(FOUND_${LIBRARY}_LIBRARY NAMES ${LIBRARY} ${LIBRARY_ALT} PATHS ${DEFAULT_LIBRARY_DIRS} $ENV{VCINSTALLDIR}/lib ${EXTRA_INCLUDE} ${EXTRA_LIBS})
|
||||
else()
|
||||
find_library(FOUND_${LIBRARY}_LIBRARY NAMES ${LIBRARY} ${LIBRARY_ALT} PATHS ${EXTRA_INCLUDE} ${EXTRA_LIBS} NO_DEFAULT_PATH)
|
||||
find_library(FOUND_${LIBRARY}_LIBRARY NAMES ${LIBRARY} ${LIBRARY_ALT} PATHS ${EXTRA_INCLUDE} ${EXTRA_LIBS})
|
||||
endif()
|
||||
# If the library was found, we will add it to the linker flags
|
||||
if(FOUND_${LIBRARY}_LIBRARY)
|
||||
if(MSVC)
|
||||
# For Visual Studio, instead of editing the linker flags, we'll add the library to a separate list of extra dependencies
|
||||
list(APPEND EXTRA_DEPENDENCIES "${FOUND_${LIBRARY}_LIBRARY}")
|
||||
else()
|
||||
# Get the path only of the library, to add it to library paths.
|
||||
get_filename_component(LIBRARY_PATH ${FOUND_${LIBRARY}_LIBRARY} PATH)
|
||||
list(APPEND LIBRARY_PATHS "${LIBRARY_PATH}")
|
||||
# Extract the library short name, add it to the library path
|
||||
get_filename_component(LIBRARY_NAME ${FOUND_${LIBRARY}_LIBRARY} NAME_WE)
|
||||
string(REGEX REPLACE "^lib" "" LIBRARY_NAME ${LIBRARY_NAME})
|
||||
list(APPEND LIBRARIES ${LIBRARY_NAME})
|
||||
endif()
|
||||
else()
|
||||
# In the case of the library not being found, we fatally error so CMake stops trying to generate
|
||||
message(FATAL_ERROR "${SRC} needs library ${LIBRARY} but we were unable to locate that library! Check that the library is within the search path of your OS.")
|
||||
endif()
|
||||
endforeach()
|
||||
endforeach()
|
||||
# Remove duplicates from the library paths
|
||||
if(LIBRARY_PATHS)
|
||||
list(REMOVE_DUPLICATES LIBRARY_PATHS)
|
||||
endif()
|
||||
# Remove diplicates from the libraries
|
||||
if(LIBRARIES)
|
||||
list(REMOVE_DUPLICATES LIBRARIES)
|
||||
endif()
|
||||
# Iterate through library paths and add them to the linker flags
|
||||
foreach(LIBRARY_PATH ${LIBRARY_PATHS})
|
||||
if(NOT "${LIBRARY_PATH}" IN_LIST DEFAULT_LIBRARY_DIRS)
|
||||
set(THIS_LDFLAGS "${THIS_LDFLAGS} -L${LIBRARY_PATH}")
|
||||
endif()
|
||||
endforeach()
|
||||
# Iterate through libraries and add them to the linker flags
|
||||
foreach(LIBRARY ${LIBRARIES})
|
||||
list(APPEND EXTRA_DEPENDENCIES "${LIBRARY}")
|
||||
endforeach()
|
||||
set(${SRC_LDFLAGS} "${THIS_LDFLAGS}")
|
||||
set(${EXTRA_DEPENDS} "${EXTRA_DEPENDENCIES}")
|
||||
endmacro()
|
||||
|
||||
###############################################################################
|
||||
# add_to_cpack_ignored_files(<item> [TRUE])
|
||||
#
|
||||
@@ -104,3 +20,29 @@ macro(add_to_cpack_ignored_files ITEM)
|
||||
set(ENV{CPACK_IGNORED_FILES} "${REAL_ITEM}")
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
###############################################################################
|
||||
# inline_cmake(TARGET FILE)
|
||||
#
|
||||
# A macro to execute inline CMake instructions from within a module source.
|
||||
###############################################################################
|
||||
macro(inline_cmake TARGET FILE)
|
||||
file(STRINGS ${FILE} SRC)
|
||||
set(CODE "")
|
||||
set(IN_CODE OFF)
|
||||
foreach(LINE IN LISTS SRC)
|
||||
if(IN_CODE)
|
||||
string(REGEX REPLACE "/// " "" CLEAN_LINE ${LINE})
|
||||
if(CLEAN_LINE MATCHES "^END CMAKE$")
|
||||
cmake_language(EVAL CODE "${CODE}")
|
||||
set(CODE "")
|
||||
set(IN_CODE OFF)
|
||||
else()
|
||||
set(CODE "${CODE}\n${CLEAN_LINE}")
|
||||
endif()
|
||||
elseif(LINE MATCHES "^/// BEGIN CMAKE$")
|
||||
message(STATUS "Executing inline CMake code for ${TARGET}")
|
||||
set(IN_CODE ON)
|
||||
endif()
|
||||
endforeach()
|
||||
endmacro()
|
||||
|
||||
@@ -127,8 +127,9 @@ define
|
||||
* and serverinfo configuration would look like:
|
||||
*
|
||||
* # This goes in inspircd.conf, *NOT* your Anope config!
|
||||
* <module name="account">
|
||||
* <module name="hidechans">
|
||||
* <module name="services_account">
|
||||
* <module name="services">
|
||||
* <module name="spanningtree">
|
||||
* <bind address="127.0.0.1" port="7000" type="servers">
|
||||
* <link name="services.example.com"
|
||||
@@ -136,7 +137,7 @@ define
|
||||
* port="7000"
|
||||
* sendpass="mypassword"
|
||||
* recvpass="mypassword">
|
||||
* <uline server="services.example.com" silent="yes">
|
||||
* <services server="services.example.com" silent="yes">
|
||||
*
|
||||
* An example configuration for UnrealIRCd that is compatible with the below uplink
|
||||
* and serverinfo configuration would look like:
|
||||
@@ -509,7 +510,7 @@ options
|
||||
*
|
||||
* Removing .UTF-8 will instead use the default encoding for the language, e.g. iso-8859-1 for western European languages.
|
||||
*/
|
||||
languages = "de_DE.UTF-8 el_GR.UTF-8 es_ES.UTF-8 fr_FR.UTF-8 it_IT.UTF-8 nl_NL.UTF-8 pl_PL.UTF-8 pt_PT.UTF-8 tr_TR.UTF-8"
|
||||
languages = "de_DE.UTF-8 el_GR.UTF-8 es_ES.UTF-8 fr_FR.UTF-8 it_IT.UTF-8 nl_NL.UTF-8 pl_PL.UTF-8 pt_PT.UTF-8 ro_RO.UTF-8 tr_TR.UTF-8"
|
||||
|
||||
/*
|
||||
* Default language that non- and newly-registered nicks will receive messages in.
|
||||
|
||||
@@ -990,8 +990,20 @@ module
|
||||
{
|
||||
name = "cs_entrymsg"
|
||||
|
||||
/* The maximum number of entrymsgs allowed per channel. If not set, defaults to 5. */
|
||||
/*
|
||||
* The maximum number of entry messages allowed per channel.
|
||||
*
|
||||
* Defaults to 5
|
||||
*/
|
||||
maxentries = 5
|
||||
|
||||
/*
|
||||
* Whether to include an IRCv3 time tag for the original add time on entry
|
||||
* messages.
|
||||
*
|
||||
* Defaults to yes.
|
||||
*/
|
||||
#timestamp = no
|
||||
}
|
||||
command { service = "ChanServ"; name = "ENTRYMSG"; command = "chanserv/entrymsg"; group = "chanserv/management"; }
|
||||
|
||||
|
||||
@@ -777,6 +777,17 @@ command { service = "NickServ"; name = "SASET PROTECT"; command = "nickserv/sase
|
||||
command { service = "NickServ"; name = "SET KILL"; command = "nickserv/set/protect"; hide = yes; }
|
||||
command { service = "NickServ"; name = "SASET KILL"; command = "nickserv/saset/protect"; permission = "nickserv/saset/protect"; hide = yes; }
|
||||
|
||||
/*
|
||||
* ns_set_timezone
|
||||
*
|
||||
* Provides the command nickserv/set/timezone and nickserv/saset/timezone.
|
||||
*
|
||||
* Allows configuring the timezone that services uses.
|
||||
*/
|
||||
module { name = "ns_set_timezone" }
|
||||
command { service = "NickServ"; name = "SET TIMEZONE"; command = "nickserv/set/timezone"; }
|
||||
command { service = "NickServ"; name = "SASET TIMEZONE"; command = "nickserv/saset/timezone"; permission = "nickserv/saset/timezone"; }
|
||||
|
||||
/*
|
||||
* ns_suspend
|
||||
*
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
# Anope Change Log
|
||||
|
||||
## Anope 2.1.19 (2025-11-01)
|
||||
|
||||
### Breaking Changes
|
||||
|
||||
* `pkg-config` is now required to find dependencies for the following modules on UNIX systems:
|
||||
- enc_argon2
|
||||
- ldap
|
||||
- mysql
|
||||
- regex_pcre2
|
||||
- regex_tre
|
||||
|
||||
* Support for InspIRCd v3 has been dropped ahead of it going EOL in two months. Please migrate to InspIRCd v4 to keep using Anope 2.1 with InspIRCd.
|
||||
|
||||
### Changes
|
||||
|
||||
* Added a Romanian translation (contributed by @KidProtect on GitHub).
|
||||
|
||||
* Added support for associating a timezone with an account to allow users to receive timestamps in their local timezone.
|
||||
|
||||
```
|
||||
/NICKSERV SET TIMEZONE Europe/London
|
||||
-NickServ- Timezone changed to Europe/Berlin.
|
||||
|
||||
/NICKSERV INFO test
|
||||
-NickServ- Account registered: Thu 09 Oct 2025 15:22:45 CEST (45 seconds ago)
|
||||
```
|
||||
|
||||
NOTE: This requires a compiler with C++20 timezone support.
|
||||
|
||||
* Added support for IRCv3 message tags when using Solanum git.
|
||||
|
||||
* Added support for language-specific time formats.
|
||||
|
||||
```
|
||||
/NICKSERV SET LANGUAGE tr_TR.UTF-8
|
||||
-NickServ- Dil Türkçe olarak değiştirildi.
|
||||
|
||||
/NICKSERV INFO test
|
||||
-NickServ- Hesap kaydedildi: Prş 09 Eki 2025 15:22:45 (6 dakika, 16 saniye önce)
|
||||
```
|
||||
|
||||
* Channel entry messages are now tagged with an IRCv3 time tag for the time they were created on supporting IRCds. This defaults to on but can be disabled using `{cs_entrymsg}:timestamp`.
|
||||
|
||||
* Reordered the information in the `nickserv/info` command output to show the registration dates before the seen information.
|
||||
|
||||
* Updated the Turkish translation (contributed by @CaPaCuL on GitHub).
|
||||
|
||||
* Updated the vendored libraries.
|
||||
+1
-1
@@ -7,7 +7,7 @@ if(WIN32)
|
||||
# Add README.txt to list of files for CPack to ignore
|
||||
add_to_cpack_ignored_files("README.txt$" TRUE)
|
||||
endif()
|
||||
set(DOCS Changes Changes.conf DEFCON FAQ INSTALL LANGUAGE MODULES ${CMAKE_CURRENT_BINARY_DIR}/README.txt WIN32.txt)
|
||||
set(DOCS CHANGES.md DEFCON FAQ INSTALL LANGUAGE MODULES ${CMAKE_CURRENT_BINARY_DIR}/README.txt WIN32.txt)
|
||||
install(FILES ${DOCS}
|
||||
DESTINATION ${DOC_DIR}
|
||||
)
|
||||
|
||||
+2
-7
@@ -10,14 +10,9 @@ Anope Multi Language Support
|
||||
|
||||
To build Anope with gettext support, gettext and its development libraries must be installed on the system.
|
||||
|
||||
On Debian install the locales-all package.
|
||||
On Debian-based systems install the locales-all package.
|
||||
|
||||
On Ubuntu run locale-gen for each language you want to enable.
|
||||
For example:
|
||||
locale-gen es_ES.UTF-8
|
||||
|
||||
Then execute:
|
||||
dpkg-reconfigure locales
|
||||
On RHEL-based systems run `yum list glibc-langpack-*` and install the languages you want to enable.
|
||||
|
||||
If you have already built Anope you will need to delete the build directory and rebuild from scratch.
|
||||
|
||||
|
||||
+1
-1
@@ -166,7 +166,7 @@ Table of Contents
|
||||
|
||||
Anope currently works with:
|
||||
|
||||
* InspIRCd 3 or later
|
||||
* InspIRCd 4 or later
|
||||
* ircd-hybrid 8.2.34 or later
|
||||
* ircd-ratbox 3 or later
|
||||
* ngIRCd 19.2 or later
|
||||
|
||||
+1
-1
@@ -184,7 +184,7 @@ public:
|
||||
/** Checks whether this account is a services oper or not.
|
||||
* @return True if this account is a services oper, false otherwise.
|
||||
*/
|
||||
virtual bool IsServicesOper() const;
|
||||
bool IsServicesOper() const;
|
||||
|
||||
/** Retrieves the account id for this user */
|
||||
uint64_t GetId();
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
#include <signal.h>
|
||||
|
||||
#include "hashcomp.h"
|
||||
|
||||
#define UTF_CPP_CPLUSPLUS 201703L
|
||||
#include "utfcpp/unchecked.h"
|
||||
|
||||
namespace Anope
|
||||
@@ -53,6 +55,7 @@ namespace Anope
|
||||
string(const char *_str, size_type n) : _string(_str, n) { }
|
||||
string(const std::string &_str) : _string(_str) { }
|
||||
string(const ci::string &_str) : _string(_str.c_str()) { }
|
||||
string(const std::string_view &_sv) : _string(_sv.begin(), _sv.end()) { }
|
||||
string(const string &_str, size_type pos, size_type n = npos) : _string(_str._string, pos, n) { }
|
||||
template <class InputIterator> string(InputIterator first, InputIterator last) : _string(first, last) { }
|
||||
string(const string &) = default;
|
||||
|
||||
+1
-1
@@ -124,7 +124,7 @@ public:
|
||||
* @param message The users' message
|
||||
* @params tags Message tags
|
||||
*/
|
||||
virtual void OnMessage(User *u, const Anope::string &message, const Anope::map<Anope::string> &tags);
|
||||
void OnMessage(User *u, const Anope::string &message, const Anope::map<Anope::string> &tags);
|
||||
|
||||
/** Link a command name to a command in services
|
||||
* @param cname The command name
|
||||
|
||||
@@ -35,6 +35,14 @@ namespace Language
|
||||
*/
|
||||
extern void InitLanguages();
|
||||
|
||||
/** Sets the locale to the specified language.
|
||||
* @param lang The language to translate to.
|
||||
*/
|
||||
extern CoreExport void SetLocale(const char* lang);
|
||||
|
||||
/** Sets the locale back to the default. */
|
||||
extern CoreExport void ResetLocale();
|
||||
|
||||
/** Translates a string to the default language.
|
||||
* @param string A string to translate
|
||||
* @return The translated string if found, else the original string.
|
||||
@@ -101,6 +109,9 @@ namespace Language
|
||||
|
||||
/* Commonly used language strings */
|
||||
#define CONFIRM_DROP _("Please confirm that you want to drop \002%s\002 with \002%s\032%s\032%s\002")
|
||||
#define CONFIRM_REGISTER_ADMIN _("All new accounts must be confirmed by an administrator. Please wait for your registration to be confirmed.")
|
||||
#define CONFIRM_REGISTER_CODE _("All new accounts must be confirmed. To confirm your account, type \002%s\002.")
|
||||
#define CONFIRM_REGISTER_MAIL _("All new accounts must be confirmed. To confirm your account, follow the instructions that were emailed to you.")
|
||||
#define SERVICE_UNAVAILABLE _("Sorry, %s is temporarily unavailable.")
|
||||
#define MORE_INFO _("Type \002%s\002 for more information.")
|
||||
#define BAD_USERHOST_MASK _("Mask must be in the form \037user\037@\037host\037.")
|
||||
|
||||
+4
-4
@@ -215,8 +215,8 @@ public:
|
||||
virtual void SendGlobalNotice(BotInfo *bi, const Server *dest, const Anope::string &msg) = 0;
|
||||
virtual void SendGlobalPrivmsg(BotInfo *bi, const Server *desc, const Anope::string &msg) = 0;
|
||||
|
||||
virtual void SendContextNotice(BotInfo *bi, User *target, Channel *context, const Anope::string &msg);
|
||||
virtual void SendContextPrivmsg(BotInfo *bi, User *target, Channel *context, const Anope::string &msg);
|
||||
virtual void SendContextNotice(BotInfo *bi, User *target, Channel *context, const Anope::string &msg, const Anope::map<Anope::string> &tags = {});
|
||||
virtual void SendContextPrivmsg(BotInfo *bi, User *target, Channel *context, const Anope::string &msg, const Anope::map<Anope::string> &tags = {});
|
||||
|
||||
virtual void SendQuit(User *u, const Anope::string &msg = "", const Anope::string &opermsg = "");
|
||||
virtual void SendPing(const Anope::string &servname, const Anope::string &who);
|
||||
@@ -280,9 +280,9 @@ public:
|
||||
virtual void SendServer(const Server *) = 0;
|
||||
virtual void SendSquit(Server *, const Anope::string &message);
|
||||
|
||||
virtual void SendNumericInternal(int numeric, const Anope::string &dest, const std::vector<Anope::string> ¶ms);
|
||||
virtual void SendNumericInternal(unsigned numeric, const Anope::string &dest, const std::vector<Anope::string> ¶ms);
|
||||
template <typename... Args>
|
||||
void SendNumeric(int numeric, const Anope::string &dest, Args &&...args)
|
||||
void SendNumeric(unsigned numeric, const Anope::string &dest, Args &&...args)
|
||||
{
|
||||
SendNumericInternal(numeric, dest, { Anope::ToString(args)... });
|
||||
}
|
||||
|
||||
+49
-13
@@ -7,8 +7,8 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Anope\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2025-09-29 12:59+0100\n"
|
||||
"PO-Revision-Date: 2025-09-29 13:00+0100\n"
|
||||
"POT-Creation-Date: 2025-10-21 11:13+0100\n"
|
||||
"PO-Revision-Date: 2025-10-21 11:13+0100\n"
|
||||
"Last-Translator: Sadie Powell <sadie@witchery.services>\n"
|
||||
"Language-Team: English\n"
|
||||
"Language: en_US\n"
|
||||
@@ -645,6 +645,9 @@ msgstr ""
|
||||
msgid "nickname new-password"
|
||||
msgstr ""
|
||||
|
||||
msgid "nickname timezone"
|
||||
msgstr ""
|
||||
|
||||
msgid "nickname [code]"
|
||||
msgstr ""
|
||||
|
||||
@@ -708,6 +711,9 @@ msgstr ""
|
||||
msgid "server [reason]"
|
||||
msgstr ""
|
||||
|
||||
msgid "timezone"
|
||||
msgstr ""
|
||||
|
||||
msgid "type parameters"
|
||||
msgstr ""
|
||||
|
||||
@@ -751,9 +757,6 @@ msgstr ""
|
||||
msgid "%2d %-16s letters: %s, words: %s, lines: %s, smileys: %s, actions: %s"
|
||||
msgstr ""
|
||||
|
||||
msgid "%b %d %Y %H:%M:%S %Z"
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "%c is an unknown status mode."
|
||||
msgstr ""
|
||||
@@ -888,6 +891,10 @@ msgstr ""
|
||||
msgid "%s (%s) was last seen quitting (%s) %s ago (%s)."
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "%s (ID: %zu)"
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "%s (minimum %d/%d%%)"
|
||||
msgstr ""
|
||||
@@ -1435,7 +1442,14 @@ msgstr ""
|
||||
msgid "All modes cleared on %s."
|
||||
msgstr ""
|
||||
|
||||
msgid "All new accounts must be validated by an administrator. Please wait for your registration to be confirmed."
|
||||
msgid "All new accounts must be confirmed by an administrator. Please wait for your registration to be confirmed."
|
||||
msgstr ""
|
||||
|
||||
msgid "All new accounts must be confirmed. To confirm your account, follow the instructions that were emailed to you."
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "All new accounts must be confirmed. To confirm your account, type %s."
|
||||
msgstr ""
|
||||
|
||||
msgid "All of your memos have been deleted."
|
||||
@@ -1783,6 +1797,10 @@ msgstr ""
|
||||
msgid "Available privileges for %s:"
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "Available timezones in the %s region:"
|
||||
msgstr ""
|
||||
|
||||
msgid "BANS enforced by "
|
||||
msgstr ""
|
||||
|
||||
@@ -2056,6 +2074,12 @@ msgstr ""
|
||||
msgid "Changes the successor of a channel. If the founder's nickname expires or is dropped while the channel is still registered, the successor will become the new founder of the channel. The successor's nickname must be a registered one. If there's no successor set, then the first nickname on the access list (with the highest access, if applicable) will become the new founder, but if the access list is empty, the channel will be dropped."
|
||||
msgstr ""
|
||||
|
||||
msgid "Changes the timezone services uses when sending messages to the given user (for example, when responding to a command they send). timezone should be chosen from an entry in one of the supported timezone regions:"
|
||||
msgstr ""
|
||||
|
||||
msgid "Changes the timezone services uses when sending messages to you (for example, when responding to a command you send). timezone should be chosen from an entry in one of the supported timezone regions:"
|
||||
msgstr ""
|
||||
|
||||
msgid "Changes when you will be notified about new memos (only for nicknames)"
|
||||
msgstr ""
|
||||
|
||||
@@ -3747,6 +3771,10 @@ msgstr ""
|
||||
msgid "Multiple languages matched %s. Please be more specific."
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "Multiple timezones matched %s. Please be more specific."
|
||||
msgstr ""
|
||||
|
||||
msgid "NOTICE: In order to register a channel, you must have first registered your nickname."
|
||||
msgstr ""
|
||||
|
||||
@@ -4752,6 +4780,9 @@ msgstr ""
|
||||
msgid "Set the successor for a channel"
|
||||
msgstr ""
|
||||
|
||||
msgid "Set the timezone services will use when messaging you"
|
||||
msgstr ""
|
||||
|
||||
msgid "Set the vhost for all nicks in an account"
|
||||
msgstr ""
|
||||
|
||||
@@ -5592,6 +5623,14 @@ msgstr ""
|
||||
msgid "This option prevents a bot from being assigned to a channel by users that aren't Services Operators."
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "Timezone changed to %s."
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "Timezone for %s changed to %s."
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "To delete, type: %s %d"
|
||||
msgstr ""
|
||||
@@ -5706,6 +5745,10 @@ msgstr ""
|
||||
msgid "Type %soption for more information on a specific option. The options will be set on the given nickname."
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "Type %sregion to list timezones for a region."
|
||||
msgstr ""
|
||||
|
||||
msgid "Un-Load a module"
|
||||
msgstr ""
|
||||
|
||||
@@ -6300,13 +6343,6 @@ msgstr ""
|
||||
msgid "Your account %s has been successfully created."
|
||||
msgstr ""
|
||||
|
||||
msgid "Your account is not confirmed. To confirm it, follow the instructions that were emailed to you."
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "Your account is not confirmed. To confirm it, type %s."
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "Your account will expire, if not confirmed, in %s."
|
||||
msgstr ""
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
+299
-37
@@ -7,8 +7,8 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Anope\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2025-08-02 23:10+0300\n"
|
||||
"PO-Revision-Date: 2025-08-26 12:37+0100\n"
|
||||
"POT-Creation-Date: 2025-10-21 11:39+0100\n"
|
||||
"PO-Revision-Date: 2025-10-21 11:42+0100\n"
|
||||
"Last-Translator: CaPaCuL <capacul@gmail.com>\n"
|
||||
"Language-Team: Turkish\n"
|
||||
"Language: tr_TR\n"
|
||||
@@ -344,6 +344,66 @@ msgstr "Kullanıcı erişim düzeyleri %s komutu kullanılarak görülebilir
|
||||
msgid "[auto-memo] The memo you sent to %s has been viewed."
|
||||
msgstr "[auto-memo] %s'e gönderdiğiniz not görüntülendi."
|
||||
|
||||
msgid "{host}: {session} sessions"
|
||||
msgstr "{host}: {session} oturum"
|
||||
|
||||
msgid "{mask}"
|
||||
msgstr "{mask}"
|
||||
|
||||
msgid "{mask} -- created by {creator}; {expires}"
|
||||
msgstr "{mask} -- oluşturan {creator}; {expires}"
|
||||
|
||||
msgid "{mask} -- created by {creator}; {expires} ({reason})"
|
||||
msgstr "{mask} -- oluşturan {creator}; {expires} ({reason})"
|
||||
|
||||
msgid "{mask} on {type} -- created by {creator}; expires in {expires}"
|
||||
msgstr "{mask} {type}'de -- oluşturan {creator}; {expires}'de sona eriyor"
|
||||
|
||||
msgid "{mask} on {type} -- created by {creator}; expires in {expires} ({reason})"
|
||||
msgstr "{mask} {type}'de -- oluşturan {creator}; {expires}'de sona eriyor ({reason})"
|
||||
|
||||
msgid "{name}"
|
||||
msgstr "{name}"
|
||||
|
||||
msgid "{name} ({description})"
|
||||
msgstr "{name} ({description})"
|
||||
|
||||
msgid "{name} ({mask}) [{realname}]"
|
||||
msgstr "{name} ({mask}) [{realname}]"
|
||||
|
||||
msgid "{name} -- {users} user(s); +{modes}"
|
||||
msgstr "{name} -- {users} kullanıcı(lar); +{modes}"
|
||||
|
||||
msgid "{name} -- {users} user(s); +{modes} ({topic})"
|
||||
msgstr "{name} -- {users} kullanıcı(lar); +{modes} ({topic})"
|
||||
|
||||
msgid "{name} = {level}"
|
||||
msgstr "{name} = {level}"
|
||||
|
||||
msgid "{name} = {value}"
|
||||
msgstr "{name} = {value}"
|
||||
|
||||
msgid "{name}: {description}"
|
||||
msgstr "{name}: {description}"
|
||||
|
||||
msgid "{nick}"
|
||||
msgstr "{nick}"
|
||||
|
||||
msgid "{nick} (last mask: {last_mask})"
|
||||
msgstr "{nick} (son maske: {last_mask})"
|
||||
|
||||
msgid "{nick} ({mask}) [{real_name}]"
|
||||
msgstr "{nick} ({mask}) [{real_name}]"
|
||||
|
||||
msgid "{nick}: registered on {registered}"
|
||||
msgstr "{nick}: {registered}'de kaydedildi"
|
||||
|
||||
msgid "{nick}: registered on {registered}; expires in {expires}"
|
||||
msgstr "{nick}: {registered}'de kaydedildi; {expires}'de sona eriyor"
|
||||
|
||||
msgid "{}{module_name}}:{name} = {value}"
|
||||
msgstr "{}{module_name}}:{name} = {value}"
|
||||
|
||||
msgid "[target] [password]"
|
||||
msgstr "[hedef] [şifre]"
|
||||
|
||||
@@ -587,6 +647,9 @@ msgstr "rumuz yeni-afiş"
|
||||
msgid "nickname new-password"
|
||||
msgstr "rumuz yeni-şifre"
|
||||
|
||||
msgid "nickname timezone"
|
||||
msgstr "rumuz saat-dilimi"
|
||||
|
||||
msgid "nickname [code]"
|
||||
msgstr "rumuz [kod]"
|
||||
|
||||
@@ -602,6 +665,9 @@ msgstr "rumuz [+sona-erme] [sebep]"
|
||||
msgid "nickname {EMAIL | STATUS | MASK | QUIT} {ON | OFF}"
|
||||
msgstr "rumuz {EMAIL | STATUS | USERMASK | QUIT} {ON | OFF}"
|
||||
|
||||
msgid "nickname {FIXED | FLEXIBLE | MONOSPACE}"
|
||||
msgstr "rumuz {FIXED | FLEXIBLE | MONOSPACE}"
|
||||
|
||||
msgid "nickname {ON | delay | OFF}"
|
||||
msgstr "rumuz {ON | gecikme | OFF}"
|
||||
|
||||
@@ -647,6 +713,9 @@ msgstr "sunucu [mesaj]"
|
||||
msgid "server [reason]"
|
||||
msgstr "sunucu [sebep]"
|
||||
|
||||
msgid "timezone"
|
||||
msgstr "saat-dilimi"
|
||||
|
||||
msgid "type parameters"
|
||||
msgstr "tip parametreler"
|
||||
|
||||
@@ -690,9 +759,6 @@ msgstr "%-8s %s"
|
||||
msgid "%2d %-16s letters: %s, words: %s, lines: %s, smileys: %s, actions: %s"
|
||||
msgstr "%2d %-16s harf: %s, kelime: %s, satır: %s, smiley: %s, eylem: %s"
|
||||
|
||||
msgid "%b %d %Y %H:%M:%S %Z"
|
||||
msgstr "%b %d %Y %H:%M:%S %Z"
|
||||
|
||||
#, c-format
|
||||
msgid "%c is an unknown status mode."
|
||||
msgstr "%c bilinmeyen bir durum modudur."
|
||||
@@ -931,10 +997,6 @@ msgstr "%s için memo yok."
|
||||
msgid "%s has no new memos."
|
||||
msgstr "%s için yeni memo yok."
|
||||
|
||||
#, c-format
|
||||
msgid "%s is %s"
|
||||
msgstr "%s gerçek adı: %s"
|
||||
|
||||
#, c-format
|
||||
msgid "%s is a Services Operator of type %s."
|
||||
msgstr "%s, %s türünde bir Servis Operatörü'dür."
|
||||
@@ -1273,9 +1335,6 @@ msgstr "Hesap"
|
||||
msgid "Account %s has already reached the maximum number of simultaneous logins (%u)."
|
||||
msgstr "%s hesabı zaten maksimum eşzamanlı oturum açma sayısına (%u) ulaştı."
|
||||
|
||||
msgid "Account id"
|
||||
msgstr "Hesap ID"
|
||||
|
||||
msgid "Account registered"
|
||||
msgstr "Hesap kaydedildi"
|
||||
|
||||
@@ -1351,7 +1410,6 @@ msgstr "Ek olarak, nickserv/confirm iznine sahip Servis Operatörleri, doğrul
|
||||
msgid "Additionally, Services Operators with the nickserv/drop/override permission can replace code with OVERRIDE to drop without a confirmation code."
|
||||
msgstr "Ek olarak, nickserv/drop/override iznine sahip Servis Operatörleri, onay kodu olmadan drop etmek için kod'u OVERRIDE ile değiştirebilir."
|
||||
|
||||
#: ../modules/nickserv/ns_register.cpp:428
|
||||
msgid "Additionally, Services Operators with the nickserv/resend permission can specify a nickname to resend a confirmation email for another account."
|
||||
msgstr "Ek olarak, nickserv/resend iznine sahip Servis Operatörleri, başka bir hesap için onay e-postasını yeniden göndermek üzere bir rumuz belirleyebilir."
|
||||
|
||||
@@ -1390,9 +1448,16 @@ msgstr "%s kanalına ait tüm memolar silindi."
|
||||
msgid "All modes cleared on %s."
|
||||
msgstr "%s tarihinde tüm memolar temizlendi."
|
||||
|
||||
msgid "All new accounts must be validated by an administrator. Please wait for your registration to be confirmed."
|
||||
msgid "All new accounts must be confirmed by an administrator. Please wait for your registration to be confirmed."
|
||||
msgstr "Tüm yeni hesapların bir yönetici tarafından doğrulanması gerekir. Lütfen kaydınızın onaylanmasını bekleyin."
|
||||
|
||||
msgid "All new accounts must be confirmed. To confirm your account, follow the instructions that were emailed to you."
|
||||
msgstr "E-posta adresiniz onaylanmadı. Onaylamak için size e-postayla gönderilen talimatları izleyin."
|
||||
|
||||
#, c-format
|
||||
msgid "All new accounts must be confirmed. To confirm your account, type %s."
|
||||
msgstr "Hesabınız onaylanmadı. Hesabınızı onaylamak için %s yazın."
|
||||
|
||||
msgid "All of your memos have been deleted."
|
||||
msgstr "Tüm memolarınız silindi."
|
||||
|
||||
@@ -1776,7 +1841,7 @@ msgstr "Belirtilen e-posta adresini rumuzla ilişkilendirir."
|
||||
msgid "Associates the given email address with your nickname. This address will be displayed whenever someone requests information on the nickname with the INFO command."
|
||||
msgstr "Belirtilen E-posta adresini rumuzunuzla ilişkilendirir. Bu adres, birisi INFO komutuyla rumuz hakkında bilgi istediğinde görüntülenecektir."
|
||||
|
||||
msgid "Auto-op"
|
||||
msgid "Auto op"
|
||||
msgstr "Oto-op"
|
||||
|
||||
#, c-format
|
||||
@@ -1812,6 +1877,10 @@ msgstr "Kullanılabilir oper-türleri:"
|
||||
msgid "Available privileges for %s:"
|
||||
msgstr "%s için kullanılabilir yetkiler:"
|
||||
|
||||
#, c-format
|
||||
msgid "Available timezones in the %s region:"
|
||||
msgstr "%s için kullanılabilir yetkiler:"
|
||||
|
||||
msgid "BANS enforced by "
|
||||
msgstr "BAN'lar, uygulayan: "
|
||||
|
||||
@@ -2001,9 +2070,6 @@ msgstr "Bot artık flood için kanaldan atmayacak."
|
||||
msgid "Bot won't kick for repeats anymore."
|
||||
msgstr "Bot artık repeats için kanaldan atmayacak."
|
||||
|
||||
msgid "By"
|
||||
msgstr "Sahibi"
|
||||
|
||||
msgid "CLEAR target"
|
||||
msgstr "CLEAR hedef"
|
||||
|
||||
@@ -2091,6 +2157,12 @@ msgstr "Rumuz sahibi olarak sizi tanımlamak için kullanılan şifreyi değişt
|
||||
msgid "Changes the successor of a channel. If the founder's nickname expires or is dropped while the channel is still registered, the successor will become the new founder of the channel. The successor's nickname must be a registered one. If there's no successor set, then the first nickname on the access list (with the highest access, if applicable) will become the new founder, but if the access list is empty, the channel will be dropped."
|
||||
msgstr "Bir kanalın vekilini değiştirir. Kurucunun rumuzunun geçerliliği sona ererse veya kanal kayıtlıyken silinirse, vekil, kanalın yeni kurucusu olacaktır. Vekilin rumuzu kayıtlı olmalıdır. Bir vekil ayarlanmadıysa, erişim listesindeki ilk rumuz (varsa en yüksek erişime sahip olan) yeni kurucu olur, ancak erişim listesi boşsa kanal düşürülür."
|
||||
|
||||
msgid "Changes the timezone services uses when sending messages to the given user (for example, when responding to a command they send). timezone should be chosen from an entry in one of the supported timezone regions:"
|
||||
msgstr "Belirli bir kullanıcıya mesaj gönderirken (örneğin, gönderdikleri bir komuta yanıt verirken) Servislerin kullandığı dili değiştirir. dil, aşağıdaki desteklenen diller listesinden seçilmelidir:"
|
||||
|
||||
msgid "Changes the timezone services uses when sending messages to you (for example, when responding to a command you send). timezone should be chosen from an entry in one of the supported timezone regions:"
|
||||
msgstr "Size mesaj gönderirken (örneğin, gönderdiğiniz bir komuta yanıt verirken) Servislerin kullandığı dili değiştirir. dil, aşağıdaki desteklenen diller listesinden seçilmelidir:"
|
||||
|
||||
msgid "Changes when you will be notified about new memos (only for nicknames)"
|
||||
msgstr "Yeni memolar hakkında ne zaman bildirim alacağınızı değiştirir (sadece rumuzlar için)"
|
||||
|
||||
@@ -2297,6 +2369,43 @@ msgstr "Repeat yapanları (tekrar tekrar yazma) atmayı yapılandırır"
|
||||
msgid "Configures reverses kicker"
|
||||
msgstr "Reverse yapanları atmayı yapılandırır"
|
||||
|
||||
msgid ""
|
||||
"Configures the layout used by the account for services messages.\n"
|
||||
"\n"
|
||||
"When the layout is set to FIXED services will use tables and position text such that it looks good in a client that uses a fixed-width font.\n"
|
||||
"\n"
|
||||
"When the layout is set to FLEXIBLE services will use an alternate format for messages and avoid any positioning that might be broken by a variable-width font.\n"
|
||||
"\n"
|
||||
"When the layout is set to MONOSPACE services will format messages similar to FIXED but will prefix all messages with a monospace formatting character to force it to display correctly. This requires client support for monospace text formatting."
|
||||
msgstr ""
|
||||
"Hesap tarafından servis mesajları için kullanılan şablonu yapılandırır.\n"
|
||||
"\n"
|
||||
"Şablon FIXED olarak ayarlandığında, servisler tabloları kullanır ve metni sabit genişlikte bir yazı tipi kullanan bir istemcide iyi görünecek şekilde konumlandırır.\n"
|
||||
"\n"
|
||||
"Şablon FLEXIBLE olarak ayarlandığında, servisler mesajlar için alternatif bir biçim kullanır ve değişken genişlikte bir yazı tipi tarafından bozulabilecek herhangi bir konumlandırmadan kaçınır.\n"
|
||||
"\n"
|
||||
"Şablon MONOSPACE olarak ayarlandığında, servisler mesajları FIXED'yebenzer şekilde biçimlendirir, ancak doğru görüntülenmesini sağlamak için tüm mesajların önüne tek aralıklı bir biçimlendirme karakteri ekler. Bu, istemcinin tek aralıklı metin biçimlendirmesini desteklemesini gerektirir."
|
||||
|
||||
msgid "Configures the layout used for services messages"
|
||||
msgstr "Servis mesajları için kullanılan şablonu yapılandırır"
|
||||
|
||||
msgid ""
|
||||
"Configures the layout used for services messages.\n"
|
||||
"\n"
|
||||
"When the layout is set to FIXED services will use tables and position text such that it looks good in a client that uses a fixed-width font.\n"
|
||||
"\n"
|
||||
"When the layout is set to FLEXIBLE services will use an alternate format for messages and avoid any positioning that might be broken by a variable-width font.\n"
|
||||
"\n"
|
||||
"When the layout is set to MONOSPACE services will format messages similar to FIXED but will prefix all messages with a monospace formatting character to force it to display correctly. This requires client support for monospace text formatting."
|
||||
msgstr ""
|
||||
"Servis mesajları için kullanılan şablonu yapılandırır.\n"
|
||||
"\n"
|
||||
"Şablon FIXED olarak ayarlandığında, servisler tabloları kullanır ve metni sabit genişlikte bir yazı tipi kullanan bir istemcide iyi görünecek şekilde konumlandırır.\n"
|
||||
"\n"
|
||||
"Şablon FLEXIBLE olarak ayarlandığında, servisler mesajlar için alternatif bir biçim kullanır ve değişken genişlikte bir yazı tipi tarafından bozulabilecek herhangi bir konumlandırmadan kaçınır.\n"
|
||||
"\n"
|
||||
"Şablon MONOSPACE olarak ayarlandığında, servisler mesajları FIXED'ye benzer şekilde biçimlendirir, ancak doğru görüntülenmesini sağlamak için tüm mesajların önüne tek aralıklı bir biçimlendirme karakteri ekler. Bu, istemcinin tek aralıklı metin biçimlendirmesini desteklemesini gerektirir."
|
||||
|
||||
msgid "Configures the time bot bans expire in"
|
||||
msgstr "Bot banlarının sona ereceği zamanı yapılandırır"
|
||||
|
||||
@@ -3019,6 +3128,9 @@ msgstr "%s parmak izi zaten %s'in sertifika listesinde mevcut."
|
||||
msgid "Fingerprint %s is already in use."
|
||||
msgstr "%s parmak izi zaten kullanımda."
|
||||
|
||||
msgid "Fixed layout"
|
||||
msgstr "Sabit şablon"
|
||||
|
||||
msgid "Flags"
|
||||
msgstr "Bayraklar"
|
||||
|
||||
@@ -3030,11 +3142,14 @@ msgstr "%s için olan %s üzerindeki bayraklar +%s olarak ayarlandı"
|
||||
msgid "Flags list for %s"
|
||||
msgstr "%s için bayrak listesi"
|
||||
|
||||
msgid "Flexible layout"
|
||||
msgstr "Esnek şablon"
|
||||
|
||||
msgid "Flood kicker"
|
||||
msgstr "Flood yazı atma"
|
||||
|
||||
msgid "Forbid allows you to forbid usage of certain nicknames, channels, and email addresses. Wildcards are accepted for all entries."
|
||||
msgstr "Bu forbid komutu, belirtilen rumuzların, kanalların ve e-posta adreslerinin kullanımını yasaklamanıza olanak tanır. Tüm girdilerde joker karakterler kabul edilir."
|
||||
msgstr "Forbid, belirli rumuzların, kanalların ve e-posta adreslerinin kullanımını yasaklamanıza olanak tanır. Tüm girdiler için joker karakterler kabul edilir."
|
||||
|
||||
msgid "Forbid list is empty."
|
||||
msgstr "Forbid listesi boş."
|
||||
@@ -3169,6 +3284,10 @@ msgstr "%s botu ile ilgili bilgiler:"
|
||||
msgid "Information about channel %s:"
|
||||
msgstr "%s kanalı ile ilgili bilgiler:"
|
||||
|
||||
#, c-format
|
||||
msgid "Information about nick %s:"
|
||||
msgstr "%s rumuzu ile ilgili bilgiler:"
|
||||
|
||||
#, c-format
|
||||
msgid "Invalid duration %s, using %d days."
|
||||
msgstr "Geçersiz süre %s, %d gün kullanılıyor."
|
||||
@@ -3288,6 +3407,18 @@ msgstr "Son başlık"
|
||||
msgid "Last used"
|
||||
msgstr "Son kullanım"
|
||||
|
||||
#, c-format
|
||||
msgid "Layout is now fixed for %s."
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "Layout is now flexible for %s."
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "Layout is now monospace for %s."
|
||||
msgstr ""
|
||||
|
||||
msgid "Level"
|
||||
msgstr "Seviye"
|
||||
|
||||
@@ -3637,7 +3768,7 @@ msgstr ""
|
||||
msgid ""
|
||||
"Maintains the bad words list for a channel. The bad words list determines which words are to be kicked when the bad words kicker is enabled. For more information, type %sKICK%s.\n"
|
||||
"\n"
|
||||
"The ADD command adds the given word to the bad words list. If SINGLE is specified, a kick will be done only if a user says the entire word. If START is specified, a kick will be done if a user says a word that starts with word. If END is specified, a kick will be done if a user says a word that ends with word. If you don't specify anything, a kick will be issued every time word is said by a user.\n"
|
||||
"The ADD command adds the given word to the bad words list. If SINGLE is specified, a kick will be done only if a user says the entire word. If START is specified, a kick will be done if a user says a word that starts with word. If END is specified, a kick will be done if a user says a word that ends with word. If you don't specify anything, a kick will be issued every time word is said by a user. This will be shown in the LIST output as ANY.\n"
|
||||
"\n"
|
||||
"The DEL command removes the given word from the bad words list. If a list of entry numbers is given, those entries are deleted. (See the example for LIST below.)\n"
|
||||
"\n"
|
||||
@@ -3892,12 +4023,19 @@ msgstr "Modül: %s Sürüm: %s Yazar: %s Yüklenme: %s"
|
||||
msgid "Module: %s [%s] [%s]"
|
||||
msgstr "Modül: %s [%s] [%s]"
|
||||
|
||||
msgid "Monospace layout"
|
||||
msgstr "Monospace şablonu"
|
||||
|
||||
#, c-format
|
||||
msgid "Multiple languages matched %s. Please be more specific."
|
||||
msgstr "Birden fazla dil eşleşti: %s. Lütfen daha spesifik olun."
|
||||
|
||||
#, c-format
|
||||
msgid "Multiple timezones matched %s. Please be more specific."
|
||||
msgstr "Birden fazla saat dilimi eşleşti: %s. Lütfen daha spesifik olun."
|
||||
|
||||
msgid "NOTICE: In order to register a channel, you must have first registered your nickname."
|
||||
msgstr "DİKKAT: Bir kanalı kaydetmek için, ilk önce rumuzunuzu kaydettirdiniz."
|
||||
msgstr "DİKKAT: Bir kanalı kaydetmek için, ilk önce rumuzunuzu kaydetmelisiniz."
|
||||
|
||||
msgid "Name"
|
||||
msgstr "Adı"
|
||||
@@ -3912,8 +4050,8 @@ msgstr "%s için ağ istatistikleri:"
|
||||
msgid "Never"
|
||||
msgstr "Hiç"
|
||||
|
||||
msgid "Never-op"
|
||||
msgstr "Hiç"
|
||||
msgid "Never op"
|
||||
msgstr "Hiç op değil"
|
||||
|
||||
msgid "Nick"
|
||||
msgstr "Rumuz"
|
||||
@@ -4035,7 +4173,6 @@ msgstr "Oto-Op yok"
|
||||
msgid "No bot"
|
||||
msgstr "Bot yok"
|
||||
|
||||
#: ../modules/chanserv/cs_set.cpp:1336 ../modules/nickserv/ns_set.cpp:651
|
||||
msgid "No expiry"
|
||||
msgstr "Sona erme yok"
|
||||
|
||||
@@ -4663,7 +4800,7 @@ msgstr "Bayrak sistemi hakkında detaylı bilgi için %s komut çıktısına b
|
||||
|
||||
#, c-format
|
||||
msgid "See the %s command (%sACCESS) for information on giving a subset of these privileges to other channel users."
|
||||
msgstr "Bu ayrıcalıkların bir alt kümesini diğer kanal kullanıcılarına verme hakkında bilgi için %s komutuna (%sACCESS) bakın."
|
||||
msgstr "Bu ayrıcalıkların bir alt kümesini diğer kanal kullanıcılarına verme hakkında bilgi için %s komutuna (%s HELP ACCESS) bakın."
|
||||
|
||||
msgid "Send a memo to a nick or channel"
|
||||
msgstr "Bir rumuza veya kanala memo gönderme"
|
||||
@@ -4763,6 +4900,9 @@ msgstr "%s sunucusu havuzda toplanmamış."
|
||||
msgid "Server %s must be quit before it can be deleted."
|
||||
msgstr "Silinebilmesi için %s sunucusundan çıkılmalıdır."
|
||||
|
||||
msgid "Server: {server} = {ip} -- limit: {limit}; state: {state}"
|
||||
msgstr "Sunucu: {server} = {ip} -- limit: {limit}; durum: {state}"
|
||||
|
||||
msgid "Servers"
|
||||
msgstr "Sunucular"
|
||||
|
||||
@@ -4911,6 +5051,9 @@ msgstr "Rumuz şifresini ayarlayın"
|
||||
msgid "Set the successor for a channel"
|
||||
msgstr "Bir kanalın successorını (vekilini) ayarlama"
|
||||
|
||||
msgid "Set the timezone services will use when messaging you"
|
||||
msgstr "Servislerin size mesaj gönderirken kullanacağı dili ayarlayın"
|
||||
|
||||
msgid "Set the vhost for all nicks in an account"
|
||||
msgstr "Bir hesaptaki tüm rumuzların vhostunu ayarlayın"
|
||||
|
||||
@@ -5296,7 +5439,7 @@ msgstr ""
|
||||
"\n"
|
||||
"HARD eklenmesi kullanıcının sınırı değiştirmesini engeller. HARD'ı eklememek ters etkiye neden olur ve kullanıcının sınırı değiştirmesine olanak tanır (önceden bir sınır HARD ile ayarlanmış olsa bile).\n"
|
||||
"\n"
|
||||
"SETLIMIT komutunun bu kullanımı Servis Operatörleri ile sınırlıdır. Diğer kullanıcılar sadece kendileri veya bu ayrıcalıklara sahip oldukları kanal için limit girebilir, limitini kaldıramaz, %d'nin üzerinde limit belirleyemez, HARD limit belirleyemez."
|
||||
"SET LIMIT komutunun bu kullanımı Servis Operatörleri ile sınırlıdır. Diğer kullanıcılar sadece kendileri veya bu ayrıcalıklara sahip oldukları kanal için limit girebilir, limitini kaldıramaz, %d'nin üzerinde limit belirleyemez, HARD limit belirleyemez."
|
||||
|
||||
#, c-format
|
||||
msgid ""
|
||||
@@ -5588,7 +5731,6 @@ msgstr "AKILL listesi temizlendi."
|
||||
msgid "The Defcon level is now at: %d"
|
||||
msgstr "Defcon seviyesi şu anda: %d"
|
||||
|
||||
#: ../modules/nickserv/ns_register.cpp:409
|
||||
#, c-format
|
||||
msgid "The confirmation code for %s has been re-sent to %s."
|
||||
msgstr "%s için onay kodu %s adresine yeniden gönderildi."
|
||||
@@ -5909,7 +6051,6 @@ msgstr "Bu komut, rumuzunuzun veya belirtilmişse belirtilen rumuzun, içinde bu
|
||||
msgid "This command unloads the module named modname."
|
||||
msgstr "Bu komut mod-adı adlı modülü kaldırır."
|
||||
|
||||
#: ../modules/nickserv/ns_register.cpp:422
|
||||
msgid "This command will resend a registration confirmation email."
|
||||
msgstr "Bu komut size kayıt onay e-postasını tekrar gönderecektir."
|
||||
|
||||
@@ -5938,6 +6079,14 @@ msgstr "Bu seçenek bir kanalı atanamaz hale getirir. Kanala zaten bir bot atan
|
||||
msgid "This option prevents a bot from being assigned to a channel by users that aren't Services Operators."
|
||||
msgstr "Bu seçenek, bir botun Servis Operatörü olmayan kullanıcılar tarafından bir kanala atanmasını engeller."
|
||||
|
||||
#, c-format
|
||||
msgid "Timezone changed to %s."
|
||||
msgstr "Dil %s olarak değiştirildi."
|
||||
|
||||
#, c-format
|
||||
msgid "Timezone for %s changed to %s."
|
||||
msgstr "%s için dil %s olarak değiştirildi."
|
||||
|
||||
#, c-format
|
||||
msgid "To delete, type: %s %d"
|
||||
msgstr "Silmek için şunu yazın: %s %d"
|
||||
@@ -6057,6 +6206,10 @@ msgstr ""
|
||||
msgid "Type %soption for more information on a specific option. The options will be set on the given nickname."
|
||||
msgstr "Belirli bir seçenek hakkında daha fazla bilgi için %sseçenek yazın. Seçenekler belirtilen rumuz'a göre ayarlanacaktır."
|
||||
|
||||
#, c-format
|
||||
msgid "Type %sregion to list timezones for a region."
|
||||
msgstr "Bir bölgenin saat dilimlerini listelemek için %sregion yazın."
|
||||
|
||||
msgid "Un-Load a module"
|
||||
msgstr "Bir modülün yüklemesini kaldır"
|
||||
|
||||
@@ -6064,6 +6217,10 @@ msgstr "Bir modülün yüklemesini kaldır"
|
||||
msgid "Unable to find regex engine %s."
|
||||
msgstr "%s regex motoru bulunamadı."
|
||||
|
||||
#, c-format
|
||||
msgid "Unable to find the DNS record required to validate %s. If you have not already done this add a TXT record for %s with the value %s and re-execute this command."
|
||||
msgstr "%s doğrulaması için gereken DNS kaydı bulunamadı. Bunu daha önce yapmadıysanız, %s için %s değerine sahip bir TXT kaydı ekleyin ve bu komutu yeniden çalıştırın."
|
||||
|
||||
#, c-format
|
||||
msgid "Unable to load module %s."
|
||||
msgstr "%s modülü yüklenemiyor."
|
||||
@@ -6222,6 +6379,10 @@ msgstr "%s için olan vHost etkinleştirildi."
|
||||
msgid "VHost for %s has been rejected."
|
||||
msgstr "%s için olan vHost reddedildi."
|
||||
|
||||
#, c-format
|
||||
msgid "VHost for %s has been validated using DNS."
|
||||
msgstr "%s için olan vHost DNS kullnılarak doğrulandı."
|
||||
|
||||
#, c-format
|
||||
msgid "VHost for account %s set to %s."
|
||||
msgstr "%s hesabı için vHost, %s olarak ayarlandı."
|
||||
@@ -6239,6 +6400,12 @@ msgstr "VIEW [maske | liste | id]"
|
||||
msgid "VIEW [mask | list]"
|
||||
msgstr "VIEW [maske | liste]"
|
||||
|
||||
msgid "Validates a previously requested vhost using DNS"
|
||||
msgstr "Daha önce talep edilen bir vhostu DNS kullanarak doğrular"
|
||||
|
||||
msgid "Validates a previously requested vhost using DNS. If you own the domain you have requested as a vhost you can validate your ownership of it using a DNS TXT record to approve your own vhost."
|
||||
msgstr "Daha önce talep edilen bir vhostu DNS kullanarak doğrular. vHost olarak talep ettiğiniz alan adı size aitse, kendi vhostunuzu onaylamak için bir DNS TXT kaydı kullanarak sahipliğinizi doğrulayabilirsiniz."
|
||||
|
||||
msgid "Value"
|
||||
msgstr "Değer"
|
||||
|
||||
@@ -6588,6 +6755,10 @@ msgstr "Şimdi rumuzunuz için bir e-posta girmelisiniz. Bu e-posta, unutmanız
|
||||
msgid "You must wait %s before registering your nick."
|
||||
msgstr "Rumuzunuzu kaydetmeden önce %s beklemelisiniz."
|
||||
|
||||
#, c-format
|
||||
msgid "You must wait for %s before trying DNS validation again."
|
||||
msgstr "Rumuzunuzu kaydetmeden önce %s beklemelisiniz."
|
||||
|
||||
msgid "You need to be identified to use this command."
|
||||
msgstr "Bu komutu kullanabilmeniz için kendinizi tanıtmanız gerekmektedir."
|
||||
|
||||
@@ -6659,13 +6830,6 @@ msgstr "SSL sertifika parmak iziniz %s otomatik olarak sertifika listenize ekl
|
||||
msgid "Your account %s has been successfully created."
|
||||
msgstr "Hesabınız %s başarıyla oluşturuldu."
|
||||
|
||||
msgid "Your account is not confirmed. To confirm it, follow the instructions that were emailed to you."
|
||||
msgstr "E-posta adresiniz onaylanmadı. Onaylamak için size e-postayla gönderilen talimatları izleyin."
|
||||
|
||||
#, c-format
|
||||
msgid "Your account is not confirmed. To confirm it, type %s."
|
||||
msgstr "Hesabınız onaylanmadı. Hesabınızı onaylamak için %s yazın."
|
||||
|
||||
#, c-format
|
||||
msgid "Your account will expire, if not confirmed, in %s."
|
||||
msgstr "Hesabınız onaylanmadığı takdirde %s içinde sona erecek."
|
||||
@@ -6750,8 +6914,16 @@ msgstr "Talep ettiğiniz vHost reddedildi."
|
||||
msgid "Your requested vhost has been rejected. Reason: %s"
|
||||
msgstr "Talep ettiğiniz vHost reddedildi. Sebep: %s"
|
||||
|
||||
msgid "Your vhost has been requested."
|
||||
msgstr "VHost'unuz talep edildi."
|
||||
msgid "Your requested vhost has been validated via DNS."
|
||||
msgstr "Talep ettiğiniz vHost kabul edildi."
|
||||
|
||||
#, c-format
|
||||
msgid "Your vhost %s has been requested."
|
||||
msgstr "VHost'unuz %s talep edildi."
|
||||
|
||||
#, c-format
|
||||
msgid "Your vhost %s has been requested. If the requested vhost is for a valid DNS name you can add a TXT record for %s with the value %s and automatically approve your vhost using %s."
|
||||
msgstr "Vhost'unuz %s talep edildi. Talep edilen vhost geçerli bir DNS adına aitse, %s için %s değerine sahip bir TXT kaydı ekleyebilir ve vhost'unuzu %s kullanarak otomatik olarak onaylayabilirsiniz."
|
||||
|
||||
#, c-format
|
||||
msgid "Your vhost of %s is now activated."
|
||||
@@ -6775,6 +6947,12 @@ msgstr "%s bölgesi mevcut değil."
|
||||
msgid "Zone %s removed."
|
||||
msgstr "%s bölgesi kaldırıldı."
|
||||
|
||||
msgid "Zone: {zone}"
|
||||
msgstr "Bölge: {zone}"
|
||||
|
||||
msgid "Zone: {zone} = {servers}"
|
||||
msgstr "Bölge: {zone} = {servers}"
|
||||
|
||||
msgid "[1|2|3|4|5]"
|
||||
msgstr "[1|2|3|4|5]"
|
||||
|
||||
@@ -6908,3 +7086,87 @@ msgstr "{rumuz | kanal} memo-metni"
|
||||
|
||||
msgid "{ON | delay | OFF}"
|
||||
msgstr "{ON | gecikme | OFF}"
|
||||
|
||||
msgid "{mode} -- created by {creator} on {created}"
|
||||
msgstr "{mode} -- {created}'de oluşturan {creator}"
|
||||
|
||||
msgid "{mode} {param} -- created by {creator} on {created}"
|
||||
msgstr "{mode} {param} -- {created}'de oluşturan {creator}"
|
||||
|
||||
msgid "{number}: {channel}"
|
||||
msgstr "{number}: {channel}"
|
||||
|
||||
msgid "{number}: {channel} (key: {key})"
|
||||
msgstr "{number}: {channel} (anahtar: {key})"
|
||||
|
||||
msgid "{number}: {channel} = {access}"
|
||||
msgstr "{number}: {channel} = {access}"
|
||||
|
||||
msgid "{number}: {channel} = {access} ({description})"
|
||||
msgstr "{number}: {channel} = {access} ({description})"
|
||||
|
||||
msgid "{number}: {mask}"
|
||||
msgstr "{number}: {mask}"
|
||||
|
||||
msgid "{number}: {mask} ({description})"
|
||||
msgstr "{number}: {mask} ({description})"
|
||||
|
||||
msgid "{number}: {mask} ({reason})"
|
||||
msgstr "{number}: {mask} ({reason})"
|
||||
|
||||
msgid "{number}: {mask} -- added by {creator} on {created}; last used: {last_used}"
|
||||
msgstr "{number}: {mask} -- {created}'de ekleyen {creator}; son kullanım: {last_used}"
|
||||
|
||||
msgid "{number}: {mask} -- added by {creator} on {created}; last used: {last_used} ({reason})"
|
||||
msgstr "{number}: {mask} -- {created}'de ekleyen {creator}; son kullanım: {last_used}({reason})"
|
||||
|
||||
msgid "{number}: {mask} -- created by {creator} on {created}; {expires} ({reason})"
|
||||
msgstr "{number}: {mask} -- {created}'de ekleyen {creator}; {expires} ({reason})"
|
||||
|
||||
msgid "{number}: {mask} -- {limit} sessions ({reason})"
|
||||
msgstr "{number}: {mask} -- {limit} oturum ({reason})"
|
||||
|
||||
msgid "{number}: {mask} -- {limit} sessions; created by {creator} on {created}; {expires} ({reason})"
|
||||
msgstr "{number}: {mask} -- {limit} oturum; {created}'de ekleyen {creator}; {expires} ({reason})"
|
||||
|
||||
msgid "{number}: {mask} = {flags} -- added by {creator} at {created}"
|
||||
msgstr "{number}: {mask} = {flags} -- {created}'de ekleyen {creator}"
|
||||
|
||||
msgid "{number}: {mask} = {flags} -- added by {creator} at {created} ({description})"
|
||||
msgstr "{number}: {mask} = {flags} -- {created}'de ekleyen {creator} ({description})"
|
||||
|
||||
msgid "{number}: {mask} = {level}"
|
||||
msgstr "{number}: {mask} = {level}"
|
||||
|
||||
msgid "{number}: {mask} = {level} ({description})"
|
||||
msgstr "{number}: {mask} = {level} ({description})"
|
||||
|
||||
msgid "{number}: {mask} = {level} -- created by {creator}; last seen {last_seen}"
|
||||
msgstr "{number}: {mask} = {level} -- oluşturan {creator}; son görülme {last_seen}"
|
||||
|
||||
msgid "{number}: {mask} = {level} -- created by {creator}; last seen {last_seen} ({description})"
|
||||
msgstr "{number}: {mask} = {level} -- oluşturan {creator}; son görülme {last_seen} ({description})"
|
||||
|
||||
msgid "{number}: {nick} = {vhost} -- created by {creator} at {created}"
|
||||
msgstr "{number}: {nick} = {vhost} -- {created}'de oluşturan {creator}"
|
||||
|
||||
msgid "{number}: {word} -- type: {type}"
|
||||
msgstr "{number}: {word} -- tip: {type}"
|
||||
|
||||
msgid "{number}: [{id}] {mask} -- created by {creator} on {created}; {expires} ({reason})"
|
||||
msgstr "{number}: [{id}] {mask} -- {created}'de oluşturan {creator}; {expires} ({reason})"
|
||||
|
||||
msgid "{number}: sent by {sender} at {date/time}"
|
||||
msgstr "{number}: {date/time}'de gönderen {sender}"
|
||||
|
||||
msgid "{number}: {command} on {service}: {method}"
|
||||
msgstr "{number}: {service}'de {command}: {method}"
|
||||
|
||||
msgid "{number}: {message}"
|
||||
msgstr "{number}: {message}"
|
||||
|
||||
msgid "{number}: {message} -- created by {creator} at {created}"
|
||||
msgstr "{number}: {message} -- {created}'de oluşturan {creator}"
|
||||
|
||||
msgid "{number}: {text} -- created by {creator} on {created}"
|
||||
msgstr "{number}: {text} -- {created}'de oluşturan {creator}"
|
||||
|
||||
+9
-35
@@ -36,7 +36,7 @@ macro(build_modules SRC)
|
||||
if(NOT ${SRC} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR} AND EXISTS "${SRC}/CMakeLists.txt")
|
||||
add_subdirectory("${SRC}")
|
||||
else()
|
||||
file(GLOB MODULES_SRCS "${SRC}/*")
|
||||
file(GLOB MODULES_SRCS CONFIGURE_DEPENDS "${SRC}/*")
|
||||
foreach(MODULE_SRC ${MODULES_SRCS})
|
||||
if(IS_DIRECTORY "${MODULE_SRC}")
|
||||
build_modules("${MODULE_SRC}")
|
||||
@@ -52,12 +52,6 @@ macro(build_modules SRC)
|
||||
file(RELATIVE_PATH FNAME ${SRC} ${MODULE_SRC})
|
||||
# Convert the real source file extension to have a library extension
|
||||
string(REGEX REPLACE "\\.cpp$" "${CMAKE_SHARED_LIBRARY_SUFFIX}" SO ${FNAME})
|
||||
# Reset linker flags
|
||||
set(TEMP_LDFLAGS)
|
||||
# Reset extra dependencies
|
||||
set(TEMP_DEPENDENCIES)
|
||||
# Calculate the library dependencies for the given source file
|
||||
calculate_libraries(${MODULE_SRC} TEMP_LDFLAGS 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)
|
||||
@@ -66,6 +60,8 @@ macro(build_modules SRC)
|
||||
endif()
|
||||
# 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})
|
||||
# Execute inline CMake code for the module
|
||||
inline_cmake(${SO} ${MODULE_SRC})
|
||||
# Windows requires this because it's weird
|
||||
if(WIN32)
|
||||
set(WIN32_NO_LIBS "/nodefaultlib:\"libcmt.lib\" /OPT:NOREF")
|
||||
@@ -77,7 +73,7 @@ macro(build_modules SRC)
|
||||
FOLDER "Modules"
|
||||
INSTALL_RPATH_USE_LINK_PATH ON
|
||||
LINKER_LANGUAGE CXX
|
||||
LINK_FLAGS "${TEMP_LDFLAGS} ${WIN32_NO_LIBS}"
|
||||
LINK_FLAGS "${WIN32_NO_LIBS}"
|
||||
PREFIX ""
|
||||
SUFFIX ""
|
||||
)
|
||||
@@ -85,13 +81,12 @@ macro(build_modules SRC)
|
||||
if(HAVE_LOCALIZATION)
|
||||
add_dependencies(${SO} module_language)
|
||||
endif()
|
||||
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})
|
||||
target_link_libraries(${SO} PUBLIC ${PROGRAM_NAME} wsock32 Ws2_32 ${WIN32_MEMORY})
|
||||
set_target_properties(${PROGRAM_NAME} PROPERTIES VERSION "${VERSION_DOTTED}")
|
||||
elseif(APPLE)
|
||||
target_link_libraries(${SO} ${PROGRAM_NAME})
|
||||
target_link_libraries(${SO} PUBLIC ${PROGRAM_NAME})
|
||||
endif()
|
||||
# Set the module to be installed to the module directory under the data directory
|
||||
install(TARGETS ${SO}
|
||||
@@ -104,7 +99,7 @@ macro(build_modules SRC)
|
||||
endmacro()
|
||||
|
||||
macro(build_subdir)
|
||||
file(GLOB_RECURSE MODULES_SUBDIR_SRCS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.cpp")
|
||||
file(GLOB_RECURSE MODULES_SUBDIR_SRCS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} CONFIGURE_DEPENDS "*.cpp")
|
||||
list(SORT MODULES_SUBDIR_SRCS)
|
||||
|
||||
GET_FILENAME_COMPONENT(FOLDER_NAME ${CMAKE_CURRENT_SOURCE_DIR} NAME)
|
||||
@@ -113,31 +108,11 @@ 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}")
|
||||
|
||||
# Iterate through the source files in the subdirectory
|
||||
foreach(SRC ${MODULES_SUBDIR_SRCS})
|
||||
# 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)
|
||||
list(APPEND SUBDIR_EXTRA_DEPENDS ${TEMP_DEPENDENCIES})
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
# Remove duplicates from the linker flags
|
||||
if(SUBDIR_LDFLAGS)
|
||||
list(REMOVE_DUPLICATES SUBDIR_LDFLAGS)
|
||||
endif()
|
||||
|
||||
# Remove duplicates from the extra dependencies
|
||||
if(SUBDIR_EXTRA_DEPENDS)
|
||||
list(REMOVE_DUPLICATES SUBDIR_EXTRA_DEPENDS)
|
||||
endif()
|
||||
|
||||
# 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)
|
||||
@@ -160,13 +135,12 @@ macro(build_subdir)
|
||||
if(HAVE_LOCALIZATION)
|
||||
add_dependencies(${SO} module_language)
|
||||
endif()
|
||||
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})
|
||||
target_link_libraries(${SO} PUBLIC ${PROGRAM_NAME} PUBLIC wsock32 Ws2_32 ${WIN32_MEMORY})
|
||||
set_target_properties(${PROGRAM_NAME} PROPERTIES VERSION "${VERSION_DOTTED}")
|
||||
elseif(APPLE)
|
||||
target_link_libraries(${SO} ${PROGRAM_NAME})
|
||||
target_link_libraries(${SO} PUBLIC ${PROGRAM_NAME})
|
||||
endif()
|
||||
|
||||
# Set the module to be installed to the module directory under the data directory
|
||||
|
||||
@@ -88,7 +88,6 @@ private:
|
||||
source.Reply(_("%s!%s@%s (%s) added to the bot list."), bi->nick.c_str(), bi->GetIdent().c_str(), bi->host.c_str(), bi->realname.c_str());
|
||||
|
||||
FOREACH_MOD(OnBotCreate, (bi));
|
||||
return;
|
||||
}
|
||||
|
||||
void DoChange(CommandSource &source, const std::vector<Anope::string> ¶ms)
|
||||
@@ -227,7 +226,6 @@ private:
|
||||
Log(LOG_ADMIN, source, this) << "CHANGE " << oldnick << " to " << bi->GetMask() << " " << bi->realname;
|
||||
|
||||
FOREACH_MOD(OnBotChange, (bi));
|
||||
return;
|
||||
}
|
||||
|
||||
void DoDel(CommandSource &source, const std::vector<Anope::string> ¶ms)
|
||||
@@ -259,7 +257,6 @@ private:
|
||||
|
||||
source.Reply(_("Bot \002%s\002 has been deleted."), nick.c_str());
|
||||
delete bi;
|
||||
return;
|
||||
}
|
||||
public:
|
||||
CommandBSBot(Module *creator) : Command(creator, "botserv/bot", 1, 6)
|
||||
@@ -339,8 +336,6 @@ public:
|
||||
}
|
||||
else
|
||||
this->OnSyntaxError(source, "");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand) override
|
||||
|
||||
@@ -382,8 +382,6 @@ private:
|
||||
|
||||
source.Reply(_("\002%s\002 not found on %s access list."), mask.c_str(), ci->name.c_str());
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void ProcessList(CommandSource &source, ChannelInfo *ci, const std::vector<Anope::string> ¶ms, ListFormatter &list)
|
||||
@@ -439,8 +437,6 @@ private:
|
||||
list.SendTo(source);
|
||||
source.Reply(_("End of access list"));
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void DoList(CommandSource &source, ChannelInfo *ci, const std::vector<Anope::string> ¶ms)
|
||||
@@ -498,8 +494,6 @@ private:
|
||||
bool override = !source.IsFounder(ci);
|
||||
Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "to clear the access list";
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
public:
|
||||
@@ -567,8 +561,6 @@ public:
|
||||
this->DoClear(source, ci);
|
||||
else
|
||||
this->OnSyntaxError(source, "");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand) override
|
||||
@@ -765,7 +757,6 @@ class CommandCSLevels final
|
||||
FOREACH_MOD(OnLevelChange, (source, ci, "ALL", 0));
|
||||
|
||||
source.Reply(_("Access levels for \002%s\002 reset to defaults."), ci->name.c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
public:
|
||||
@@ -818,8 +809,6 @@ public:
|
||||
this->DoReset(source, ci);
|
||||
else
|
||||
this->OnSyntaxError(source, "");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand) override
|
||||
|
||||
@@ -499,8 +499,6 @@ public:
|
||||
this->DoClear(source, ci);
|
||||
else
|
||||
this->OnSyntaxError(source, "");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand) override
|
||||
|
||||
@@ -296,12 +296,21 @@ public:
|
||||
if (!messages)
|
||||
return;
|
||||
|
||||
const auto timestamp = Config->GetModule(this).Get<bool>("timestamp", "yes");
|
||||
for (const auto &message : *(*messages))
|
||||
{
|
||||
Anope::map<Anope::string> tags;
|
||||
if (timestamp)
|
||||
{
|
||||
char timebuf[32];
|
||||
strftime(timebuf, sizeof(timebuf), "%Y-%m-%dT%H:%M:%S.000Z", gmtime(&message->when));
|
||||
tags["time"] = timebuf;
|
||||
}
|
||||
|
||||
if (u->ShouldPrivmsg())
|
||||
IRCD->SendContextPrivmsg(c->ci->WhoSends(), u, c, message->message);
|
||||
IRCD->SendContextPrivmsg(c->ci->WhoSends(), u, c, message->message, tags);
|
||||
else
|
||||
IRCD->SendContextNotice(c->ci->WhoSends(), u, c, message->message);
|
||||
IRCD->SendContextNotice(c->ci->WhoSends(), u, c, message->message, tags);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -377,8 +377,6 @@ class CommandCSFlags final
|
||||
bool override = !source.IsFounder(ci);
|
||||
Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "to clear the access list";
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
@@ -229,8 +229,6 @@ public:
|
||||
}
|
||||
else
|
||||
this->OnSyntaxError(source, "PRIVATE");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
bool OnHelp(CommandSource &source, const Anope::string &) override
|
||||
|
||||
@@ -253,8 +253,6 @@ public:
|
||||
Log(source.AccessFor(ci).HasPriv("SET") ? LOG_COMMAND : LOG_OVERRIDE, source, this, ci) << "to unset the description";
|
||||
source.Reply(_("Description of %s unset."), ci->name.c_str());
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
bool OnHelp(CommandSource &source, const Anope::string &) override
|
||||
@@ -331,8 +329,6 @@ public:
|
||||
ci->SetFounder(nc);
|
||||
|
||||
source.Reply(_("Founder of \002%s\002 changed to \002%s\002."), ci->name.c_str(), na->nick.c_str());
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
bool OnHelp(CommandSource &source, const Anope::string &) override
|
||||
@@ -465,8 +461,6 @@ public:
|
||||
}
|
||||
else
|
||||
this->OnSyntaxError(source, "PEACE");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
bool OnHelp(CommandSource &source, const Anope::string &) override
|
||||
@@ -1004,8 +998,6 @@ public:
|
||||
source.Reply(_("Successor for \002%s\002 changed to \002%s\002."), ci->name.c_str(), nc->display.c_str());
|
||||
else
|
||||
source.Reply(_("Successor for \002%s\002 unset."), ci->name.c_str());
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
bool OnHelp(CommandSource &source, const Anope::string &) override
|
||||
@@ -1084,8 +1076,6 @@ public:
|
||||
}
|
||||
else
|
||||
this->OnSyntaxError(source, "NOEXPIRE");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
bool OnHelp(CommandSource &source, const Anope::string &) override
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
static Module *me;
|
||||
|
||||
static Anope::map<Anope::string> descriptions;
|
||||
static Anope::map<uint16_t> numerics;
|
||||
static Anope::map<unsigned> numerics;
|
||||
|
||||
struct CSMiscData;
|
||||
static Anope::map<ExtensibleItem<CSMiscData> *> items;
|
||||
|
||||
@@ -195,8 +195,6 @@ public:
|
||||
source.Reply(_("Channel \002%s\002 is now released."), ci->name.c_str());
|
||||
|
||||
FOREACH_MOD(OnChanUnsuspend, (ci));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand) override
|
||||
|
||||
@@ -8,8 +8,14 @@
|
||||
*
|
||||
*/
|
||||
|
||||
/* RequiredLibraries: argon2 */
|
||||
/* RequiredWindowsLibraries: argon2 */
|
||||
/// BEGIN CMAKE
|
||||
/// if(WIN32)
|
||||
/// target_link_libraries(${SO} PRIVATE CONAN_PKG::argon2)
|
||||
/// else()
|
||||
/// pkg_check_modules("ARGON2" IMPORTED_TARGET REQUIRED "libargon2")
|
||||
/// target_link_libraries(${SO} PRIVATE PkgConfig::ARGON2)
|
||||
/// endif()
|
||||
/// END CMAKE
|
||||
|
||||
#include <climits>
|
||||
#include <random>
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
/* RequiredLibraries: crypt */
|
||||
|
||||
#include "module.h"
|
||||
|
||||
class EPOSIX final
|
||||
|
||||
@@ -9,7 +9,12 @@
|
||||
* Based on the original code of Services by Andy Church.
|
||||
*/
|
||||
|
||||
/* RequiredLibraries: ldap_r|ldap,lber */
|
||||
/// BEGIN CMAKE
|
||||
/// if(NOT WIN32)
|
||||
/// pkg_check_modules("OPENLDAP" IMPORTED_TARGET REQUIRED "lber" "ldap")
|
||||
/// target_link_libraries(${SO} PRIVATE PkgConfig::OPENLDAP)
|
||||
/// endif()
|
||||
/// END CMAKE
|
||||
|
||||
#include "module.h"
|
||||
#include "modules/ldap.h"
|
||||
|
||||
@@ -6,8 +6,14 @@
|
||||
* Please read COPYING and README for further details.
|
||||
*/
|
||||
|
||||
/* RequiredLibraries: mysqlclient */
|
||||
/* RequiredWindowsLibraries: libmysql */
|
||||
/// BEGIN CMAKE
|
||||
/// if(WIN32)
|
||||
/// target_link_libraries(${SO} PRIVATE CONAN_PKG::libmysqlclient)
|
||||
/// else()
|
||||
/// pkg_search_module("MYSQL" IMPORTED_TARGET REQUIRED "mysqlclient" "mariadb")
|
||||
/// target_link_libraries(${SO} PRIVATE PkgConfig::MYSQL)
|
||||
/// endif()
|
||||
/// END CMAKE
|
||||
|
||||
#include "module.h"
|
||||
#include "modules/sql.h"
|
||||
|
||||
@@ -6,8 +6,14 @@
|
||||
* Please read COPYING and README for further details.
|
||||
*/
|
||||
|
||||
/* RequiredLibraries: pcre2-8 */
|
||||
/* RequiredWindowsLibraries: pcre2-8 */
|
||||
/// BEGIN CMAKE
|
||||
/// if(WIN32)
|
||||
/// target_link_libraries(${SO} PRIVATE CONAN_PKG::pcre2)
|
||||
/// else()
|
||||
/// pkg_check_modules("PCRE2" IMPORTED_TARGET REQUIRED "libpcre2-8")
|
||||
/// target_link_libraries(${SO} PRIVATE PkgConfig::PCRE2)
|
||||
/// endif()
|
||||
/// END CMAKE
|
||||
|
||||
#include "module.h"
|
||||
|
||||
|
||||
@@ -6,7 +6,10 @@
|
||||
* Please read COPYING and README for further details.
|
||||
*/
|
||||
|
||||
/* RequiredLibraries: tre */
|
||||
/// BEGIN CMAKE
|
||||
/// pkg_check_modules("TRE" IMPORTED_TARGET REQUIRED "tre")
|
||||
/// target_link_libraries(${SO} PRIVATE PkgConfig::TRE)
|
||||
/// END CMAKE
|
||||
|
||||
#include "module.h"
|
||||
#include <tre/regex.h>
|
||||
|
||||
@@ -6,8 +6,10 @@
|
||||
* Please read COPYING and README for further details.
|
||||
*/
|
||||
|
||||
/* RequiredLibraries: sqlite3 */
|
||||
/* RequiredWindowsLibraries: sqlite3 */
|
||||
/// BEGIN CMAKE
|
||||
/// find_package("SQLite3" REQUIRED)
|
||||
/// target_link_libraries(${SO} PRIVATE SQLite::SQLite3)
|
||||
/// END CMAKE
|
||||
|
||||
#include "module.h"
|
||||
#include "modules/sql.h"
|
||||
|
||||
@@ -7,8 +7,10 @@
|
||||
* Please read COPYING and README for further details.
|
||||
*/
|
||||
|
||||
/* RequiredLibraries: gnutls */
|
||||
/* RequiredWindowsLibraries: libgnutls-30 */
|
||||
/// BEGIN CMAKE
|
||||
/// find_package("GnuTLS" REQUIRED)
|
||||
/// target_link_libraries(${SO} PRIVATE GnuTLS::GnuTLS)
|
||||
/// END CMAKE
|
||||
|
||||
#include "module.h"
|
||||
#include "modules/ssl.h"
|
||||
|
||||
@@ -6,8 +6,10 @@
|
||||
* Please read COPYING and README for further details.
|
||||
*/
|
||||
|
||||
/* RequiredLibraries: ssl,crypto */
|
||||
/* RequiredWindowsLibraries: libssl,libcrypto */
|
||||
/// BEGIN CMAKE
|
||||
/// find_package("OpenSSL" REQUIRED)
|
||||
/// target_link_libraries(${SO} PRIVATE OpenSSL::Crypto OpenSSL::SSL)
|
||||
/// END CMAKE
|
||||
|
||||
#include "module.h"
|
||||
#include "modules/ssl.h"
|
||||
|
||||
@@ -6,8 +6,11 @@
|
||||
* Please read COPYING and README for further details.
|
||||
*/
|
||||
|
||||
|
||||
/* RequiredLibraries: xmlrpc */
|
||||
/// BEGIN CMAKE
|
||||
/// find_library("XMLRPC" "xmlrpc" REQUIRED)
|
||||
/// message(STATUS "Found XMLRPC: ${XMLRPC}")
|
||||
/// target_link_libraries(${SO} PRIVATE ${XMLRPC})
|
||||
/// END CMAKE
|
||||
|
||||
#include <xmlrpc-c/base.h>
|
||||
|
||||
|
||||
@@ -183,8 +183,6 @@ public:
|
||||
}
|
||||
|
||||
FOREACH_MOD(OnPostHelp, (source, params));
|
||||
|
||||
return;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -59,8 +59,6 @@ public:
|
||||
}
|
||||
else
|
||||
source.Reply(HOST_NOT_ASSIGNED);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand) override
|
||||
|
||||
@@ -39,8 +39,6 @@ public:
|
||||
Log(LOG_COMMAND, source, this) << "to disable their vhost";
|
||||
source.Reply(_("Your vhost was removed and the normal cloaking restored."));
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand) override
|
||||
|
||||
@@ -42,8 +42,6 @@ public:
|
||||
}
|
||||
else
|
||||
source.Reply(HOST_NOT_ASSIGNED);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand) override
|
||||
|
||||
@@ -59,8 +59,6 @@ public:
|
||||
|
||||
if (!found)
|
||||
source.Reply(_("Nick %s doesn't have a memo from you."), na->nick.c_str());
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand) override
|
||||
|
||||
@@ -121,7 +121,6 @@ public:
|
||||
source.Reply(_("All of your memos have been deleted."));
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand) override
|
||||
|
||||
@@ -92,8 +92,6 @@ public:
|
||||
}
|
||||
else
|
||||
this->OnSyntaxError(source, "");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand) override
|
||||
|
||||
@@ -130,7 +130,6 @@ public:
|
||||
source.Reply(_("Memos for %s:"), ci ? ci->name.c_str() : source.GetNick().c_str());
|
||||
list.SendTo(source);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand) override
|
||||
|
||||
@@ -191,7 +191,6 @@ public:
|
||||
list.Process();
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand) override
|
||||
|
||||
@@ -191,7 +191,6 @@ private:
|
||||
else
|
||||
source.Reply(_("Memo limit \002disabled\002 for %s."), !chan.empty() ? chan.c_str() : user.c_str());
|
||||
}
|
||||
return;
|
||||
}
|
||||
public:
|
||||
CommandMSSet(Module *creator) : Command(creator, "memoserv/set", 2, 5)
|
||||
@@ -215,8 +214,6 @@ public:
|
||||
{
|
||||
this->OnSyntaxError(source, "");
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand) override
|
||||
|
||||
@@ -26,7 +26,6 @@ public:
|
||||
void Execute(CommandSource &source, const std::vector<Anope::string> ¶ms) override
|
||||
{
|
||||
this->OnSyntaxError(source, "");
|
||||
return;
|
||||
}
|
||||
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand) override
|
||||
|
||||
@@ -227,8 +227,6 @@ public:
|
||||
source.Reply(_("No registrations matching \002%s\002 were found."), email.c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand) override
|
||||
|
||||
@@ -88,7 +88,10 @@ public:
|
||||
|
||||
InfoFormatter info(source.nc);
|
||||
|
||||
info[_("Account")] = Anope::Format("%s (%zu)", na->nc->display.c_str(), na->nc->GetId());
|
||||
info[_("Account")] = Anope::Format(Language::Translate(source.nc, _("%s (ID: %zu)")), na->nc->display.c_str(), na->nc->GetId());
|
||||
info[_("Account registered")] = Anope::strftime(na->nc->registered, source.GetAccount());
|
||||
info[_("Nick registered")] = Anope::strftime(na->registered, source.GetAccount());
|
||||
|
||||
if (nick_online)
|
||||
{
|
||||
bool shown = false;
|
||||
@@ -104,6 +107,8 @@ public:
|
||||
}
|
||||
else
|
||||
{
|
||||
info[_("Last seen")] = Anope::strftime(na->last_seen, source.GetAccount());
|
||||
|
||||
Anope::string shown;
|
||||
if (show_hidden || !na->nc->HasExt("HIDE_MASK"))
|
||||
{
|
||||
@@ -113,14 +118,6 @@ public:
|
||||
|
||||
if (show_hidden && !na->last_userhost_real.empty() && na->last_userhost_real != shown)
|
||||
info[_("Last seen mask")] = na->last_userhost_real;
|
||||
}
|
||||
|
||||
info[_("Account registered")] = Anope::strftime(na->nc->registered, source.GetAccount());
|
||||
info[_("Nick registered")] = Anope::strftime(na->registered, source.GetAccount());
|
||||
|
||||
if (!nick_online)
|
||||
{
|
||||
info[_("Last seen")] = Anope::strftime(na->last_seen, source.GetAccount());
|
||||
|
||||
if (!na->last_quit.empty() && (show_hidden || !na->nc->HasExt("HIDE_QUIT")))
|
||||
info[_("Last quit message")] = na->last_quit;
|
||||
@@ -129,11 +126,8 @@ public:
|
||||
if (!na->nc->email.empty() && (show_hidden || !na->nc->HasExt("HIDE_EMAIL")))
|
||||
info[_("Email address")] = na->nc->email;
|
||||
|
||||
if (show_hidden)
|
||||
{
|
||||
if (na->HasVHost())
|
||||
info[_("VHost")] = na->GetVHostMask();
|
||||
}
|
||||
if (show_hidden && na->HasVHost())
|
||||
info[_("VHost")] = na->GetVHostMask();
|
||||
|
||||
FOREACH_MOD(OnNickInfo, (source, na, info, show_hidden));
|
||||
info.SendTo(source);
|
||||
|
||||
@@ -128,7 +128,6 @@ public:
|
||||
source.Reply(_("List of entries matching \002%s\002:"), pattern.c_str());
|
||||
list.SendTo(source);
|
||||
source.Reply(_("End of list - %d/%d matches shown."), nnicks > listmax ? listmax : nnicks, nnicks);
|
||||
return;
|
||||
}
|
||||
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand) override
|
||||
|
||||
@@ -57,7 +57,6 @@ public:
|
||||
/* Send out an event */
|
||||
FOREACH_MOD(OnNickLogout, (u2));
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand) override
|
||||
|
||||
@@ -169,15 +169,14 @@ public:
|
||||
else if (nc->HasExt("UNCONFIRMED"))
|
||||
{
|
||||
if (nsregister.equals_ci("admin"))
|
||||
source.Reply(_("All new accounts must be validated by an administrator. Please wait for your registration to be confirmed."));
|
||||
source.Reply(CONFIRM_REGISTER_ADMIN);
|
||||
else if (nsregister.equals_ci("code"))
|
||||
{
|
||||
const auto *code = GetCode(na->nc);
|
||||
source.Reply(_("Your account is not confirmed. To confirm it, type \002%s\002."),
|
||||
source.service->GetQueryCommand("nickserv/confirm/register", *code).c_str());
|
||||
source.Reply(CONFIRM_REGISTER_CODE, source.service->GetQueryCommand("nickserv/confirm/register", *code).c_str());
|
||||
}
|
||||
else if (nsregister.equals_ci("mail"))
|
||||
source.Reply(_("Your account is not confirmed. To confirm it, follow the instructions that were emailed to you."));
|
||||
source.Reply(CONFIRM_REGISTER_MAIL);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -464,15 +463,14 @@ public:
|
||||
{
|
||||
const Anope::string &nsregister = Config->GetModule(this).Get<const Anope::string>("registration");
|
||||
if (nsregister.equals_ci("admin"))
|
||||
u->SendMessage(NickServ, _("All new accounts must be validated by an administrator. Please wait for your registration to be confirmed."));
|
||||
u->SendMessage(NickServ, CONFIRM_REGISTER_ADMIN);
|
||||
else if (nsregister.equals_ci("code"))
|
||||
{
|
||||
const auto *code = GetCode(u->Account());
|
||||
u->SendMessage(NickServ, _("Your account is not confirmed. To confirm it, type \002%s\002."),
|
||||
NickServ->GetQueryCommand("nickserv/confirm/register", *code).c_str());
|
||||
u->SendMessage(NickServ, CONFIRM_REGISTER_CODE, NickServ->GetQueryCommand("nickserv/confirm/register", *code).c_str());
|
||||
}
|
||||
else if (nsregister.equals_ci("mail"))
|
||||
u->SendMessage(NickServ, _("Your account is not confirmed. To confirm it, follow the instructions that were emailed to you."));
|
||||
u->SendMessage(NickServ, CONFIRM_REGISTER_MAIL);
|
||||
|
||||
const NickAlias *this_na = u->AccountNick();
|
||||
time_t registered = Anope::CurTime - this_na->registered;
|
||||
|
||||
@@ -42,8 +42,6 @@ public:
|
||||
source.Reply(_("Password reset email for \002%s\002 has been sent."), na->nick.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand) override
|
||||
|
||||
@@ -24,7 +24,6 @@ public:
|
||||
void Execute(CommandSource &source, const std::vector<Anope::string> ¶ms) override
|
||||
{
|
||||
this->OnSyntaxError(source, "");
|
||||
return;
|
||||
}
|
||||
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand) override
|
||||
@@ -80,7 +79,6 @@ public:
|
||||
void Execute(CommandSource &source, const std::vector<Anope::string> ¶ms) override
|
||||
{
|
||||
this->OnSyntaxError(source, "");
|
||||
return;
|
||||
}
|
||||
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand) override
|
||||
|
||||
@@ -0,0 +1,238 @@
|
||||
/* NickServ core functions
|
||||
*
|
||||
* (C) 2003-2025 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
|
||||
/// BEGIN CMAKE
|
||||
/// target_compile_features(${SO} PRIVATE "cxx_std_20")
|
||||
/// END CMAKE
|
||||
|
||||
#include <version>
|
||||
#if __cpp_lib_chrono >= 201907L
|
||||
# include <chrono>
|
||||
# define HAS_CXX20_CHRONO
|
||||
#endif
|
||||
|
||||
#include "module.h"
|
||||
|
||||
namespace
|
||||
{
|
||||
Anope::map<std::vector<Anope::string>> timeregions;
|
||||
std::vector<Anope::string> timezones;
|
||||
}
|
||||
|
||||
class CommandNSSetTimezone
|
||||
: public Command
|
||||
{
|
||||
protected:
|
||||
SerializableExtensibleItem<Anope::string> &timezone;
|
||||
|
||||
bool SendZones(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
auto timeregion = timeregions.find(subcommand);
|
||||
if (timeregion == timeregions.end())
|
||||
return false;
|
||||
|
||||
source.Reply(_("Available timezones in the \002%s\002 region:"),
|
||||
timeregion->first.c_str());
|
||||
|
||||
const auto max_length = Config->GetBlock("options").Get<size_t>("linelength", "100");
|
||||
Anope::string buffer;
|
||||
for (const auto &timezone : timeregion->second)
|
||||
{
|
||||
if (buffer.length() + 2 + timezone.length() >= max_length)
|
||||
{
|
||||
source.Reply(buffer);
|
||||
buffer.clear();
|
||||
}
|
||||
|
||||
buffer.append(buffer.empty() ? " " : ", ");
|
||||
buffer.append(timezone);
|
||||
}
|
||||
|
||||
if (!buffer.empty())
|
||||
source.Reply(buffer);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public:
|
||||
CommandNSSetTimezone(Module *creator, SerializableExtensibleItem<Anope::string> &tz, const Anope::string &sname = "nickserv/set/timezone", size_t min = 1)
|
||||
: Command(creator, sname, min, min + 1)
|
||||
, timezone(tz)
|
||||
{
|
||||
this->SetDesc(_("Set the timezone services will use when messaging you"));
|
||||
this->SetSyntax(_("\037timezone\037"));
|
||||
}
|
||||
|
||||
void Run(CommandSource &source, const Anope::string &user, const Anope::string ¶m)
|
||||
{
|
||||
if (Anope::ReadOnly)
|
||||
{
|
||||
source.Reply(READ_ONLY_MODE);
|
||||
return;
|
||||
}
|
||||
|
||||
const NickAlias *na = NickAlias::Find(user);
|
||||
if (!na)
|
||||
{
|
||||
source.Reply(NICK_X_NOT_REGISTERED, user.c_str());
|
||||
return;
|
||||
}
|
||||
NickCore *nc = na->nc;
|
||||
|
||||
EventReturn MOD_RESULT;
|
||||
FOREACH_RESULT(OnSetNickOption, MOD_RESULT, (source, this, nc, param));
|
||||
if (MOD_RESULT == EVENT_STOP)
|
||||
return;
|
||||
|
||||
Anope::string usertz;
|
||||
for (const auto &timezone : timezones)
|
||||
{
|
||||
if (timezone.find_ci(param) != 0)
|
||||
continue; // Timezone does not match.
|
||||
|
||||
if (!usertz.empty())
|
||||
{
|
||||
source.Reply(_("Multiple timezones matched \002%s\002. Please be more specific."), param.c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
usertz = timezone;
|
||||
if (usertz.equals_ci(param))
|
||||
break; // Exact match.
|
||||
}
|
||||
|
||||
if (usertz.empty())
|
||||
{
|
||||
this->OnSyntaxError(source, "");
|
||||
return;
|
||||
}
|
||||
|
||||
Log(nc == source.GetAccount() ? LOG_COMMAND : LOG_ADMIN, source, this) << "to change the timezone of " << nc->display << " to " << usertz;
|
||||
|
||||
timezone.Set(nc, usertz);
|
||||
if (source.GetAccount() == nc)
|
||||
source.Reply(_("Timezone changed to \002%s\002."), usertz.c_str());
|
||||
else
|
||||
source.Reply(_("Timezone for \002%s\002 changed to \002%s\002."), nc->display.c_str(), usertz.c_str());
|
||||
}
|
||||
|
||||
void Execute(CommandSource &source, const std::vector<Anope::string> ¶m) override
|
||||
{
|
||||
this->Run(source, source.nc->display, param[0]);
|
||||
}
|
||||
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand) override
|
||||
{
|
||||
if (subcommand.empty())
|
||||
{
|
||||
this->SendSyntax(source);
|
||||
source.Reply(" ");
|
||||
source.Reply(_(
|
||||
"Changes the timezone services uses when sending messages to you (for example, "
|
||||
"when responding to a command you send). \037timezone\037 should be chosen from "
|
||||
"an entry in one of the supported timezone regions:"
|
||||
));
|
||||
|
||||
for (const auto &[timeregion, timezone] : timeregions)
|
||||
source.Reply(" %s (%zu timezones)", timeregion.c_str(), timezone.size());
|
||||
|
||||
source.Reply(_("Type \002%s\032\037region\037\002 to list timezones for a region."),
|
||||
source.service->GetQueryCommand("generic/help", source.command).c_str());
|
||||
}
|
||||
else if (!SendZones(source, subcommand))
|
||||
this->OnSyntaxError(source, subcommand);
|
||||
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
class CommandNSSASetTimezone final
|
||||
: public CommandNSSetTimezone
|
||||
{
|
||||
public:
|
||||
CommandNSSASetTimezone(Module *creator, SerializableExtensibleItem<Anope::string> &tz)
|
||||
: CommandNSSetTimezone(creator, tz, "nickserv/saset/timezone", 2)
|
||||
{
|
||||
this->ClearSyntax();
|
||||
this->SetSyntax(_("\037nickname\037 \037timezone\037"));
|
||||
}
|
||||
|
||||
void Execute(CommandSource &source, const std::vector<Anope::string> ¶ms) override
|
||||
{
|
||||
this->Run(source, params[0], params[1]);
|
||||
}
|
||||
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand) override
|
||||
{
|
||||
if (subcommand.empty())
|
||||
{
|
||||
this->SendSyntax(source);
|
||||
source.Reply(" ");
|
||||
source.Reply(_(
|
||||
"Changes the timezone services uses when sending messages to the given user (for "
|
||||
"example, when responding to a command they send). \037timezone\037 should be "
|
||||
"chosen from an entry in one of the supported timezone regions:"
|
||||
));
|
||||
|
||||
for (const auto &[timeregion, timezone] : timeregions)
|
||||
source.Reply(" %s (%zu timezones)", timeregion.c_str(), timezone.size());
|
||||
|
||||
source.Reply(_("Type \002%s\032\037region\037\002 to list timezones for a region."),
|
||||
source.service->GetQueryCommand("generic/help", source.command).c_str());
|
||||
}
|
||||
else if (!SendZones(source, subcommand))
|
||||
this->OnSyntaxError(source, subcommand);
|
||||
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
class NSSetTimezone final
|
||||
: public Module
|
||||
{
|
||||
private:
|
||||
SerializableExtensibleItem<Anope::string> timezone;
|
||||
CommandNSSetTimezone commandnssettimezone;
|
||||
CommandNSSASetTimezone commandnssasettimezone;
|
||||
|
||||
public:
|
||||
NSSetTimezone(const Anope::string &modname, const Anope::string &creator)
|
||||
: Module(modname, creator, VENDOR)
|
||||
, timezone(this, "timezone")
|
||||
, commandnssettimezone(this, timezone)
|
||||
, commandnssasettimezone(this, timezone)
|
||||
{
|
||||
#ifndef HAS_CXX20_CHRONO
|
||||
throw ModuleException("A compiler with C++20 support is required by this module");
|
||||
#else
|
||||
// Build the zone list.
|
||||
const auto& tzdb = std::chrono::get_tzdb();
|
||||
for (const auto &tz : tzdb.zones)
|
||||
timezones.emplace_back(tz.name());
|
||||
for (const auto &tz : tzdb.links)
|
||||
timezones.emplace_back(tz.name());
|
||||
std::sort(timezones.begin(), timezones.end());
|
||||
|
||||
// Build the region list.
|
||||
for (const auto &timezone : timezones)
|
||||
{
|
||||
auto tzsep = timezone.find('/');
|
||||
auto region = tzsep == Anope::string::npos ? "Misc" : timezone.substr(0, tzsep);
|
||||
timeregions[region].push_back(timezone);
|
||||
}
|
||||
for (auto &[_, timeregion] : timeregions)
|
||||
std::sort(timeregion.begin(), timeregion.end());
|
||||
#endif
|
||||
}
|
||||
};
|
||||
|
||||
MODULE_INIT(NSSetTimezone)
|
||||
@@ -267,8 +267,6 @@ private:
|
||||
|
||||
if (Anope::ReadOnly)
|
||||
source.Reply(READ_ONLY_MODE);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void ProcessList(CommandSource &source, const std::vector<Anope::string> ¶ms, ListFormatter &list)
|
||||
@@ -428,8 +426,6 @@ public:
|
||||
return this->DoClear(source);
|
||||
else
|
||||
this->OnSyntaxError(source, "");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand) override
|
||||
|
||||
@@ -89,7 +89,6 @@ public:
|
||||
else
|
||||
source.Reply(CHAN_X_NOT_IN_USE, channel.c_str());
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand) override
|
||||
|
||||
@@ -228,7 +228,6 @@ public:
|
||||
|
||||
/* Run any defcon functions, e.g. FORCE CHAN MODE */
|
||||
runDefCon();
|
||||
return;
|
||||
}
|
||||
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand) override
|
||||
|
||||
@@ -447,8 +447,6 @@ public:
|
||||
}
|
||||
else
|
||||
this->OnSyntaxError(source, command);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand) override
|
||||
|
||||
@@ -346,8 +346,6 @@ private:
|
||||
ignore_service->ClearIgnores();
|
||||
Log(LOG_ADMIN, source, this) << "to CLEAR the list";
|
||||
source.Reply(_("Ignore list has been cleared."));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
public:
|
||||
@@ -374,8 +372,6 @@ public:
|
||||
return this->DoClear(source);
|
||||
else
|
||||
this->OnSyntaxError(source, "");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand) override
|
||||
|
||||
@@ -248,7 +248,6 @@ public:
|
||||
|
||||
list.SendTo(source);
|
||||
source.Reply(_("End of users list. \002%u\002 users shown."), count);
|
||||
return;
|
||||
}
|
||||
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand) override
|
||||
|
||||
@@ -56,8 +56,6 @@ public:
|
||||
}
|
||||
else
|
||||
source.Reply(_("No information about module \002%s\002 is available."), file.c_str());
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand) override
|
||||
|
||||
@@ -35,8 +35,6 @@ public:
|
||||
source.Reply(_("Module \002%s\002 is already loaded."), mname.c_str());
|
||||
else
|
||||
source.Reply(_("Unable to load module \002%s\002."), mname.c_str());
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand) override
|
||||
@@ -108,8 +106,6 @@ public:
|
||||
else
|
||||
source.Reply(_("Unable to load module \002%s\002."), mname.c_str());
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand) override
|
||||
@@ -159,8 +155,6 @@ public:
|
||||
}
|
||||
else
|
||||
source.Reply(_("Unable to remove module \002%s\002."), mname.c_str());
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand) override
|
||||
|
||||
@@ -221,8 +221,6 @@ protected:
|
||||
lflist.SendTo(source);
|
||||
source.Reply(_("End of news list."));
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void DoAdd(CommandSource &source, const std::vector<Anope::string> ¶ms, NewsType ntype, const char **msgs)
|
||||
@@ -247,8 +245,6 @@ protected:
|
||||
source.Reply(msgs[MSG_ADDED]);
|
||||
Log(LOG_ADMIN, source, this) << "to add a news item";
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void DoDel(CommandSource &source, const std::vector<Anope::string> ¶ms, NewsType ntype, const char **msgs)
|
||||
@@ -288,8 +284,6 @@ protected:
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void DoNews(CommandSource &source, const std::vector<Anope::string> ¶ms, NewsType ntype)
|
||||
@@ -311,8 +305,6 @@ protected:
|
||||
return this->DoDel(source, params, ntype, msgs);
|
||||
else
|
||||
this->OnSyntaxError(source, "");
|
||||
|
||||
return;
|
||||
}
|
||||
public:
|
||||
NewsBase(Module *creator, const Anope::string &newstype) : Command(creator, newstype, 1, 2), ns("NewsService", "news")
|
||||
|
||||
@@ -245,8 +245,6 @@ public:
|
||||
}
|
||||
else
|
||||
this->OnSyntaxError(source, subcommand);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand) override
|
||||
|
||||
@@ -252,8 +252,6 @@ private:
|
||||
source.Reply(_("Hosts with at least \002%d\002 sessions:"), mincount);
|
||||
list.SendTo(source);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static void DoView(CommandSource &source, const std::vector<Anope::string> ¶ms)
|
||||
@@ -421,8 +419,6 @@ private:
|
||||
source.Reply(READ_ONLY_MODE);
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void DoDel(CommandSource &source, const std::vector<Anope::string> ¶ms)
|
||||
@@ -457,8 +453,6 @@ private:
|
||||
|
||||
if (Anope::ReadOnly)
|
||||
source.Reply(READ_ONLY_MODE);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void ProcessList(CommandSource &source, const std::vector<Anope::string> ¶ms, ListFormatter &list)
|
||||
|
||||
@@ -27,8 +27,6 @@ private:
|
||||
source.Reply(index.c_str(), "DEBUG");
|
||||
index = Anope::NoExpire ? _("%s is enabled") : _("%s is disabled");
|
||||
source.Reply(index.c_str(), "NOEXPIRE");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void DoSetReadOnly(CommandSource &source, const std::vector<Anope::string> ¶ms)
|
||||
@@ -55,8 +53,6 @@ private:
|
||||
}
|
||||
else
|
||||
source.Reply(_("Setting for READONLY must be \002ON\002 or \002OFF\002."));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void DoSetSuperAdmin(CommandSource &source, const std::vector<Anope::string> ¶ms)
|
||||
@@ -94,8 +90,6 @@ private:
|
||||
}
|
||||
else
|
||||
source.Reply(_("Setting for super admin must be \002ON\002 or \002OFF\002."));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void DoSetDebug(CommandSource &source, const std::vector<Anope::string> ¶ms)
|
||||
@@ -133,8 +127,6 @@ private:
|
||||
|
||||
source.Reply(_("Setting for DEBUG must be \002ON\002, \002OFF\002, or a positive number."));
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void DoSetNoExpire(CommandSource &source, const std::vector<Anope::string> ¶ms)
|
||||
@@ -161,8 +153,6 @@ private:
|
||||
}
|
||||
else
|
||||
source.Reply(_("Setting for NOEXPIRE must be \002ON\002 or \002OFF\002."));
|
||||
|
||||
return;
|
||||
}
|
||||
public:
|
||||
CommandOSSet(Module *creator) : Command(creator, "operserv/set", 1, 2)
|
||||
@@ -187,8 +177,6 @@ public:
|
||||
return this->DoSetSuperAdmin(source, params);
|
||||
else
|
||||
this->OnSyntaxError(source, "");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand) override
|
||||
|
||||
@@ -47,7 +47,6 @@ public:
|
||||
Log(LOG_ADMIN, source, this);
|
||||
Anope::QuitReason = source.command + " command received from " + source.GetNick();
|
||||
Anope::Quitting = true;
|
||||
return;
|
||||
}
|
||||
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand) override
|
||||
@@ -84,7 +83,6 @@ public:
|
||||
Anope::QuitReason = source.command + " command received from " + source.GetNick();
|
||||
Anope::Quitting = Anope::Restarting = true;
|
||||
Anope::SaveDatabases();
|
||||
return;
|
||||
}
|
||||
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand) override
|
||||
@@ -118,7 +116,6 @@ public:
|
||||
Anope::QuitReason = source.command + " command received from " + source.GetNick();
|
||||
Anope::Quitting = true;
|
||||
Anope::SaveDatabases();
|
||||
return;
|
||||
}
|
||||
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand) override
|
||||
|
||||
@@ -124,7 +124,6 @@ private:
|
||||
MaxUserTime = Anope::CurTime;
|
||||
Stats::me->QueueUpdate();
|
||||
source.Reply(_("Statistics reset."));
|
||||
return;
|
||||
}
|
||||
|
||||
static void DoStatsUptime(CommandSource &source)
|
||||
@@ -133,8 +132,6 @@ private:
|
||||
source.Reply(_("Current users: \002%zu\002 (\002%zu\002 ops)"), UserListByNick.size(), OperCount);
|
||||
source.Reply(_("Maximum users: \002%zu\002 (%s)"), MaxUserCount, Anope::strftime(MaxUserTime, source.GetAccount()).c_str());
|
||||
source.Reply(_("Services up %s."), Anope::Duration(uptime, source.GetAccount()).c_str());
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static void DoStatsUplink(CommandSource &source)
|
||||
@@ -148,7 +145,6 @@ private:
|
||||
source.Reply(_("Uplink server: %s"), Me->GetLinks().front()->GetName().c_str());
|
||||
source.Reply(_("Uplink capab: %s"), buf.c_str());
|
||||
source.Reply(_("Servers found: %zu"), Servers::ByName.size() - 1);
|
||||
return;
|
||||
}
|
||||
|
||||
template<typename T> void GetHashStats(const T &map, size_t &entries, size_t &buckets, size_t &max_chain)
|
||||
|
||||
@@ -59,7 +59,6 @@ public:
|
||||
Log(LOG_ADMIN, source, this) << "to change " << nick << " to " << newnick;
|
||||
IRCD->SendForceNickChange(u2, newnick, Anope::CurTime);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand) override
|
||||
|
||||
@@ -114,8 +114,6 @@ private:
|
||||
|
||||
if (Anope::ReadOnly)
|
||||
source.Reply(READ_ONLY_MODE);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void ProcessList(CommandSource &source, const std::vector<Anope::string> ¶ms, ListFormatter &list)
|
||||
@@ -238,8 +236,6 @@ private:
|
||||
source.Reply(_("The %s list has been cleared."), source.command.nobreak().c_str());
|
||||
if (Anope::ReadOnly)
|
||||
source.Reply(READ_ONLY_MODE);
|
||||
|
||||
return;
|
||||
}
|
||||
public:
|
||||
CommandOSSXLineBase(Module *creator, const Anope::string &cmd) : Command(creator, cmd, 1, 4)
|
||||
@@ -267,8 +263,6 @@ public:
|
||||
return this->OnClear(source);
|
||||
else
|
||||
this->OnSyntaxError(source, "");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand) override = 0;
|
||||
|
||||
@@ -25,7 +25,6 @@ public:
|
||||
Log(LOG_ADMIN, source, this);
|
||||
source.Reply(_("Updating databases."));
|
||||
Anope::SaveDatabases();
|
||||
return;
|
||||
}
|
||||
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand) override
|
||||
|
||||
+64
-253
@@ -43,7 +43,7 @@ namespace
|
||||
static ServiceReference<Encryption::Provider> sha256("Encryption::Provider", "sha256");
|
||||
|
||||
// The version of the InspIRCd protocol that we are using.
|
||||
size_t spanningtree_proto_ver = 1205;
|
||||
size_t spanningtree_proto_ver = 1206;
|
||||
|
||||
bool IsExtBan(const Anope::string &str, bool &inverted, Anope::string &name, Anope::string &value)
|
||||
{
|
||||
@@ -149,8 +149,7 @@ private:
|
||||
{
|
||||
Uplink::Send("METADATA", uid, "accountid", na ? Anope::ToString(na->nc->GetId()) : Anope::string());
|
||||
Uplink::Send("METADATA", uid, "accountname", na ? na->nc->display : Anope::string());
|
||||
if (spanningtree_proto_ver >= 1206)
|
||||
Uplink::Send("METADATA", uid, "accountnicks", GetAccountNicks(na));
|
||||
Uplink::Send("METADATA", uid, "accountnicks", GetAccountNicks(na));
|
||||
}
|
||||
|
||||
static void SendVHostInternal(const Anope::string &uid, const Anope::string &vident, const Anope::string &vhost)
|
||||
@@ -175,21 +174,22 @@ public:
|
||||
PrimitiveExtensibleItem<ListLimits> maxlist;
|
||||
|
||||
InspIRCdProto(Module *creator)
|
||||
: IRCDProto(creator, "InspIRCd 3+")
|
||||
: IRCDProto(creator, "InspIRCd 4+")
|
||||
, SASL::ProtocolInterface(creator)
|
||||
, maxlist(creator, "maxlist")
|
||||
{
|
||||
DefaultPseudoclientModes = "+oI";
|
||||
CanSVSNick = true;
|
||||
CanSVSJoin = true;
|
||||
CanCertFP = true;
|
||||
CanSetVHost = true;
|
||||
CanSetVIdent = true;
|
||||
CanSQLine = true;
|
||||
CanSVSHold = true;
|
||||
CanSVSJoin = true;
|
||||
CanSVSNick = true;
|
||||
CanSZLine = true;
|
||||
CanCertFP = true;
|
||||
RequiresID = true;
|
||||
MaxModes = 0;
|
||||
DefaultPseudoclientModes = "+oI";
|
||||
MaxLine = 0;
|
||||
MaxModes = 0;
|
||||
}
|
||||
|
||||
void GetLinkAdvice(std::vector<Anope::string> &advice) override
|
||||
@@ -249,28 +249,18 @@ public:
|
||||
Uplink::Send(bi, "PRIVMSG", "$" + dest->GetName(), msg);
|
||||
}
|
||||
|
||||
void SendContextNotice(BotInfo *bi, User *target, Channel *context, const Anope::string &msg) override
|
||||
void SendContextNotice(BotInfo *bi, User *target, Channel *context, const Anope::string &msg, const Anope::map<Anope::string> &tags) override
|
||||
{
|
||||
if (spanningtree_proto_ver >= 1206)
|
||||
{
|
||||
IRCD->SendNotice(bi, target->GetUID(), msg, {
|
||||
{ "~context", context->name },
|
||||
});
|
||||
return;
|
||||
}
|
||||
IRCDProto::SendContextNotice(bi, target, context, msg);
|
||||
auto newtags = tags;
|
||||
newtags["~context"] = context->name;
|
||||
IRCD->SendNotice(bi, target->GetUID(), msg, newtags);
|
||||
}
|
||||
|
||||
void SendContextPrivmsg(BotInfo *bi, User *target, Channel *context, const Anope::string &msg) override
|
||||
void SendContextPrivmsg(BotInfo *bi, User *target, Channel *context, const Anope::string &msg, const Anope::map<Anope::string> &tags) override
|
||||
{
|
||||
if (spanningtree_proto_ver >= 1206)
|
||||
{
|
||||
IRCD->SendPrivmsg(bi, target->GetUID(), msg, {
|
||||
{ "~context", context->name },
|
||||
});
|
||||
return;
|
||||
}
|
||||
IRCDProto::SendContextPrivmsg(bi, target, context, msg);
|
||||
auto newtags = tags;
|
||||
newtags["~context"] = context->name;
|
||||
IRCD->SendPrivmsg(bi, target->GetUID(), msg, newtags);
|
||||
}
|
||||
|
||||
void SendClearModes(const MessageSource &user, Channel *c, User* u, const Anope::string &mode) override
|
||||
@@ -345,19 +335,7 @@ public:
|
||||
|
||||
void SendTopic(const MessageSource &source, Channel *c) override
|
||||
{
|
||||
if (Servers::Capab.count("TOPICLOCK"))
|
||||
{
|
||||
Uplink::Send(c->WhoSends(), "SVSTOPIC", c->name, c->topic_ts, c->topic_setter, c->topic);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* If the last time a topic was set is after the TS we want for this topic we must bump this topic's timestamp to now */
|
||||
time_t ts = c->topic_ts;
|
||||
if (c->topic_time > ts)
|
||||
ts = Anope::CurTime;
|
||||
/* But don't modify c->topic_ts, it should remain set to the real TS we want as ci->last_topic_time pulls from it */
|
||||
Uplink::Send(source, "FTOPIC", c->name, c->created, ts, c->topic_setter, c->topic);
|
||||
}
|
||||
Uplink::Send(c->WhoSends(), "SVSTOPIC", c->name, c->topic_ts, c->topic_setter, c->topic);
|
||||
}
|
||||
|
||||
void SendVHostDel(User *u) override
|
||||
@@ -432,7 +410,7 @@ public:
|
||||
SendAddLine("G", x->GetUser() + "@" + x->GetHost(), timeleft, x->by, x->GetReason());
|
||||
}
|
||||
|
||||
void SendNumericInternal(int numeric, const Anope::string &dest, const std::vector<Anope::string> ¶ms) override
|
||||
void SendNumericInternal(unsigned numeric, const Anope::string &dest, const std::vector<Anope::string> ¶ms) override
|
||||
{
|
||||
auto newparams = params;
|
||||
newparams.insert(newparams.begin(), { Me->GetSID(), dest, Anope::ToString(numeric) });
|
||||
@@ -446,7 +424,7 @@ public:
|
||||
|
||||
for (const auto &[mode, info] : change)
|
||||
{
|
||||
if (spanningtree_proto_ver >= 1206 && mode->type == MODE_LIST && info.first)
|
||||
if (mode->type == MODE_LIST && info.first)
|
||||
{
|
||||
// Adding to a list mode.
|
||||
const auto &data = info.second;
|
||||
@@ -483,16 +461,8 @@ public:
|
||||
|
||||
void SendClientIntroduction(User *u) override
|
||||
{
|
||||
if (spanningtree_proto_ver >= 1206)
|
||||
{
|
||||
Uplink::Send("UID", u->GetUID(), u->timestamp, u->nick, u->host, u->host, u->GetIdent(), u->GetIdent(),
|
||||
"0.0.0.0", u->timestamp, "+" + u->GetModes(), u->realname);
|
||||
}
|
||||
else
|
||||
{
|
||||
Uplink::Send("UID", u->GetUID(), u->timestamp, u->nick, u->host, u->host, u->GetIdent(), "0.0.0.0",
|
||||
u->timestamp, "+" + u->GetModes(), u->realname);
|
||||
}
|
||||
Uplink::Send("UID", u->GetUID(), u->timestamp, u->nick, u->host, u->host, u->GetIdent(), u->GetIdent(),
|
||||
"0.0.0.0", u->timestamp, "+" + u->GetModes(), u->realname);
|
||||
|
||||
if (u->GetModes().find('o') != Anope::string::npos)
|
||||
{
|
||||
@@ -625,25 +595,14 @@ public:
|
||||
Uplink::Send("BURST", Anope::CurTime);
|
||||
Module *enc = ModuleManager::FindFirstOf(ENCRYPTION);
|
||||
|
||||
if (spanningtree_proto_ver >= 1206)
|
||||
{
|
||||
Uplink::Send("SINFO", "customversion", Anope::Format("%s -- (%s) -- %s", IRCD->GetProtocolName().c_str(), enc ? enc->name.c_str() : "none", Anope::VersionBuildString().c_str()));
|
||||
Uplink::Send("SINFO", "rawbranch", "Anope-" + Anope::VersionShort());
|
||||
}
|
||||
else
|
||||
{
|
||||
Uplink::Send("SINFO", "version", Anope::Format("Anope-%s %s :%s -- (%s) -- %s", Anope::Version().c_str(), Me->GetName().c_str(), IRCD->GetProtocolName().c_str(), enc ? enc->name.c_str() : "none", Anope::VersionBuildString().c_str()));
|
||||
Uplink::Send("SINFO", "fullversion", Anope::Format("Anope-%s %s :[%s] %s -- (%s) -- %s", Anope::Version().c_str(), Me->GetName().c_str(), Me->GetSID().c_str(), IRCD->GetProtocolName().c_str(), enc ? enc->name.c_str() : "none", Anope::VersionBuildString().c_str()));
|
||||
}
|
||||
Uplink::Send("SINFO", "customversion", Anope::Format("%s -- (%s) -- %s", IRCD->GetProtocolName().c_str(), enc ? enc->name.c_str() : "none", Anope::VersionBuildString().c_str()));
|
||||
Uplink::Send("SINFO", "rawbranch", "Anope-" + Anope::VersionShort());
|
||||
Uplink::Send("SINFO", "rawversion", "Anope-" + Anope::VersionShort());
|
||||
}
|
||||
|
||||
void SendEOB() override
|
||||
{
|
||||
Uplink::Send("ENDBURST");
|
||||
|
||||
if (spanningtree_proto_ver < 1206)
|
||||
SendGlobops(Me, "Support for InspIRCd v3 is deprecated and will be removed in a future release. Please consider upgrading to InspIRCd v4.");
|
||||
}
|
||||
|
||||
void SendGlobops(const MessageSource &source, const Anope::string &buf) override
|
||||
@@ -711,9 +670,6 @@ public:
|
||||
|
||||
void SendOper(User *u) override
|
||||
{
|
||||
if (spanningtree_proto_ver < 1206)
|
||||
return; // We can't force an oper on this version.
|
||||
|
||||
const Anope::map<Anope::string> tags = {
|
||||
{ "~automatic", "" },
|
||||
};
|
||||
@@ -1238,13 +1194,12 @@ struct IRCDMessageCapab final
|
||||
if (params.size() >= 2)
|
||||
spanningtree_proto_ver = Anope::Convert<size_t>(params[1], 0);
|
||||
|
||||
if (spanningtree_proto_ver < 1205)
|
||||
if (spanningtree_proto_ver < 1206)
|
||||
throw ProtocolException("Protocol mismatch, no or invalid protocol version given in CAPAB START.");
|
||||
|
||||
Servers::Capab.clear();
|
||||
IRCD->CanClearModes.clear();
|
||||
IRCD->CanSQLineChannel = false;
|
||||
IRCD->CanSVSHold = false;
|
||||
IRCD->CanTagMessage = false;
|
||||
IRCD->DefaultPseudoclientModes = "+oI";
|
||||
}
|
||||
@@ -1263,11 +1218,7 @@ struct IRCDMessageCapab final
|
||||
if (mode.name.equals_cs("admin"))
|
||||
cm = new ChannelModeStatus("PROTECT", mode.letter, mode.symbol, mode.level);
|
||||
else if (mode.name.equals_cs("allowinvite"))
|
||||
{
|
||||
cm = new ChannelMode("ALLINVITE", mode.letter);
|
||||
if (spanningtree_proto_ver < 1206)
|
||||
ModeManager::AddChannelMode(new InspIRCdExtBan::EntryMatcher("INVITEBAN", "", 'A'));
|
||||
}
|
||||
else if (mode.name.equals_cs("auditorium"))
|
||||
cm = new ChannelMode("AUDITORIUM", mode.letter);
|
||||
else if (mode.name.equals_cs("autoop"))
|
||||
@@ -1277,17 +1228,9 @@ struct IRCDMessageCapab final
|
||||
else if (mode.name.equals_cs("banexception"))
|
||||
cm = new ChannelModeList("EXCEPT", mode.letter);
|
||||
else if (mode.name.equals_cs("blockcaps"))
|
||||
{
|
||||
cm = new ChannelMode("BLOCKCAPS", mode.letter);
|
||||
if (spanningtree_proto_ver < 1206)
|
||||
ModeManager::AddChannelMode(new InspIRCdExtBan::EntryMatcher("BLOCKCAPSBAN", "", 'B'));
|
||||
}
|
||||
else if (mode.name.equals_cs("blockcolor"))
|
||||
{
|
||||
cm = new ChannelMode("BLOCKCOLOR", mode.letter);
|
||||
if (spanningtree_proto_ver < 1206)
|
||||
ModeManager::AddChannelMode(new InspIRCdExtBan::EntryMatcher("BLOCKCOLORBAN", "", 'c'));
|
||||
}
|
||||
else if (mode.name.equals_cs("c_registered"))
|
||||
cm = new ChannelModeNoone("REGISTERED", mode.letter);
|
||||
else if (mode.name.equals_cs("censor"))
|
||||
@@ -1323,43 +1266,23 @@ struct IRCDMessageCapab final
|
||||
else if (mode.name.equals_cs("nickflood"))
|
||||
cm = new ColonDelimitedParamMode("NICKFLOOD", mode.letter);
|
||||
else if (mode.name.equals_cs("noctcp"))
|
||||
{
|
||||
cm = new ChannelMode("NOCTCP", mode.letter);
|
||||
if (spanningtree_proto_ver < 1206)
|
||||
ModeManager::AddChannelMode(new InspIRCdExtBan::EntryMatcher("NOCTCPBAN", "", 'C'));
|
||||
}
|
||||
else if (mode.name.equals_cs("noextmsg"))
|
||||
cm = new ChannelMode("NOEXTERNAL", mode.letter);
|
||||
else if (mode.name.equals_cs("nokick"))
|
||||
{
|
||||
cm = new ChannelMode("NOKICK", mode.letter);
|
||||
if (spanningtree_proto_ver < 1206)
|
||||
ModeManager::AddChannelMode(new InspIRCdExtBan::EntryMatcher("NOKICKBAN", "", 'Q'));
|
||||
}
|
||||
else if (mode.name.equals_cs("noknock"))
|
||||
cm = new ChannelMode("NOKNOCK", mode.letter);
|
||||
else if (mode.name.equals_cs("nonick"))
|
||||
{
|
||||
cm = new ChannelMode("NONICK", mode.letter);
|
||||
if (spanningtree_proto_ver < 1206)
|
||||
ModeManager::AddChannelMode(new InspIRCdExtBan::EntryMatcher("NONICKBAN", "", 'N'));
|
||||
}
|
||||
else if (mode.name.equals_cs("nonotice"))
|
||||
{
|
||||
cm = new ChannelMode("NONOTICE", mode.letter);
|
||||
if (spanningtree_proto_ver < 1206)
|
||||
ModeManager::AddChannelMode(new InspIRCdExtBan::EntryMatcher("NONOTICEBAN", "", 'T'));
|
||||
}
|
||||
else if (mode.name.equals_cs("official-join"))
|
||||
cm = new ChannelModeStatus("OFFICIALJOIN", mode.letter, mode.symbol, mode.level);
|
||||
else if (mode.name.equals_cs("op"))
|
||||
cm = new ChannelModeStatus("OP", mode.letter, mode.symbol, mode.level);
|
||||
else if (mode.name.equals_cs("operonly"))
|
||||
{
|
||||
cm = new ChannelModeOperOnly("OPERONLY", mode.letter);
|
||||
if (spanningtree_proto_ver < 1206)
|
||||
ModeManager::AddChannelMode(new InspIRCdExtBan::OperMatcher("OPERTYPEBAN", "", 'O', "opertype"));
|
||||
}
|
||||
else if (mode.name.equals_cs("operprefix"))
|
||||
cm = new ChannelModeStatus("OPERPREFIX", mode.letter, mode.symbol, mode.level);
|
||||
else if (mode.name.equals_cs("permanent"))
|
||||
@@ -1375,17 +1298,9 @@ struct IRCDMessageCapab final
|
||||
else if (mode.name.equals_cs("secret"))
|
||||
cm = new ChannelMode("SECRET", mode.letter);
|
||||
else if (mode.name.equals_cs("sslonly"))
|
||||
{
|
||||
cm = new ChannelMode("SSL", mode.letter);
|
||||
if (spanningtree_proto_ver < 1206)
|
||||
ModeManager::AddChannelMode(new InspIRCdExtBan::FingerprintMatcher("SSLBAN", "", 'z'));
|
||||
}
|
||||
else if (mode.name.equals_cs("stripcolor"))
|
||||
{
|
||||
cm = new ChannelMode("STRIPCOLOR", mode.letter);
|
||||
if (spanningtree_proto_ver < 1206)
|
||||
ModeManager::AddChannelMode(new InspIRCdExtBan::EntryMatcher("STRIPCOLORBAN", "", 'S'));
|
||||
}
|
||||
else if (mode.name.equals_cs("topiclock"))
|
||||
cm = new ChannelMode("TOPIC", mode.letter);
|
||||
else if (mode.name.equals_cs("voice"))
|
||||
@@ -1545,87 +1460,37 @@ struct IRCDMessageCapab final
|
||||
Anope::string modname, moddata;
|
||||
ParseModule(module, modname, moddata);
|
||||
|
||||
if (spanningtree_proto_ver >= 1206)
|
||||
{
|
||||
// InspIRCd v4
|
||||
Anope::map<Anope::string> modmap;
|
||||
ParseModuleData(moddata, modmap);
|
||||
Anope::map<Anope::string> modmap;
|
||||
ParseModuleData(moddata, modmap);
|
||||
|
||||
if (modname.equals_cs("account"))
|
||||
Servers::Capab.insert("ACCOUNT");
|
||||
if (modname.equals_cs("account"))
|
||||
Servers::Capab.insert("ACCOUNT");
|
||||
|
||||
else if (modname.equals_cs("cban"))
|
||||
IRCD->CanSQLineChannel = true;
|
||||
else if (modname.equals_cs("cban"))
|
||||
IRCD->CanSQLineChannel = true;
|
||||
|
||||
else if (modname.equals_cs("globops"))
|
||||
Servers::Capab.insert("GLOBOPS");
|
||||
|
||||
else if (modname.equals_cs("rline"))
|
||||
{
|
||||
Servers::Capab.insert("RLINE");
|
||||
auto iter = modmap.find("regex");
|
||||
if (iter != modmap.end())
|
||||
inspircdregex = "regex/" + iter->second;
|
||||
}
|
||||
|
||||
else if (modname.equals_cs("services"))
|
||||
{
|
||||
IRCD->CanSVSHold = true;
|
||||
Servers::Capab.insert("SERVICES");
|
||||
Servers::Capab.insert("TOPICLOCK");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// InspIRCd v3
|
||||
if (modname.equals_cs("cban") && moddata.equals_cs("glob"))
|
||||
IRCD->CanSQLineChannel = true;
|
||||
|
||||
else if (modname.equals_cs("channelban"))
|
||||
ModeManager::AddChannelMode(new InspIRCdExtBan::ChannelMatcher("CHANNELBAN", "", 'j'));
|
||||
|
||||
else if (modname.equals_cs("gecosban"))
|
||||
ModeManager::AddChannelMode(new InspIRCdExtBan::RealnameMatcher("REALNAMEBAN", "", 'r'));
|
||||
|
||||
else if (modname.equals_cs("muteban"))
|
||||
ModeManager::AddChannelMode(new InspIRCdExtBan::EntryMatcher("QUIET", "", 'm'));
|
||||
|
||||
else if (modname.equals_cs("nopartmsg"))
|
||||
ModeManager::AddChannelMode(new InspIRCdExtBan::EntryMatcher("PARTMESSAGEBAN", "", 'p'));
|
||||
|
||||
else if (modname.equals_cs("rline"))
|
||||
{
|
||||
Servers::Capab.insert("RLINE");
|
||||
inspircdregex = moddata;
|
||||
}
|
||||
|
||||
else if (modname.equals_cs("serverban"))
|
||||
ModeManager::AddChannelMode(new InspIRCdExtBan::ServerMatcher("SERVERBAN", "", 's'));
|
||||
|
||||
else if (modname.equals_cs("services_account"))
|
||||
{
|
||||
Servers::Capab.insert("ACCOUNT");
|
||||
Servers::Capab.insert("SERVICES");
|
||||
ModeManager::AddChannelMode(new InspIRCdExtBan::AccountMatcher("ACCOUNTBAN", "", 'R'));
|
||||
ModeManager::AddChannelMode(new InspIRCdExtBan::UnidentifiedMatcher("UNREGISTEREDBAN", "", 'U'));
|
||||
}
|
||||
|
||||
else if (modname.equals_cs("svshold"))
|
||||
IRCD->CanSVSHold = true;
|
||||
|
||||
else if (modname.equals_cs("topiclock"))
|
||||
Servers::Capab.insert("TOPICLOCK");
|
||||
}
|
||||
|
||||
// InspIRCd v3 and v4
|
||||
if (modname.equals_cs("chghost"))
|
||||
else if (modname.equals_cs("chghost"))
|
||||
Servers::Capab.insert("CHGHOST");
|
||||
|
||||
else if (modname.equals_cs("chgident"))
|
||||
Servers::Capab.insert("CHGIDENT");
|
||||
|
||||
else if (modname.equals_cs("globops"))
|
||||
Servers::Capab.insert("GLOBOPS");
|
||||
|
||||
else if (modname.equals_cs("ircv3_ctctags"))
|
||||
IRCD->CanTagMessage = true;
|
||||
|
||||
else if (modname.equals_cs("rline"))
|
||||
{
|
||||
Servers::Capab.insert("RLINE");
|
||||
auto iter = modmap.find("regex");
|
||||
if (iter != modmap.end())
|
||||
inspircdregex = "regex/" + iter->second;
|
||||
}
|
||||
|
||||
else if (modname.equals_cs("services"))
|
||||
Servers::Capab.insert("SERVICES");
|
||||
}
|
||||
|
||||
const auto &anoperegex = Config->GetBlock("options").Get<const Anope::string>("regexengine");
|
||||
@@ -1651,46 +1516,25 @@ struct IRCDMessageCapab final
|
||||
IRCD->MaxNick = Anope::Convert<size_t>(tokvalue, IRCD->MaxNick);
|
||||
else if (tokname == "MAXUSER")
|
||||
IRCD->MaxUser = Anope::Convert<size_t>(tokvalue, IRCD->MaxUser);
|
||||
|
||||
// Deprecated 1205 keys.
|
||||
else if (tokname == "CHANMAX")
|
||||
IRCD->MaxChannel = Anope::Convert<size_t>(tokvalue, IRCD->MaxChannel);
|
||||
else if (tokname == "GLOBOPS" && Anope::Convert<bool>(tokvalue, false))
|
||||
Servers::Capab.insert("GLOBOPS");
|
||||
else if (tokname == "IDENTMAX")
|
||||
IRCD->MaxUser = Anope::Convert<size_t>(tokvalue, IRCD->MaxUser);
|
||||
else if (tokname == "NICKMAX")
|
||||
IRCD->MaxNick = Anope::Convert<size_t>(tokvalue, IRCD->MaxNick);
|
||||
}
|
||||
}
|
||||
else if (params[0].equals_cs("END"))
|
||||
{
|
||||
if (spanningtree_proto_ver < 1206)
|
||||
{
|
||||
if (!Servers::Capab.count("ACCOUNT") || !Servers::Capab.count("SERVICES"))
|
||||
throw ProtocolException("The services_account module is not loaded. This is required by Anope.");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!Servers::Capab.count("ACCOUNT"))
|
||||
throw ProtocolException("The account module is not loaded. This is required by Anope.");
|
||||
if (!Servers::Capab.count("ACCOUNT"))
|
||||
throw ProtocolException("The account module is not loaded. This is required by Anope.");
|
||||
|
||||
if (!Servers::Capab.count("SERVICES"))
|
||||
throw ProtocolException("The services module is not loaded. This is required by Anope.");
|
||||
if (!Servers::Capab.count("SERVICES"))
|
||||
throw ProtocolException("The services module is not loaded. This is required by Anope.");
|
||||
|
||||
for (auto *cm : ModeManager::GetChannelModes())
|
||||
{
|
||||
if (cm->type == MODE_LIST && cm->mchar)
|
||||
IRCD->CanClearModes.insert(cm->name);
|
||||
}
|
||||
for (auto *cm : ModeManager::GetChannelModes())
|
||||
{
|
||||
if (cm->type == MODE_LIST && cm->mchar)
|
||||
IRCD->CanClearModes.insert(cm->name);
|
||||
}
|
||||
|
||||
if (!ModeManager::FindUserModeByName("PRIV"))
|
||||
throw ProtocolException("The hidechans module is not loaded. This is required by Anope.");
|
||||
|
||||
if (!IRCD->CanSVSHold)
|
||||
Log() << "The remote server does not have the svshold module; fake users will be used for nick protection until the module is loaded.";
|
||||
|
||||
if (!IRCD->CanSQLineChannel)
|
||||
Log() << "The remote server does not have the cban module; services will manually enforce forbidden channels until the module is loaded.";
|
||||
|
||||
@@ -1706,10 +1550,7 @@ struct IRCDMessageCapab final
|
||||
if (!Servers::Capab.count("GLOBOPS"))
|
||||
Log() << "The remote server does not have the globops module; oper notices will be sent as announcements until the module is loaded.";
|
||||
|
||||
if (spanningtree_proto_ver < 1206)
|
||||
Uplink::Send("SERVER", Me->GetName(), GetPassword(), 0, Me->GetSID(), Me->GetDescription());
|
||||
else
|
||||
Uplink::Send("SERVER", Me->GetName(), GetPassword(), Me->GetSID(), Me->GetDescription());
|
||||
Uplink::Send("SERVER", Me->GetName(), GetPassword(), Me->GetSID(), Me->GetDescription());
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -1730,10 +1571,7 @@ struct IRCDMessageChgHost final
|
||||
return;
|
||||
|
||||
u->SetDisplayedHost(params[1]);
|
||||
if (spanningtree_proto_ver >= 1206)
|
||||
Uplink::Send(u, "FHOST", u->GetDisplayedHost(), '*');
|
||||
else
|
||||
Uplink::Send(u, "FHOST", u->GetDisplayedHost());
|
||||
Uplink::Send(u, "FHOST", u->GetDisplayedHost(), '*');
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1753,10 +1591,7 @@ struct IRCDMessageChgIdent final
|
||||
return;
|
||||
|
||||
u->SetIdent(params[1]);
|
||||
if (spanningtree_proto_ver >= 1206)
|
||||
Uplink::Send(u, "FIDENT", u->GetIdent(), '*');
|
||||
else
|
||||
Uplink::Send(u, "FIDENT", u->GetIdent());
|
||||
Uplink::Send(u, "FIDENT", u->GetIdent(), '*');
|
||||
}
|
||||
};
|
||||
|
||||
@@ -2021,14 +1856,6 @@ private:
|
||||
required = true;
|
||||
|
||||
else if (modname.equals_cs("cban"))
|
||||
{
|
||||
if (plus && (spanningtree_proto_ver >= 1206 || moddata == "glob"))
|
||||
IRCD->CanSQLineChannel = true;
|
||||
else
|
||||
IRCD->CanSQLineChannel = false;
|
||||
}
|
||||
|
||||
else if (modname.equals_cs("cban") && spanningtree_proto_ver >= 1206)
|
||||
IRCD->CanSQLineChannel = plus;
|
||||
|
||||
else if (modname.equals_cs("chghost"))
|
||||
@@ -2052,16 +1879,6 @@ private:
|
||||
else if (modname.equals_cs("services"))
|
||||
required = true;
|
||||
|
||||
// Deprecated 1205 modules.
|
||||
else if (modname.equals_cs("services_account"))
|
||||
required = true;
|
||||
|
||||
else if (modname.equals_cs("svshold"))
|
||||
IRCD->CanSVSHold = plus;
|
||||
|
||||
else if (modname.equals_cs("topiclock"))
|
||||
capab = "TOPICLOCK";
|
||||
|
||||
else
|
||||
return;
|
||||
|
||||
@@ -2492,18 +2309,16 @@ struct IRCDMessageServer final
|
||||
|
||||
void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) override
|
||||
{
|
||||
size_t paramcount = spanningtree_proto_ver < 1206 ? 5 : 4;
|
||||
if (!source.GetServer() && params.size() == paramcount)
|
||||
if (!source.GetServer() && params.size() == 4)
|
||||
{
|
||||
/*
|
||||
* SERVER testnet.inspircd.org hunter7 0 123 :InspIRCd Test Network
|
||||
* 0: name
|
||||
* 1: pass
|
||||
* 2: unused (v3 only)
|
||||
* 3(2): numeric
|
||||
* 4(3): desc
|
||||
* 2: numeric
|
||||
* 3: desc
|
||||
*/
|
||||
new Server(Me, params[0], 0, params.back(), params[spanningtree_proto_ver < 1206 ? 3 : 2]);
|
||||
new Server(Me, params[0], 0, params.back(), params[2]);
|
||||
}
|
||||
else if (source.GetServer())
|
||||
{
|
||||
@@ -2714,11 +2529,8 @@ public:
|
||||
SendChannelMetadata(ci->c, "mlock", modes);
|
||||
}
|
||||
|
||||
if (Servers::Capab.count("TOPICLOCK") && ci->c)
|
||||
{
|
||||
if (ci->HasExt("TOPICLOCK"))
|
||||
SendChannelMetadata(ci->c, "topiclock", "1");
|
||||
}
|
||||
if (ci->HasExt("TOPICLOCK"))
|
||||
SendChannelMetadata(ci->c, "topiclock", "1");
|
||||
}
|
||||
|
||||
void OnDelChan(ChannelInfo *ci) override
|
||||
@@ -2727,8 +2539,7 @@ public:
|
||||
return;
|
||||
|
||||
SendChannelMetadata(ci->c, "mlock", "");
|
||||
if (Servers::Capab.count("TOPICLOCK"))
|
||||
SendChannelMetadata(ci->c, "topiclock", "");
|
||||
SendChannelMetadata(ci->c, "topiclock", "");
|
||||
}
|
||||
|
||||
EventReturn OnMLock(ChannelInfo *ci, ModeLock *lock) override
|
||||
|
||||
@@ -257,8 +257,6 @@ struct IRCDMessageEncap final
|
||||
m.data.assign(params.begin() + 5, params.end());
|
||||
SASL::service->ProcessMessage(m);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -70,6 +70,11 @@ public:
|
||||
void SendLogin(User *u, NickAlias *na) override { ratbox->SendLogin(u, na); }
|
||||
void SendLogout(User *u) override { ratbox->SendLogout(u); }
|
||||
|
||||
bool IsTagValid(const Anope::string &tname, const Anope::string &tvalue) override
|
||||
{
|
||||
return !!Servers::Capab.count("STAG");
|
||||
}
|
||||
|
||||
void SendSASLMechanisms(std::vector<Anope::string> &mechanisms) override
|
||||
{
|
||||
Anope::string mechlist;
|
||||
@@ -108,7 +113,8 @@ public:
|
||||
* UNKLN - Can do UNKLINE (encap only)
|
||||
* QS - Can handle quit storm removal
|
||||
*/
|
||||
Uplink::Send("CAPAB", "BAN CHW CLUSTER EBMASK ECHO ENCAP EOPMOD EUID EX IE KLN KNOCK MLOCK QS RSFNC SERVICES TB UNKLN");
|
||||
// TODO: review the caps we send here.
|
||||
Uplink::Send("CAPAB", "BAN CHW CLUSTER EBMASK ECHO ENCAP EOPMOD EUID EX IE KLN KNOCK MLOCK QS RSFNC SERVICES STAG TB UNKLN");
|
||||
|
||||
/* Make myself known to myself in the serverlist */
|
||||
SendServer(Me);
|
||||
@@ -236,6 +242,26 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
struct IRCDMessageCapab final
|
||||
: Message::Capab
|
||||
{
|
||||
IRCDMessageCapab(Module *creator)
|
||||
: Message::Capab(creator)
|
||||
{
|
||||
}
|
||||
|
||||
void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) override
|
||||
{
|
||||
spacesepstream ss(params[0]);
|
||||
for (Anope::string capab; ss.GetToken(capab); )
|
||||
{
|
||||
if (capab.equals_cs("STAG"))
|
||||
IRCD->CanTagMessage = true;
|
||||
}
|
||||
Message::Capab::Run(source, params, tags);
|
||||
}
|
||||
};
|
||||
|
||||
struct IRCDMessageEBMask final
|
||||
: IRCDMessage
|
||||
{
|
||||
@@ -426,7 +452,6 @@ class ProtoSolanum final
|
||||
|
||||
/* Core message handlers */
|
||||
Message::Away message_away;
|
||||
Message::Capab message_capab;
|
||||
Message::Error message_error;
|
||||
Message::Invite message_invite;
|
||||
Message::Kick message_kick;
|
||||
@@ -447,7 +472,11 @@ class ProtoSolanum final
|
||||
ServiceAlias message_bmask, message_join, message_nick, message_pong, message_sid, message_sjoin,
|
||||
message_tb, message_tmode, message_uid;
|
||||
|
||||
/* Ignored message handlers. */
|
||||
Message::Ignore message_echo;
|
||||
|
||||
/* Our message handlers */
|
||||
IRCDMessageCapab message_capab;
|
||||
IRCDMessageEBMask message_ebmask;
|
||||
IRCDMessageEncap message_encap;
|
||||
IRCDMessageEUID message_euid;
|
||||
@@ -485,7 +514,6 @@ public:
|
||||
: Module(modname, creator, PROTOCOL | VENDOR)
|
||||
, ircd_proto(this)
|
||||
, message_away(this)
|
||||
, message_capab(this)
|
||||
, message_error(this)
|
||||
, message_invite(this)
|
||||
, message_kick(this)
|
||||
@@ -510,6 +538,8 @@ public:
|
||||
, message_tb("IRCDMessage", "solanum/tb", "ratbox/tb")
|
||||
, message_tmode("IRCDMessage", "solanum/tmode", "ratbox/tmode")
|
||||
, message_uid("IRCDMessage", "solanum/uid", "ratbox/uid")
|
||||
, message_echo(this, "ECHO")
|
||||
, message_capab(this)
|
||||
, message_ebmask(this)
|
||||
, message_encap(this)
|
||||
, message_euid(this)
|
||||
|
||||
@@ -27,7 +27,6 @@ class SQLAuthenticationResult final
|
||||
{
|
||||
Log(LOG_DEBUG) << "sql_authentication: Unsuccessful authentication for " << req->GetAccount() << ": " << reason;
|
||||
delete this;
|
||||
return;
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
+3
-3
@@ -50,15 +50,15 @@ set_target_properties(${PROGRAM_NAME} PROPERTIES LINKER_LANGUAGE CXX LINK_FLAGS
|
||||
|
||||
# On Windows, also link Anope to the wsock32 and Ws2_32 library, as well as set the version
|
||||
if(WIN32)
|
||||
target_link_libraries(${PROGRAM_NAME} wsock32 Ws2_32 ${LINK_LIBS} ${WIN32_MEMORY})
|
||||
target_link_libraries(${PROGRAM_NAME} PUBLIC wsock32 Ws2_32 ${LINK_LIBS} ${WIN32_MEMORY})
|
||||
set_target_properties(${PROGRAM_NAME} PROPERTIES VERSION "${VERSION_DOTTED}")
|
||||
else()
|
||||
target_link_libraries(${PROGRAM_NAME} ${LINK_LIBS})
|
||||
target_link_libraries(${PROGRAM_NAME} PUBLIC ${LINK_LIBS})
|
||||
endif()
|
||||
|
||||
# If being built with localisation we might need to link against libintl.
|
||||
if(HAVE_LOCALIZATION AND Intl_LIBRARY)
|
||||
target_link_libraries(${PROGRAM_NAME} ${Intl_LIBRARY})
|
||||
target_link_libraries(${PROGRAM_NAME} PUBLIC ${Intl_LIBRARY})
|
||||
endif()
|
||||
|
||||
# Building the Anope executable requires the version.h header to be generated
|
||||
|
||||
@@ -1019,6 +1019,7 @@ Anope::string Conf::ReplaceVars(const Anope::string &str, const File &file, int
|
||||
continue;
|
||||
}
|
||||
|
||||
auto found = false;
|
||||
for (int i = 0; i < this->CountBlock("define"); ++i)
|
||||
{
|
||||
const auto &define = this->GetBlock("define", i);
|
||||
@@ -1026,9 +1027,13 @@ Anope::string Conf::ReplaceVars(const Anope::string &str, const File &file, int
|
||||
if (defname == var)
|
||||
{
|
||||
ret.append(define.Get<const Anope::string>("value"));
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!found)
|
||||
throw ConfigException("Undefined variable: " + var + " at " + file.GetName() + ":" + Anope::ToString(linenumber));
|
||||
}
|
||||
|
||||
if (!str.equals_cs(ret))
|
||||
|
||||
+36
-34
@@ -97,41 +97,41 @@ const char *Language::Translate(const NickCore *nc, int count, const char *singu
|
||||
extern "C" int _nl_msg_cat_cntr;
|
||||
#endif
|
||||
|
||||
namespace
|
||||
void Language::SetLocale(const char* lang)
|
||||
{
|
||||
void PreTranslate(const char* lang)
|
||||
{
|
||||
if (!lang || !*lang)
|
||||
lang = Config->DefLanguage.c_str();
|
||||
|
||||
#if defined(__GLIBC__) && defined(__USE_GNU_GETTEXT)
|
||||
++_nl_msg_cat_cntr;
|
||||
++_nl_msg_cat_cntr;
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
SetThreadLocale(MAKELCID(MAKELANGID(WindowsGetLanguage(lang), SUBLANG_DEFAULT), SORT_DEFAULT));
|
||||
SetThreadLocale(MAKELCID(MAKELANGID(WindowsGetLanguage(lang), SUBLANG_DEFAULT), SORT_DEFAULT));
|
||||
#else
|
||||
/* First, set LANG and LANGUAGE env variables.
|
||||
* Some systems (Debian) don't care about this, so we must setlocale LC_ALL as well.
|
||||
* BUT if this call fails because the LANGUAGE env variable is set, setlocale resets
|
||||
* the locale to "C", which short circuits gettext and causes it to fail on systems that
|
||||
* use the LANGUAGE env variable. We must reset the locale to en_US (or, anything not
|
||||
* C or POSIX) then.
|
||||
*/
|
||||
setenv("LANG", lang, 1);
|
||||
setenv("LANGUAGE", lang, 1);
|
||||
if (setlocale(LC_ALL, lang) == NULL)
|
||||
setlocale(LC_ALL, "en_US");
|
||||
/* First, set LANG and LANGUAGE env variables.
|
||||
* Some systems (Debian) don't care about this, so we must setlocale LC_ALL as well.
|
||||
* BUT if this call fails because the LANGUAGE env variable is set, setlocale resets
|
||||
* the locale to "C", which short circuits gettext and causes it to fail on systems that
|
||||
* use the LANGUAGE env variable. We must reset the locale to en_US (or, anything not
|
||||
* C or POSIX) then.
|
||||
*/
|
||||
setenv("LANG", lang, 1);
|
||||
setenv("LANGUAGE", lang, 1);
|
||||
if (setlocale(LC_ALL, lang) == NULL)
|
||||
setlocale(LC_ALL, "en_US");
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
void PostTranslate()
|
||||
{
|
||||
void Language::ResetLocale()
|
||||
{
|
||||
#ifdef _WIN32
|
||||
SetThreadLocale(MAKELCID(MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), SORT_DEFAULT));
|
||||
SetThreadLocale(MAKELCID(MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), SORT_DEFAULT));
|
||||
#else
|
||||
unsetenv("LANGUAGE");
|
||||
unsetenv("LANG");
|
||||
setlocale(LC_ALL, "");
|
||||
unsetenv("LANGUAGE");
|
||||
unsetenv("LANG");
|
||||
setlocale(LC_ALL, "");
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
const char *Language::Translate(const char *lang, const char *string)
|
||||
@@ -139,16 +139,13 @@ const char *Language::Translate(const char *lang, const char *string)
|
||||
if (!string || !*string)
|
||||
return "";
|
||||
|
||||
if (!lang || !*lang)
|
||||
lang = Config->DefLanguage.c_str();
|
||||
|
||||
PreTranslate(lang);
|
||||
SetLocale(lang);
|
||||
|
||||
const char *translated_string = dgettext("anope", string);
|
||||
for (unsigned i = 0; translated_string == string && i < Domains.size(); ++i)
|
||||
translated_string = dgettext(Domains[i].c_str(), string);
|
||||
|
||||
PostTranslate();
|
||||
ResetLocale();
|
||||
return translated_string;
|
||||
}
|
||||
|
||||
@@ -157,19 +154,24 @@ const char *Language::Translate(const char *lang, int count, const char *singula
|
||||
if (!singular || !*singular || !plural || !*plural)
|
||||
return "";
|
||||
|
||||
if (!lang || !*lang)
|
||||
lang = Config->DefLanguage.c_str();
|
||||
|
||||
PreTranslate(lang);
|
||||
SetLocale(lang);
|
||||
|
||||
const char *translated_string = dngettext("anope", singular, plural, count);
|
||||
for (unsigned i = 0; (translated_string == singular || translated_string == plural) && i < Domains.size(); ++i)
|
||||
translated_string = dngettext(Domains[i].c_str(), singular, plural, count);
|
||||
|
||||
PostTranslate();
|
||||
ResetLocale();
|
||||
return translated_string;
|
||||
}
|
||||
#else
|
||||
void Language::SetLocale(const char* lang)
|
||||
{
|
||||
}
|
||||
|
||||
void Language::ResetLocale()
|
||||
{
|
||||
}
|
||||
|
||||
const char *Language::Translate(const char *lang, const char *string)
|
||||
{
|
||||
return string != NULL ? string : "";
|
||||
|
||||
+19
-3
@@ -619,12 +619,28 @@ Anope::string Anope::Duration(time_t t, const NickCore *nc, bool round)
|
||||
|
||||
Anope::string Anope::strftime(time_t t, const NickCore *nc, bool short_output)
|
||||
{
|
||||
static ExtensibleRef<Anope::string> timezone("timezone");
|
||||
if (nc)
|
||||
{
|
||||
Language::SetLocale(nc->language.c_str());
|
||||
auto *tz = timezone ? timezone->Get(nc) : nullptr;
|
||||
setenv("TZ", tz ? tz->c_str() : "UTC", 1);
|
||||
tzset();
|
||||
}
|
||||
|
||||
char buf[BUFSIZE];
|
||||
strftime(buf, sizeof(buf), Language::Translate(nc, _("%b %d %Y %H:%M:%S %Z")), gmtime(&t));
|
||||
strftime(buf, sizeof(buf), "%c", (nc ? localtime(&t) : gmtime(&t)));
|
||||
|
||||
if (nc)
|
||||
{
|
||||
unsetenv("TZ");
|
||||
tzset();
|
||||
Language::ResetLocale();
|
||||
}
|
||||
|
||||
if (short_output)
|
||||
return buf;
|
||||
|
||||
if (t < Anope::CurTime)
|
||||
else if (t < Anope::CurTime)
|
||||
return Anope::Format(Language::Translate(nc, _("%s (%s ago)")), buf, Duration(Anope::CurTime - t, nc, true).c_str());
|
||||
else if (t > Anope::CurTime)
|
||||
return Anope::Format(Language::Translate(nc, _("%s (%s from now)")), buf, Duration(t - Anope::CurTime, nc, true).c_str(), nc);
|
||||
|
||||
+9
-9
@@ -233,7 +233,7 @@ void IRCDProto::SendGlobops(const MessageSource &source, const Anope::string &me
|
||||
Uplink::Send(source, "GLOBOPS", message);
|
||||
}
|
||||
|
||||
void IRCDProto::SendNumericInternal(int numeric, const Anope::string &dest, const std::vector<Anope::string> ¶ms)
|
||||
void IRCDProto::SendNumericInternal(unsigned numeric, const Anope::string &dest, const std::vector<Anope::string> ¶ms)
|
||||
{
|
||||
Anope::string n = Anope::ToString(numeric);
|
||||
if (numeric < 10)
|
||||
@@ -388,18 +388,18 @@ Anope::string IRCDProto::NormalizeMask(const Anope::string &mask)
|
||||
return Entry("", mask).GetNUHMask();
|
||||
}
|
||||
|
||||
void IRCDProto::SendContextNotice(BotInfo *bi, User *target, Channel *context, const Anope::string &msg)
|
||||
void IRCDProto::SendContextNotice(BotInfo *bi, User *target, Channel *context, const Anope::string &msg, const Anope::map<Anope::string> &tags)
|
||||
{
|
||||
IRCD->SendNotice(bi, target->GetUID(), Anope::Format("[%s] %s", context->name.c_str(), msg.c_str()), {
|
||||
{ "+draft/channel-context", context->name },
|
||||
});
|
||||
auto newtags = tags;
|
||||
newtags["+draft/channel-context"] = context->name;
|
||||
IRCD->SendNotice(bi, target->GetUID(), Anope::Format("[%s] %s", context->name.c_str(), msg.c_str()), newtags);
|
||||
}
|
||||
|
||||
void IRCDProto::SendContextPrivmsg(BotInfo *bi, User *target, Channel *context, const Anope::string &msg)
|
||||
void IRCDProto::SendContextPrivmsg(BotInfo *bi, User *target, Channel *context, const Anope::string &msg, const Anope::map<Anope::string> &tags)
|
||||
{
|
||||
IRCD->SendPrivmsg(bi, target->GetUID(), Anope::Format("[%s] %s", context->name.c_str(), msg.c_str()), {
|
||||
{ "+draft/channel-context", context->name },
|
||||
});
|
||||
auto newtags = tags;
|
||||
newtags["+draft/channel-context"] = context->name;
|
||||
IRCD->SendPrivmsg(bi, target->GetUID(), Anope::Format("[%s] %s", context->name.c_str(), msg.c_str()), newtags);
|
||||
}
|
||||
|
||||
MessageSource::MessageSource(const Anope::string &src) : source(src)
|
||||
|
||||
+1
-1
@@ -2,5 +2,5 @@
|
||||
|
||||
VERSION_MAJOR=2
|
||||
VERSION_MINOR=1
|
||||
VERSION_PATCH=18
|
||||
VERSION_PATCH=19
|
||||
VERSION_EXTRA=""
|
||||
|
||||
Vendored
+1
-1
@@ -38,7 +38,7 @@ This directory contains vendored dependencies that are shipped with Anope to avo
|
||||
|
||||
**License** — Boost Software License
|
||||
|
||||
**Version** — v4.0.6
|
||||
**Version** — v4.0.8
|
||||
|
||||
**Website** — [https://github.com/nemtrif/utfcpp](https://github.com/nemtrif/utfcpp)
|
||||
|
||||
|
||||
Vendored
+33
-23
@@ -43,9 +43,14 @@ DEALINGS IN THE SOFTWARE.
|
||||
#if UTF_CPP_CPLUSPLUS >= 201103L // C++ 11 or later
|
||||
#define UTF_CPP_OVERRIDE override
|
||||
#define UTF_CPP_NOEXCEPT noexcept
|
||||
#define UTF_CPP_STATIC_ASSERT(condition) static_assert(condition, "UTFCPP static assert");
|
||||
#else // C++ 98/03
|
||||
#define UTF_CPP_OVERRIDE
|
||||
#define UTF_CPP_NOEXCEPT throw()
|
||||
// Simulate static_assert:
|
||||
template <bool Condition> struct StaticAssert {static void utf8_static_assert() {char static_assert_impl[Condition ? 1 : 0]; } };
|
||||
template <> struct StaticAssert<true> {static void utf8_static_assert() {}};
|
||||
#define UTF_CPP_STATIC_ASSERT(condition) StaticAssert<condition>::utf8_static_assert();
|
||||
#endif // C++ 11 or later
|
||||
|
||||
|
||||
@@ -87,6 +92,7 @@ namespace internal
|
||||
{
|
||||
return static_cast<utfchar8_t>(0xff & oc);
|
||||
}
|
||||
|
||||
template<typename u16_type>
|
||||
inline utfchar16_t mask16(u16_type oc)
|
||||
{
|
||||
@@ -101,17 +107,17 @@ namespace internal
|
||||
|
||||
inline bool is_lead_surrogate(utfchar32_t cp)
|
||||
{
|
||||
return (cp >= LEAD_SURROGATE_MIN && cp <= LEAD_SURROGATE_MAX);
|
||||
return (cp >= static_cast<utfchar32_t>(LEAD_SURROGATE_MIN) && cp <= static_cast<utfchar32_t>(LEAD_SURROGATE_MAX));
|
||||
}
|
||||
|
||||
inline bool is_trail_surrogate(utfchar32_t cp)
|
||||
{
|
||||
return (cp >= TRAIL_SURROGATE_MIN && cp <= TRAIL_SURROGATE_MAX);
|
||||
return (cp >= static_cast<utfchar32_t>(TRAIL_SURROGATE_MIN) && cp <= static_cast<utfchar32_t>(TRAIL_SURROGATE_MAX));
|
||||
}
|
||||
|
||||
inline bool is_surrogate(utfchar32_t cp)
|
||||
{
|
||||
return (cp >= LEAD_SURROGATE_MIN && cp <= TRAIL_SURROGATE_MAX);
|
||||
return (cp >= static_cast<utfchar32_t>(LEAD_SURROGATE_MIN) && cp <= static_cast<utfchar32_t>(TRAIL_SURROGATE_MAX));
|
||||
}
|
||||
|
||||
inline bool is_code_point_valid(utfchar32_t cp)
|
||||
@@ -143,15 +149,15 @@ namespace internal
|
||||
inline bool is_overlong_sequence(utfchar32_t cp, int length)
|
||||
{
|
||||
if (cp < 0x80) {
|
||||
if (length != 1)
|
||||
if (length != 1)
|
||||
return true;
|
||||
}
|
||||
else if (cp < 0x800) {
|
||||
if (length != 2)
|
||||
if (length != 2)
|
||||
return true;
|
||||
}
|
||||
else if (cp < 0x10000) {
|
||||
if (length != 3)
|
||||
if (length != 3)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -181,7 +187,7 @@ namespace internal
|
||||
if (it == end)
|
||||
return NOT_ENOUGH_ROOM;
|
||||
|
||||
code_point = utf8::internal::mask8(*it);
|
||||
code_point = static_cast<utfchar32_t>(utf8::internal::mask8(*it));
|
||||
|
||||
return UTF8_OK;
|
||||
}
|
||||
@@ -189,10 +195,10 @@ namespace internal
|
||||
template <typename octet_iterator>
|
||||
utf_error get_sequence_2(octet_iterator& it, octet_iterator end, utfchar32_t& code_point)
|
||||
{
|
||||
if (it == end)
|
||||
if (it == end)
|
||||
return NOT_ENOUGH_ROOM;
|
||||
|
||||
code_point = utf8::internal::mask8(*it);
|
||||
code_point = static_cast<utfchar32_t>(utf8::internal::mask8(*it));
|
||||
|
||||
UTF8_CPP_INCREASE_AND_RETURN_ON_ERROR(it, end)
|
||||
|
||||
@@ -206,8 +212,8 @@ namespace internal
|
||||
{
|
||||
if (it == end)
|
||||
return NOT_ENOUGH_ROOM;
|
||||
|
||||
code_point = utf8::internal::mask8(*it);
|
||||
|
||||
code_point = static_cast<utfchar32_t>(utf8::internal::mask8(*it));
|
||||
|
||||
UTF8_CPP_INCREASE_AND_RETURN_ON_ERROR(it, end)
|
||||
|
||||
@@ -226,7 +232,7 @@ namespace internal
|
||||
if (it == end)
|
||||
return NOT_ENOUGH_ROOM;
|
||||
|
||||
code_point = utf8::internal::mask8(*it);
|
||||
code_point = static_cast<utfchar32_t>(utf8::internal::mask8(*it));
|
||||
|
||||
UTF8_CPP_INCREASE_AND_RETURN_ON_ERROR(it, end)
|
||||
|
||||
@@ -290,7 +296,7 @@ namespace internal
|
||||
else
|
||||
err = OVERLONG_SEQUENCE;
|
||||
}
|
||||
else
|
||||
else
|
||||
err = INVALID_CODE_POINT;
|
||||
}
|
||||
|
||||
@@ -308,6 +314,10 @@ namespace internal
|
||||
template <typename word_iterator>
|
||||
utf_error validate_next16(word_iterator& it, word_iterator end, utfchar32_t& code_point)
|
||||
{
|
||||
// Make sure the iterator dereferences a large enough type
|
||||
typedef typename std::iterator_traits<word_iterator>::value_type word_type;
|
||||
UTF_CPP_STATIC_ASSERT(sizeof(word_type) >= sizeof(utfchar16_t));
|
||||
// Check the edge case:
|
||||
if (it == end)
|
||||
return NOT_ENOUGH_ROOM;
|
||||
// Save the original value of it so we can go back in case of failure
|
||||
@@ -326,14 +336,14 @@ namespace internal
|
||||
err = NOT_ENOUGH_ROOM;
|
||||
else if (is_lead_surrogate(first_word)) {
|
||||
const utfchar16_t second_word = *it++;
|
||||
if (is_trail_surrogate(second_word)) {
|
||||
code_point = static_cast<utfchar32_t>(first_word << 10) + second_word + SURROGATE_OFFSET;
|
||||
if (is_trail_surrogate(static_cast<utfchar32_t>(second_word))) {
|
||||
code_point = static_cast<utfchar32_t>(first_word << 10) + static_cast<utfchar32_t>(second_word) + SURROGATE_OFFSET;
|
||||
return UTF8_OK;
|
||||
} else
|
||||
err = INCOMPLETE_SEQUENCE;
|
||||
|
||||
} else
|
||||
err = INCOMPLETE_SEQUENCE;
|
||||
|
||||
} else {
|
||||
err = INVALID_LEAD;
|
||||
err = INVALID_LEAD;
|
||||
}
|
||||
}
|
||||
// error branch
|
||||
@@ -365,7 +375,7 @@ namespace internal
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
// One of the following overloads will be invoked from the API calls
|
||||
|
||||
// A simple (but dangerous) case: the caller appends byte(s) to a char array
|
||||
@@ -395,6 +405,7 @@ namespace internal
|
||||
// the word_type.
|
||||
template <typename word_iterator, typename word_type>
|
||||
word_iterator append16(utfchar32_t cp, word_iterator result) {
|
||||
UTF_CPP_STATIC_ASSERT(sizeof(word_type) >= sizeof(utfchar16_t));
|
||||
if (is_in_bmp(cp))
|
||||
*(result++) = static_cast<word_type>(cp);
|
||||
else {
|
||||
@@ -444,7 +455,7 @@ namespace internal
|
||||
inline const char* find_invalid(const char* str)
|
||||
{
|
||||
const char* end = str + std::strlen(str);
|
||||
return find_invalid(str, end);
|
||||
return find_invalid(str, end);
|
||||
}
|
||||
|
||||
inline std::size_t find_invalid(const std::string& s)
|
||||
@@ -484,9 +495,8 @@ namespace internal
|
||||
inline bool starts_with_bom(const std::string& s)
|
||||
{
|
||||
return starts_with_bom(s.begin(), s.end());
|
||||
}
|
||||
}
|
||||
} // namespace utf8
|
||||
|
||||
#endif // header guard
|
||||
|
||||
|
||||
|
||||
Vendored
+11
-12
@@ -82,7 +82,7 @@ namespace utf8
|
||||
template <typename octet_iterator, typename output_iterator>
|
||||
inline output_iterator replace_invalid(octet_iterator start, octet_iterator end, output_iterator out)
|
||||
{
|
||||
static const utfchar32_t replacement_marker = utf8::internal::mask16(0xfffd);
|
||||
static const utfchar32_t replacement_marker = static_cast<utfchar32_t>(utf8::internal::mask16(0xfffd));
|
||||
return utf8::unchecked::replace_invalid(start, end, out, replacement_marker);
|
||||
}
|
||||
|
||||
@@ -108,22 +108,22 @@ namespace utf8
|
||||
case 1:
|
||||
break;
|
||||
case 2:
|
||||
it++;
|
||||
++it;
|
||||
cp = ((cp << 6) & 0x7ff) + ((*it) & 0x3f);
|
||||
break;
|
||||
case 3:
|
||||
++it;
|
||||
++it;
|
||||
cp = ((cp << 12) & 0xffff) + ((utf8::internal::mask8(*it) << 6) & 0xfff);
|
||||
++it;
|
||||
cp = static_cast<utfchar32_t>(cp + ((*it) & 0x3f));
|
||||
break;
|
||||
case 4:
|
||||
++it;
|
||||
cp = ((cp << 18) & 0x1fffff) + ((utf8::internal::mask8(*it) << 12) & 0x3ffff);
|
||||
cp = ((cp << 18) & 0x1fffff) + ((utf8::internal::mask8(*it) << 12) & 0x3ffff);
|
||||
++it;
|
||||
cp = static_cast<utfchar32_t>(cp + ((utf8::internal::mask8(*it) << 6) & 0xfff));
|
||||
++it;
|
||||
cp = static_cast<utfchar32_t>(cp + ((*it) & 0x3f));
|
||||
cp = static_cast<utfchar32_t>(cp + ((*it) & 0x3f));
|
||||
break;
|
||||
}
|
||||
++it;
|
||||
@@ -173,7 +173,7 @@ namespace utf8
|
||||
distance(octet_iterator first, octet_iterator last)
|
||||
{
|
||||
typename std::iterator_traits<octet_iterator>::difference_type dist;
|
||||
for (dist = 0; first < last; ++dist)
|
||||
for (dist = 0; first < last; ++dist)
|
||||
utf8::unchecked::next(first);
|
||||
return dist;
|
||||
}
|
||||
@@ -247,15 +247,15 @@ namespace utf8
|
||||
octet_iterator temp = it;
|
||||
return utf8::unchecked::next(temp);
|
||||
}
|
||||
bool operator == (const iterator& rhs) const
|
||||
{
|
||||
bool operator == (const iterator& rhs) const
|
||||
{
|
||||
return (it == rhs.it);
|
||||
}
|
||||
bool operator != (const iterator& rhs) const
|
||||
{
|
||||
return !(operator == (rhs));
|
||||
}
|
||||
iterator& operator ++ ()
|
||||
iterator& operator ++ ()
|
||||
{
|
||||
::std::advance(it, utf8::internal::sequence_length(it));
|
||||
return *this;
|
||||
@@ -265,7 +265,7 @@ namespace utf8
|
||||
iterator temp = *this;
|
||||
::std::advance(it, utf8::internal::sequence_length(it));
|
||||
return temp;
|
||||
}
|
||||
}
|
||||
iterator& operator -- ()
|
||||
{
|
||||
utf8::unchecked::prior(it);
|
||||
@@ -280,8 +280,7 @@ namespace utf8
|
||||
}; // class iterator
|
||||
|
||||
} // namespace utf8::unchecked
|
||||
} // namespace utf8
|
||||
|
||||
} // namespace utf8
|
||||
|
||||
#endif // header guard
|
||||
|
||||
|
||||
Reference in New Issue
Block a user