mirror of
https://github.com/anope/anope.git
synced 2026-06-15 18:14:46 +02:00
Compare commits
30 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 72318a6bf0 | |||
| 2f77cb38e2 | |||
| 84ca4c0d27 | |||
| 1f9a197b18 | |||
| 0c5bf51378 | |||
| 1647968c50 | |||
| 5473311bd7 | |||
| f3ebb67469 | |||
| 0d149ce195 | |||
| d68ba1b570 | |||
| 1877833e73 | |||
| 63c3710785 | |||
| 0043d137e5 | |||
| 3e5d3c5bdc | |||
| 62deedfa75 | |||
| 44af4eac6b | |||
| 5fdc637327 | |||
| 7c93007aa6 | |||
| e8fee93a7e | |||
| 260539e987 | |||
| 4603cd467b | |||
| 00549bc9b2 | |||
| e0a6f7456b | |||
| 5a54b37aeb | |||
| 2e43665266 | |||
| 8b4cd65e2a | |||
| c08aaa86d1 | |||
| 87a8af0ad7 | |||
| 4691dfa3f0 | |||
| d41764bfd6 |
@@ -2,6 +2,9 @@ name: Windows CI
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
release:
|
||||
types:
|
||||
- published
|
||||
schedule:
|
||||
- cron: '0 0 * * 0'
|
||||
jobs:
|
||||
@@ -17,7 +20,7 @@ jobs:
|
||||
- name: Setup Conan
|
||||
uses: turtlebrowser/get-conan@v1.2
|
||||
with:
|
||||
version: 1.59.0
|
||||
version: 1.64.0
|
||||
|
||||
- name: Install libraries
|
||||
run: |
|
||||
@@ -27,9 +30,17 @@ jobs:
|
||||
run: |
|
||||
mkdir ${{ github.workspace }}\build
|
||||
cd ${{ github.workspace }}\build
|
||||
cmake -A "x64" -G "Visual Studio 16 2019" ..
|
||||
cmake -A "x64" -D "CMAKE_BUILD_TYPE=${{ github.event_name == 'release' && 'Release' || 'Debug' }}" -G "Visual Studio 16 2019" ..
|
||||
|
||||
- name: Build Anope
|
||||
working-directory: ${{ github.workspace }}\build
|
||||
run: |
|
||||
msbuild PACKAGE.vcxproj /M:3 /P:Configuration=Release /P:Platform=x64 /VERBOSITY:MINIMAL
|
||||
msbuild PACKAGE.vcxproj /M:3 /P:Configuration=${{ github.event_name == 'release' && 'Release' || 'Debug' }} /P:Platform=x64 /VERBOSITY:MINIMAL
|
||||
|
||||
- name: Upload installer
|
||||
if: "${{ github.event_name == 'release' }}"
|
||||
working-directory: ${{ github.workspace }}\build
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
gh release upload ${{ github.event.release.tag_name }} $(Get-ChildItem anope-*.exe)
|
||||
|
||||
+15
-12
@@ -256,8 +256,8 @@ endif()
|
||||
if(NOT BIN_DIR)
|
||||
set(BIN_DIR "bin")
|
||||
endif()
|
||||
if(NOT DB_DIR)
|
||||
set(DB_DIR "data")
|
||||
if(NOT DATA_DIR)
|
||||
set(DATA_DIR "data")
|
||||
endif()
|
||||
if(NOT DOC_DIR)
|
||||
set(DOC_DIR "doc")
|
||||
@@ -265,14 +265,14 @@ endif()
|
||||
if(NOT CONF_DIR)
|
||||
set(CONF_DIR "conf")
|
||||
endif()
|
||||
if(NOT LIB_DIR)
|
||||
set(LIB_DIR "lib")
|
||||
if(NOT MODULE_DIR)
|
||||
set(MODULE_DIR "modules")
|
||||
endif()
|
||||
if(NOT LOCALE_DIR)
|
||||
set(LOCALE_DIR "locale")
|
||||
endif()
|
||||
if(NOT LOGS_DIR)
|
||||
set(LOGS_DIR "logs")
|
||||
if(NOT LOG_DIR)
|
||||
set(LOG_DIR "logs")
|
||||
endif()
|
||||
|
||||
# Version number processing
|
||||
@@ -350,15 +350,17 @@ set(SERVICES_BINARY "$<TARGET_FILE:${PROGRAM_NAME}>")
|
||||
get_filename_component(SERVICES_BINARY ${SERVICES_BINARY} NAME)
|
||||
|
||||
# At install time, create the following additional directories
|
||||
install(CODE "file(MAKE_DIRECTORY \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${DB_DIR}/backups\")")
|
||||
install(CODE "file(MAKE_DIRECTORY \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${LOGS_DIR}\")")
|
||||
get_filename_component(ABSOLUTE_DATA_DIR ${DATA_DIR} REALPATH BASE_DIR ${CMAKE_INSTALL_PREFIX})
|
||||
get_filename_component(ABSOLUTE_LOG_DIR ${LOG_DIR} REALPATH BASE_DIR ${CMAKE_INSTALL_PREFIX})
|
||||
install(CODE "file(MAKE_DIRECTORY \"\$ENV{DESTDIR}${ABSOLUTE_DATA_DIR}/backups\")")
|
||||
install(CODE "file(MAKE_DIRECTORY \"\$ENV{DESTDIR}${ABSOLUTE_LOG_DIR}\")")
|
||||
if(WIN32)
|
||||
install(CODE "file(MAKE_DIRECTORY \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${DB_DIR}/runtime\")")
|
||||
install(CODE "file(MAKE_DIRECTORY \"\$ENV{DESTDIR}\${ABSOLUTE_DATA_DIR}/runtime\")")
|
||||
endif()
|
||||
# On non-Windows platforms, if RUNGROUP is set, change the permissions of the below directories, as well as the group of the data directory
|
||||
if(NOT WIN32 AND RUNGROUP)
|
||||
install(CODE "execute_process(COMMAND ${CHMOD} 2775 \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/\${DB_DIR}/backups\")")
|
||||
install(CODE "execute_process(COMMAND ${CHMOD} 2775 \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/\${LOGS_DIR}\")")
|
||||
install(CODE "execute_process(COMMAND ${CHMOD} 2775 \"\$ENV{DESTDIR}${ABSOLUTE_DATA_DIR}/backups\")")
|
||||
install(CODE "execute_process(COMMAND ${CHMOD} 2775 \"\$ENV{DESTDIR}${ABSOLUTE_LOG_DIR}\")")
|
||||
install(CODE "execute_process(COMMAND ${CHGRP} -R ${RUNGROUP} \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}\")")
|
||||
endif()
|
||||
# On Windows platforms, install extra files
|
||||
@@ -368,7 +370,8 @@ if(WIN32)
|
||||
)
|
||||
endif()
|
||||
|
||||
install(CODE "file(REMOVE_RECURSE \"$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${LIB_DIR}/modules\")")
|
||||
get_filename_component(ABSOLUTE_MODULE_DIR ${MODULE_DIR} REALPATH BASE_DIR ${CMAKE_INSTALL_PREFIX})
|
||||
install(CODE "file(REMOVE_RECURSE \"$ENV{DESTDIR}${ABSOLUTE_MODULE_DIR}\")")
|
||||
|
||||
# Only process the CPack section if we have CPack
|
||||
if(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
|
||||
|
||||
@@ -756,6 +756,7 @@ log
|
||||
* chanserv/auspex - Can see any information with /CHANSERV INFO
|
||||
* chanserv/no-register-limit - May register an unlimited number of channels and nicknames
|
||||
* chanserv/kick - Can kick and ban users from channels through ChanServ
|
||||
* chanserv/drop/override - Allows dropping channels without using a confirmation code
|
||||
* memoserv/info - Can see any information with /MEMOSERV INFO
|
||||
* memoserv/set-limit - Can set the limit of max stored memos on any user and channel
|
||||
* memoserv/no-limit - Can send memos through limits and throttles
|
||||
@@ -764,6 +765,7 @@ log
|
||||
* nickserv/cert - Can modify other users certificate lists
|
||||
* nickserv/confirm - Can confirm other users nicknames
|
||||
* nickserv/drop - Can drop other users nicks
|
||||
* nickserv/drop/override - Allows dropping nicks without using a confirmation code
|
||||
* nickserv/recover - Can recover other users nicks
|
||||
* operserv/config - Can modify services's configuration
|
||||
* operserv/oper/modify - Can add and remove operators with at most the same privileges
|
||||
@@ -1311,7 +1313,7 @@ module
|
||||
* [EXTRA] enc_posix
|
||||
*
|
||||
* Provides verify-only support for passwords encrypted using the POSIX crypt()
|
||||
* function. Load this if you are migratign from another services packages such
|
||||
* function. Load this if you are migrating from another services packages such
|
||||
* as Atheme. See https://en.wikipedia.org/wiki/Crypt_(C) for more information.
|
||||
*
|
||||
* You must load another encryption method before this to re-encrypt passwords
|
||||
|
||||
@@ -503,7 +503,7 @@ command { service = "OperServ"; name = "RANDOMNEWS"; command = "operserv/randomn
|
||||
*
|
||||
* Used to NOOP a server, which prevents users from opering on that server.
|
||||
*/
|
||||
module { name = "os_noop" }
|
||||
#module { name = "os_noop" }
|
||||
command { service = "OperServ"; name = "NOOP"; command = "operserv/noop"; permission = "operserv/noop"; }
|
||||
|
||||
/*
|
||||
|
||||
@@ -1,3 +1,12 @@
|
||||
Anope Version 2.1.5
|
||||
-------------------
|
||||
Added an example systemd unit file.
|
||||
Added support for BIGLINES on UnrealIRCd.
|
||||
Bumped the minimum supported version of Bahamut to 2.0.
|
||||
Fixed truncating messages in global/global and global/server.
|
||||
Improved building Anope for use as a system package.
|
||||
Updated the Turkish translation.
|
||||
|
||||
Anope Version 2.1.4
|
||||
-------------------
|
||||
Added a check for a non-deprecated encryption module on start.
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
Anope Version 2.1.5
|
||||
-------------------
|
||||
Added the nickserv/drop/override and chanserv/drop/override oper privileges.
|
||||
|
||||
Anope Version 2.1.4
|
||||
-------------------
|
||||
Added the db_atheme module.
|
||||
|
||||
+1
-1
@@ -166,7 +166,7 @@ Table of Contents
|
||||
|
||||
Anope currently works with:
|
||||
|
||||
* Bahamut 1.4.27 or later (including 1.8)
|
||||
* Bahamut 2.0 or later
|
||||
* ircd-hybrid 8.2.23 or later
|
||||
* InspIRCd 3 or later
|
||||
* ngIRCd 19.2 or later
|
||||
|
||||
+4
-1
@@ -74,6 +74,9 @@ public:
|
||||
/* Can we force join or part users? */
|
||||
bool CanSVSJoin = false;
|
||||
|
||||
/** Can we force servers to remove opers? */
|
||||
bool CanSVSNOOP = false;
|
||||
|
||||
/* Can we set vhosts on users? */
|
||||
bool CanSetVHost = false;
|
||||
|
||||
@@ -299,7 +302,7 @@ public:
|
||||
/** Send a channel creation message to the uplink.
|
||||
* On most TS6 IRCds this is a SJOIN with no nick
|
||||
*/
|
||||
virtual void SendChannel(Channel *c) { }
|
||||
virtual void SendChannel(Channel *c) = 0;
|
||||
|
||||
/** Make the user an IRC operator
|
||||
* Normally this is a simple +o, though some IRCds require us to send the oper type
|
||||
|
||||
@@ -20,6 +20,21 @@
|
||||
// Whether Anope was built in debug mode.
|
||||
#cmakedefine01 DEBUG_BUILD
|
||||
|
||||
// The default config directory.
|
||||
#define DEFAULT_CONF_DIR "@CONF_DIR@"
|
||||
|
||||
// The default data directory.
|
||||
#define DEFAULT_DATA_DIR "@DATA_DIR@"
|
||||
|
||||
// The default locale directory.
|
||||
#define DEFAULT_LOCALE_DIR "@LOCALE_DIR@"
|
||||
|
||||
// The default log directory.
|
||||
#define DEFAULT_LOG_DIR "@LOG_DIR@"
|
||||
|
||||
// The default module directory.
|
||||
#define DEFAULT_MODULE_DIR "@MODULE_DIR@"
|
||||
|
||||
// Whether the clock_gettime() function is available.
|
||||
#cmakedefine01 HAVE_CLOCK_GETTIME
|
||||
|
||||
|
||||
+1
-1
@@ -42,7 +42,7 @@ static std::string get_git_hash(const std::string &git_dir)
|
||||
}
|
||||
fd.close();
|
||||
|
||||
return "g" + filebuf.substr(0, 7);
|
||||
return filebuf.substr(0, 7);
|
||||
}
|
||||
|
||||
static bool read_version_sh(const std::string &version_sh, std::map<std::string, std::string> &versions)
|
||||
|
||||
+16
-2
@@ -7,8 +7,8 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Anope\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2024-03-15 12:41+0000\n"
|
||||
"PO-Revision-Date: 2024-03-15 12:41+0000\n"
|
||||
"POT-Creation-Date: 2024-04-07 15:51+0100\n"
|
||||
"PO-Revision-Date: 2024-04-07 15:51+0100\n"
|
||||
"Last-Translator: Sadie Powell <sadie@witchery.services>\n"
|
||||
"Language-Team: English\n"
|
||||
"Language: en_US\n"
|
||||
@@ -1875,6 +1875,13 @@ msgstr ""
|
||||
"Adding, deleting, or clearing entry messages requires the\n"
|
||||
"SET permission."
|
||||
|
||||
msgid ""
|
||||
"Additionally, Services Operators with the chanserv/drop/override permission can\n"
|
||||
"replace code with OVERRIDE to drop without a confirmation code."
|
||||
msgstr ""
|
||||
"Additionally, Services Operators with the chanserv/drop/override permission can\n"
|
||||
"replace code with OVERRIDE to drop without a confirmation code."
|
||||
|
||||
msgid ""
|
||||
"Additionally, Services Operators with the nickserv/confirm permission can\n"
|
||||
"replace passcode with a users nick to force validate them."
|
||||
@@ -1882,6 +1889,13 @@ msgstr ""
|
||||
"Additionally, Services Operators with the nickserv/confirm permission can\n"
|
||||
"replace passcode with a users nick to force validate them."
|
||||
|
||||
msgid ""
|
||||
"Additionally, Services Operators with the nickserv/drop/override permission can\n"
|
||||
"replace code with OVERRIDE to drop without a confirmation code."
|
||||
msgstr ""
|
||||
"Additionally, Services Operators with the nickserv/drop/override permission can\n"
|
||||
"replace code with OVERRIDE to drop without a confirmation code."
|
||||
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Additionally, if fantasy is enabled fantasy commands\n"
|
||||
|
||||
+246
-363
File diff suppressed because it is too large
Load Diff
@@ -94,7 +94,9 @@ macro(build_modules SRC)
|
||||
target_link_libraries(${SO} ${PROGRAM_NAME})
|
||||
endif()
|
||||
# Set the module to be installed to the module directory under the data directory
|
||||
install(TARGETS ${SO} DESTINATION ${LIB_DIR}/modules)
|
||||
install(TARGETS ${SO}
|
||||
DESTINATION ${MODULE_DIR}
|
||||
LIBRARY)
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
@@ -168,7 +170,9 @@ macro(build_subdir)
|
||||
endif()
|
||||
|
||||
# Set the module to be installed to the module directory under the data directory
|
||||
install(TARGETS ${SO} DESTINATION ${LIB_DIR}/modules)
|
||||
install(TARGETS ${SO}
|
||||
DESTINATION ${MODULE_DIR}
|
||||
LIBRARY)
|
||||
endmacro()
|
||||
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
@@ -50,7 +50,7 @@ public:
|
||||
}
|
||||
|
||||
auto *code = dropcode.Get(ci);
|
||||
if (params.size() < 2 || !code || !code->equals_ci(params[1]))
|
||||
if (params.size() < 2 || ((!code || !code->equals_ci(params[1])) && (!source.HasPriv("chanserv/drop/override") || params[1] != "OVERRIDE")))
|
||||
{
|
||||
if (!code)
|
||||
{
|
||||
@@ -94,6 +94,10 @@ public:
|
||||
source.Reply(_("Unregisters the named channel. Can only be used by\n"
|
||||
"the \002channel founder\002."));
|
||||
|
||||
source.Reply(" ");
|
||||
if (source.HasPriv("chanserv/drop/override"))
|
||||
source.Reply(_("Additionally, Services Operators with the \037chanserv/drop/override\037 permission can\n"
|
||||
"replace \037code\037 with \002OVERRIDE\002 to drop without a confirmation code."));
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -311,6 +311,8 @@ public:
|
||||
for (auto *base : items)
|
||||
{
|
||||
Serialize::Type *s_type = base->GetSerializableType();
|
||||
if (!s_type)
|
||||
continue;
|
||||
|
||||
data.fs = databases[s_type->GetOwner()];
|
||||
if (!data.fs || !data.fs->is_open())
|
||||
|
||||
@@ -29,7 +29,7 @@ private:
|
||||
|
||||
public:
|
||||
CommandGLGlobal(Module *creator)
|
||||
: Command(creator, "global/global", 0)
|
||||
: Command(creator, "global/global", 0, 1)
|
||||
, global("GlobalService", "Global")
|
||||
{
|
||||
this->SetDesc(_("Send a message to all users"));
|
||||
|
||||
@@ -29,7 +29,7 @@ private:
|
||||
|
||||
public:
|
||||
CommandGLServer(Module *creator)
|
||||
: Command(creator, "global/server", 1)
|
||||
: Command(creator, "global/server", 1, 2)
|
||||
, global("GlobalService", "Global")
|
||||
{
|
||||
this->SetDesc(_("Send a message to all users on a server"));
|
||||
|
||||
@@ -111,6 +111,14 @@ public:
|
||||
|
||||
FOREACH_MOD(OnNickEraseCert, (this->nc, oldentry));
|
||||
certmap.erase(oldentry);
|
||||
|
||||
if (std::find(this->certs.begin(), this->certs.end(), newentry) != this->certs.end())
|
||||
{
|
||||
// The cert we're upgrading to already exists.
|
||||
this->certs.erase(it);
|
||||
return;
|
||||
}
|
||||
|
||||
*it = newentry;
|
||||
certmap[newentry] = nc;
|
||||
FOREACH_MOD(OnNickAddCert, (this->nc, newentry));
|
||||
|
||||
@@ -58,7 +58,7 @@ public:
|
||||
}
|
||||
|
||||
auto *code = dropcode.Get(na);
|
||||
if (params.size() < 2 || !code || !code->equals_ci(params[1]))
|
||||
if (params.size() < 2 || ((!code || !code->equals_ci(params[1])) && (!source.HasPriv("nickserv/drop/override") || params[1] != "OVERRIDE")))
|
||||
{
|
||||
if (!code)
|
||||
{
|
||||
@@ -87,11 +87,17 @@ public:
|
||||
"is dropped you may lose all of your access and channels that\n"
|
||||
"you may own. Any other user will be able to gain control of\n"
|
||||
"this nick."));
|
||||
|
||||
source.Reply(" ");
|
||||
if (!source.HasPriv("nickserv/drop"))
|
||||
source.Reply(_("You may drop any nick within your group."));
|
||||
else
|
||||
source.Reply(_("As a Services Operator, you may drop any nick."));
|
||||
|
||||
source.Reply(" ");
|
||||
if (source.HasPriv("nickserv/drop/override"))
|
||||
source.Reply(_("Additionally, Services Operators with the \037nickserv/drop/override\037 permission can\n"
|
||||
"replace \037code\037 with \002OVERRIDE\002 to drop without a confirmation code."));
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -82,7 +82,8 @@ public:
|
||||
OSNOOP(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR),
|
||||
commandosnoop(this), noop(this, "noop")
|
||||
{
|
||||
|
||||
if (!IRCD || !IRCD->CanSVSNOOP)
|
||||
throw ModuleException("Your IRCd does not support SVSNOOP.");
|
||||
}
|
||||
|
||||
void OnUserModeSet(const MessageSource &, User *u, const Anope::string &mname) override
|
||||
|
||||
@@ -35,10 +35,11 @@ class BahamutIRCdProto final
|
||||
: public IRCDProto
|
||||
{
|
||||
public:
|
||||
BahamutIRCdProto(Module *creator) : IRCDProto(creator, "Bahamut 1.8.x")
|
||||
BahamutIRCdProto(Module *creator) : IRCDProto(creator, "Bahamut 2+")
|
||||
{
|
||||
DefaultPseudoclientModes = "+";
|
||||
CanSVSNick = true;
|
||||
CanSVSNOOP = true;
|
||||
CanSNLine = true;
|
||||
CanSQLine = true;
|
||||
CanSQLineChannel = true;
|
||||
@@ -49,14 +50,9 @@ public:
|
||||
|
||||
void SendModeInternal(const MessageSource &source, Channel *chan, const Anope::string &modes, const std::vector<Anope::string> &values) override
|
||||
{
|
||||
if (Servers::Capab.count("TSMODE") > 0)
|
||||
{
|
||||
auto params = values;
|
||||
params.insert(params.begin(), { chan->name, Anope::ToString(chan->creation_time), modes });
|
||||
Uplink::SendInternal({}, source, "MODE", params);
|
||||
}
|
||||
else
|
||||
IRCDProto::SendModeInternal(source, chan, modes, values);
|
||||
auto params = values;
|
||||
params.insert(params.begin(), { chan->name, Anope::ToString(chan->creation_time), modes });
|
||||
Uplink::SendInternal({}, source, "MODE", params);
|
||||
}
|
||||
|
||||
void SendModeInternal(const MessageSource &source, User *u, const Anope::string &modes, const std::vector<Anope::string> &values) override
|
||||
@@ -103,10 +99,6 @@ public:
|
||||
/* UNSZLINE */
|
||||
void SendSZLineDel(const XLine *x) override
|
||||
{
|
||||
/* this will likely fail so its only here for legacy */
|
||||
Uplink::Send("UNSZLINE", 0, x->GetHost());
|
||||
|
||||
/* this is how we are supposed to deal with it */
|
||||
Uplink::Send("RAKILL", x->GetHost(), '*');
|
||||
}
|
||||
|
||||
@@ -115,11 +107,6 @@ public:
|
||||
{
|
||||
// Calculate the time left before this would expire
|
||||
time_t timeleft = x->expires ? x->expires - Anope::CurTime : x->expires;
|
||||
|
||||
/* this will likely fail so its only here for legacy */
|
||||
Uplink::Send("SZLINE", x->GetHost(), x->GetReason());
|
||||
|
||||
/* this is how we are supposed to deal with it */
|
||||
Uplink::Send("AKILL", x->GetHost(), '*', timeleft, x->by, Anope::CurTime, x->GetReason());
|
||||
}
|
||||
|
||||
@@ -252,7 +239,7 @@ public:
|
||||
|
||||
void SendClientIntroduction(User *u) override
|
||||
{
|
||||
Uplink::Send("NICK", u->nick, 1, u->timestamp, "+" + u->GetModes(), u->GetIdent(), u->host, u->server->GetName(), 0, 0, u->realname);
|
||||
Uplink::Send("NICK", u->nick, 1, u->timestamp, "+" + u->GetModes(), u->GetIdent(), u->host, u->server->GetName(), 0, "0.0.0.0", u->realname);
|
||||
}
|
||||
|
||||
/* SERVER */
|
||||
@@ -264,7 +251,7 @@ public:
|
||||
void SendConnect() override
|
||||
{
|
||||
Uplink::Send("PASS", Config->Uplinks[Anope::CurrentUplink].password, "TS");
|
||||
Uplink::Send("CAPAB", "SSJOIN", "NOQUIT", "BURST", "UNCONNECT", "NICKIP", "TSMODE", "TS3");
|
||||
Uplink::Send("CAPAB", "BURST", "NICKIPSTR", "SSJOIN", "UNCONNECT");
|
||||
SendServer(Me);
|
||||
/*
|
||||
* SVINFO
|
||||
@@ -274,7 +261,7 @@ public:
|
||||
* parv[3] = server is standalone or connected to non-TS only
|
||||
* parv[4] = server's idea of UTC time
|
||||
*/
|
||||
Uplink::Send("SVINFO", 3, 1, 0, Anope::CurTime);
|
||||
Uplink::Send("SVINFO", 5, 5, 0, Anope::CurTime);
|
||||
this->SendBOB();
|
||||
}
|
||||
|
||||
@@ -557,9 +544,7 @@ public:
|
||||
message_burst(this), message_mode(this, "MODE"), message_svsmode(this, "SVSMODE"),
|
||||
message_nick(this), message_server(this), message_sjoin(this), message_topic(this)
|
||||
{
|
||||
|
||||
this->AddModes();
|
||||
|
||||
}
|
||||
|
||||
void OnUserNickChange(User *u, const Anope::string &) override
|
||||
|
||||
@@ -1592,7 +1592,10 @@ 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.";
|
||||
|
||||
Uplink::Send("SERVER", Me->GetName(), GetPassword(), 0, Me->GetSID(), Me->GetDescription());
|
||||
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());
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -2285,18 +2288,18 @@ struct IRCDMessageServer final
|
||||
|
||||
void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) override
|
||||
{
|
||||
if (!source.GetServer() && params.size() == 5)
|
||||
size_t paramcount = spanningtree_proto_ver < 1206 ? 5 : 4;
|
||||
if (!source.GetServer() && params.size() == paramcount)
|
||||
{
|
||||
/*
|
||||
* SERVER testnet.inspircd.org hunter7 0 123 :InspIRCd Test Network
|
||||
* 0: name
|
||||
* 1: pass
|
||||
* 2: hops
|
||||
* 3: numeric
|
||||
* 4: desc
|
||||
* 2: unused (v3 only)
|
||||
* 3(2): numeric
|
||||
* 4(3): desc
|
||||
*/
|
||||
auto hops = Anope::Convert<unsigned>(params[2], 0);
|
||||
new Server(Me, params[0], hops, params[4], params[3]);
|
||||
new Server(Me, params[0], 0, params.back(), params[spanningtree_proto_ver < 1206 ? 3 : 2]);
|
||||
}
|
||||
else if (source.GetServer())
|
||||
{
|
||||
|
||||
@@ -25,6 +25,7 @@ public:
|
||||
DefaultPseudoclientModes = "+iU";
|
||||
CanSVSNick = true;
|
||||
CanSVSJoin = true;
|
||||
CanSVSNOOP = true;
|
||||
CanSetVHost = true;
|
||||
CanSetVIdent = true;
|
||||
CanSNLine = true;
|
||||
|
||||
@@ -28,6 +28,7 @@ public:
|
||||
DefaultPseudoclientModes = "+BioqS";
|
||||
CanSVSNick = true;
|
||||
CanSVSJoin = true;
|
||||
CanSVSNOOP = true;
|
||||
CanSetVHost = true;
|
||||
CanSetVIdent = true;
|
||||
CanSNLine = true;
|
||||
@@ -229,7 +230,7 @@ private:
|
||||
*/
|
||||
Uplink::Send("PASS", Config->Uplinks[Anope::CurrentUplink].password);
|
||||
|
||||
Uplink::Send("PROTOCTL", "NICKv2", "VHP", "UMODE2", "NICKIP", "SJOIN", "SJOIN2", "SJ3", "NOQUIT", "TKLEXT", "MLOCK", "SID", "MTAGS");
|
||||
Uplink::Send("PROTOCTL", "NICKv2", "VHP", "UMODE2", "NICKIP", "SJOIN", "SJOIN2", "SJ3", "NOQUIT", "TKLEXT", "MLOCK", "SID", "MTAGS", "BIGLINES");
|
||||
Uplink::Send("PROTOCTL", "EAUTH=" + Me->GetName() + ",,,Anope-" + Anope::VersionShort());
|
||||
Uplink::Send("PROTOCTL", "SID=" + Me->GetSID());
|
||||
|
||||
@@ -1032,6 +1033,8 @@ struct IRCDMessageCapab final
|
||||
ModeManager::AddChannelMode(new ChannelModeStatus(mode_name, mode_chars[t], mode_prefixes[t], t));
|
||||
}
|
||||
}
|
||||
else if (capab.equals_ci("BIGLINES"))
|
||||
IRCD->MaxLine = 16384;
|
||||
}
|
||||
|
||||
Message::Capab::Run(source, params, tags);
|
||||
@@ -1159,7 +1162,7 @@ struct IRCDMessageMode final
|
||||
if (IRCD->IsChannelValid(params[0]))
|
||||
{
|
||||
Channel *c = Channel::Find(params[0]);
|
||||
auto ts = IRCD->ExtractTimestamp(params.back());
|
||||
auto ts = server_source ? IRCD->ExtractTimestamp(params.back()) : 0;
|
||||
|
||||
if (c)
|
||||
c->SetModesInternal(source, modes, ts);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
build_subdir(${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
install(DIRECTORY "templates/"
|
||||
DESTINATION "${DB_DIR}/webcpanel/templates/default"
|
||||
DESTINATION "${DATA_DIR}/webcpanel/templates/default"
|
||||
)
|
||||
|
||||
@@ -95,4 +95,5 @@ endif()
|
||||
# Set Anope to be installed to the bin directory
|
||||
install(TARGETS ${PROGRAM_NAME}
|
||||
DESTINATION ${BIN_DIR}
|
||||
RUNTIME
|
||||
)
|
||||
|
||||
+1
-1
@@ -190,7 +190,7 @@ Conf::Conf() : Block("")
|
||||
|
||||
if (mail->Get<bool>("usemail"))
|
||||
{
|
||||
Anope::string check[] = { "sendmailpath", "sendfrom", "registration_subject", "registration_message", "emailchange_subject", "emailchange_message", "memo_subject", "memo_message" };
|
||||
Anope::string check[] = { "sendfrom", "registration_subject", "registration_message", "emailchange_subject", "emailchange_message", "memo_subject", "memo_message" };
|
||||
for (const auto &field : check)
|
||||
ValidateNotEmpty("mail", field, mail->Get<const Anope::string>(field));
|
||||
}
|
||||
|
||||
+8
-2
@@ -30,7 +30,11 @@
|
||||
#endif
|
||||
#include <thread>
|
||||
|
||||
Anope::string Anope::ConfigDir = "conf", Anope::DataDir = "data", Anope::ModuleDir = "lib", Anope::LocaleDir = "locale", Anope::LogDir = "logs";
|
||||
Anope::string Anope::ConfigDir = DEFAULT_CONF_DIR;
|
||||
Anope::string Anope::DataDir = DEFAULT_DATA_DIR;
|
||||
Anope::string Anope::LocaleDir = DEFAULT_LOCALE_DIR;
|
||||
Anope::string Anope::LogDir = DEFAULT_LOG_DIR;
|
||||
Anope::string Anope::ModuleDir = DEFAULT_MODULE_DIR;
|
||||
|
||||
/* Vector of pairs of command line arguments and their params */
|
||||
static std::vector<std::pair<Anope::string, Anope::string> > CommandLineArguments;
|
||||
@@ -419,13 +423,15 @@ bool Anope::Init(int ac, char **av)
|
||||
Anope::LogDir = arg;
|
||||
}
|
||||
|
||||
Log(LOG_TERMINAL) << "Anope " << Anope::Version() << ", " << Anope::VersionBuildString();
|
||||
|
||||
/* Chdir to Anope data directory. */
|
||||
Log() << "Moving to " << Anope::ServicesDir;
|
||||
if (chdir(Anope::ServicesDir.c_str()) < 0)
|
||||
{
|
||||
throw CoreException("Unable to chdir to " + Anope::ServicesDir + ": " + Anope::LastError());
|
||||
}
|
||||
|
||||
Log(LOG_TERMINAL) << "Anope " << Anope::Version() << ", " << Anope::VersionBuildString();
|
||||
Log(LOG_TERMINAL) << "Using configuration file " << Anope::ExpandConfig(ServicesConf.GetName());
|
||||
|
||||
#ifndef _WIN32
|
||||
|
||||
+1
-1
@@ -48,7 +48,7 @@ void Mail::Message::Run()
|
||||
if (this->dont_quote_addresses)
|
||||
fprintf(pipe, "To: %s <%s>\r\n", mail_to.c_str(), addr.c_str());
|
||||
else
|
||||
fprintf(pipe, "To: \"%s\" <%s>\r\n", mail_to.c_str(), addr.c_str());
|
||||
fprintf(pipe, "To: \"%s\" <%s>\r\n", mail_to.replace_all_cs("\\", "\\\\").c_str(), addr.c_str());
|
||||
fprintf(pipe, "Subject: %s\r\n", subject.c_str());
|
||||
fprintf(pipe, "Content-Type: %s\r\n", content_type.c_str());
|
||||
fprintf(pipe, "Content-Transfer-Encoding: 8bit\r\n");
|
||||
|
||||
@@ -55,7 +55,7 @@ void ModuleManager::CleanupRuntimeDirectory()
|
||||
*/
|
||||
static ModuleReturn moduleCopyFile(const Anope::string &name, Anope::string &output)
|
||||
{
|
||||
const auto input = Anope::ExpandModule("modules/" + name + DLL_EXT);
|
||||
const auto input = Anope::ExpandModule(name + DLL_EXT);
|
||||
|
||||
struct stat s;
|
||||
if (stat(input.c_str(), &s) == -1)
|
||||
@@ -146,7 +146,7 @@ ModuleReturn ModuleManager::LoadModule(const Anope::string &modname, User *u)
|
||||
return ret;
|
||||
}
|
||||
#else
|
||||
const auto pbuf = Anope::ExpandModule("modules/" + modname + DLL_EXT);
|
||||
const auto pbuf = Anope::ExpandModule(modname + DLL_EXT);
|
||||
#endif
|
||||
|
||||
dlerror();
|
||||
|
||||
@@ -18,6 +18,7 @@ foreach(SRC ${TOOLS_SRCS})
|
||||
# Set the executable to be installed to the bin directory under the main directory
|
||||
install(TARGETS ${EXE}
|
||||
DESTINATION ${BIN_DIR}
|
||||
RUNTIME
|
||||
)
|
||||
# Add the executable to the list of files for CPack to ignore
|
||||
set(EXE_BINARY "$<TARGET_FILE:${EXE}>")
|
||||
@@ -28,6 +29,14 @@ endforeach()
|
||||
|
||||
# If not on Windows, generate anoperc and install it along with mydbgen
|
||||
if(NOT WIN32)
|
||||
if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
||||
configure_file(${Anope_SOURCE_DIR}/src/tools/anope.service.in ${Anope_BINARY_DIR}/src/tools/anope.service)
|
||||
install(
|
||||
PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/anope.service
|
||||
DESTINATION ${BIN_DIR}
|
||||
)
|
||||
endif()
|
||||
|
||||
configure_file(${Anope_SOURCE_DIR}/src/tools/anoperc.in ${Anope_BINARY_DIR}/src/tools/anoperc)
|
||||
install (PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/anoperc
|
||||
DESTINATION ${BIN_DIR}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
[Unit]
|
||||
After=network.target
|
||||
Description=Anope IRC Services
|
||||
Documentation=https://wiki.anope.org/
|
||||
After=network-online.target
|
||||
Wants=network-online.target
|
||||
|
||||
[Service]
|
||||
ExecReload=/bin/kill -HUP $MAINPID
|
||||
ExecStart=@BIN_DIR@/@PROGRAM_NAME@ --nofork
|
||||
Restart=on-failure
|
||||
Type=simple
|
||||
WorkingDirectory=@CMAKE_INSTALL_PREFIX@
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
+1
-1
@@ -2,5 +2,5 @@
|
||||
|
||||
VERSION_MAJOR=2
|
||||
VERSION_MINOR=1
|
||||
VERSION_PATCH=4
|
||||
VERSION_PATCH=5
|
||||
VERSION_EXTRA=""
|
||||
|
||||
Reference in New Issue
Block a user