mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-09 10:39:02 -04:00
Merge branch 'insp3' into master.
This commit is contained in:
commit
a94f3b71d5
6
.github/workflows/ci-linux.yml
vendored
6
.github/workflows/ci-linux.yml
vendored
@ -1,7 +1,9 @@
|
||||
name: Linux CI
|
||||
on:
|
||||
- pull_request
|
||||
- push
|
||||
pull_request:
|
||||
push:
|
||||
schedule:
|
||||
- cron: '0 0 * * 0'
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-20.04
|
||||
|
6
.github/workflows/ci-macos.yml
vendored
6
.github/workflows/ci-macos.yml
vendored
@ -1,7 +1,9 @@
|
||||
name: macOS CI
|
||||
on:
|
||||
- pull_request
|
||||
- push
|
||||
pull_request:
|
||||
push:
|
||||
schedule:
|
||||
- cron: '0 0 * * 0'
|
||||
jobs:
|
||||
build:
|
||||
runs-on: macos-latest
|
||||
|
6
.github/workflows/ci-windows.yml
vendored
6
.github/workflows/ci-windows.yml
vendored
@ -1,7 +1,9 @@
|
||||
name: Windows CI
|
||||
on:
|
||||
- pull_request
|
||||
- push
|
||||
pull_request:
|
||||
push:
|
||||
schedule:
|
||||
- cron: '0 0 * * 0'
|
||||
jobs:
|
||||
build:
|
||||
runs-on: windows-latest
|
||||
|
@ -27,7 +27,7 @@ Building from source on Windows is generally not recommended but [a guide is ava
|
||||
<!--
|
||||
TODO: uncomment this once we have binary packages for v4.
|
||||
|
||||
If you are running on CentOS 7/8, Debian 10/11, Ubuntu 18.04/20.04, or Windows 7+ binary packages are available from [the downloads page](https://github.com/inspircd/inspircd/releases/latest).
|
||||
If you are running on CentOS 7/8, Debian 11/12, Ubuntu 18.04/20.04, or Windows 7+ binary packages are available from [the downloads page](https://github.com/inspircd/inspircd/releases/latest).
|
||||
|
||||
A [Docker](https://www.docker.com) image is also available. See [the inspircd-docker repository](https://github.com/inspircd/inspircd-docker) for more information.
|
||||
-->
|
||||
|
4
configure
vendored
4
configure
vendored
@ -32,6 +32,7 @@ use v5.26.0;
|
||||
use strict;
|
||||
use warnings FATAL => qw(all);
|
||||
|
||||
use Config qw(%Config);
|
||||
use Cwd qw(getcwd);
|
||||
use File::Basename qw(basename);
|
||||
use File::Copy ();
|
||||
@ -143,7 +144,8 @@ our $interactive = !(
|
||||
);
|
||||
|
||||
my %version = get_version $opt_distribution_label;
|
||||
say console_format "<|BOLD Configuring InspIRCd $version{FULL} on $^O.|>";
|
||||
chomp(my $platform = `uname -mrs 2>/dev/null` || "$Config{osname} $Config{osvers} $Config{archname}");
|
||||
say console_format "Configuring <|GREEN InspIRCd $version{FULL}|> on <|GREEN $platform|>.";
|
||||
|
||||
my %config;
|
||||
if ($interactive) {
|
||||
|
@ -68,7 +68,7 @@ class ClientProtocol::Messages::Numeric : public ClientProtocol::Message
|
||||
* @param user User to send the numeric to. May be unregistered, must remain valid as long as this object is alive.
|
||||
*/
|
||||
Numeric(const ::Numeric::Numeric& num, User* user)
|
||||
: ClientProtocol::Message(NULL, (num.GetServer() ? num.GetServer() : ServerInstance->FakeClient->server)->GetName())
|
||||
: ClientProtocol::Message(NULL, (num.GetServer() ? num.GetServer() : ServerInstance->FakeClient->server)->GetPublicName())
|
||||
{
|
||||
if (user->registered & REG_NICK)
|
||||
PushParamRef(user->nick);
|
||||
@ -82,7 +82,7 @@ class ClientProtocol::Messages::Numeric : public ClientProtocol::Message
|
||||
* @param target Target string, must stay valid as long as this object is alive.
|
||||
*/
|
||||
Numeric(const ::Numeric::Numeric& num, const std::string& target)
|
||||
: ClientProtocol::Message(NULL, (num.GetServer() ? num.GetServer() : ServerInstance->FakeClient->server)->GetName())
|
||||
: ClientProtocol::Message(NULL, (num.GetServer() ? num.GetServer() : ServerInstance->FakeClient->server)->GetPublicName())
|
||||
{
|
||||
PushParamRef(target);
|
||||
InitFromNumeric(num);
|
||||
|
@ -63,6 +63,9 @@ class CoreExport Server : public Cullable
|
||||
*/
|
||||
const std::string& GetName() const { return name; }
|
||||
|
||||
/** Returns the public name of this server respecting <security:hideserver> if set. */
|
||||
const std::string& GetPublicName() const;
|
||||
|
||||
/** Returns the description of this server
|
||||
* @return The description of this server
|
||||
*/
|
||||
|
@ -51,7 +51,7 @@ CmdResult CommandServList::HandleLocal(LocalUser* user, const Params& parameters
|
||||
Numeric::Numeric numeric(RPL_SERVLIST);
|
||||
numeric
|
||||
.push(serviceuser->nick)
|
||||
.push(serviceuser->server->GetName())
|
||||
.push(serviceuser->server->GetPublicName())
|
||||
.push("*")
|
||||
.push(serviceuser->IsOper() ? serviceuser->oper->name : "*")
|
||||
.push(0)
|
||||
|
@ -101,7 +101,7 @@ class CoreModInfo final
|
||||
, cmdversion(this, isupport)
|
||||
, numeric004(RPL_MYINFO)
|
||||
{
|
||||
numeric004.push(ServerInstance->Config->ServerName);
|
||||
numeric004.push(ServerInstance->Config->GetServerName());
|
||||
numeric004.push(INSPIRCD_BRANCH);
|
||||
}
|
||||
|
||||
|
@ -218,7 +218,7 @@ class CommandMessage final
|
||||
{
|
||||
// The target is a user on a specific server (e.g. jto@tolsun.oulu.fi).
|
||||
target = ServerInstance->Users.FindNick(parameters[0].substr(0, targetserver - parameters[0].c_str()));
|
||||
if (target && strcasecmp(target->server->GetName().c_str(), targetserver + 1))
|
||||
if (target && strcasecmp(target->server->GetPublicName().c_str(), targetserver + 1))
|
||||
target = NULL;
|
||||
}
|
||||
else
|
||||
@ -352,7 +352,7 @@ class CommandSQuery final
|
||||
{
|
||||
// The target is a user on a specific server (e.g. jto@tolsun.oulu.fi).
|
||||
target = ServerInstance->Users.FindNick(parameters[0].substr(0, targetserver - parameters[0].c_str()));
|
||||
if (target && strcasecmp(target->server->GetName().c_str(), targetserver + 1))
|
||||
if (target && strcasecmp(target->server->GetPublicName().c_str(), targetserver + 1))
|
||||
target = NULL;
|
||||
}
|
||||
else
|
||||
|
@ -378,7 +378,7 @@ WhoWas::Entry::Entry(User* user)
|
||||
: host(user->GetRealHost())
|
||||
, dhost(user->GetDisplayedHost())
|
||||
, ident(user->ident)
|
||||
, server(user->server->GetName())
|
||||
, server(user->server->GetPublicName())
|
||||
, real(user->GetRealName())
|
||||
, signon(user->signon)
|
||||
{
|
||||
|
@ -36,18 +36,11 @@
|
||||
/// $PackageInfo: require_system("debian") libmysqlclient-dev
|
||||
/// $PackageInfo: require_system("ubuntu") libmysqlclient-dev
|
||||
|
||||
#ifdef __GNUC__
|
||||
# pragma GCC diagnostic push
|
||||
#endif
|
||||
|
||||
#include "inspircd.h"
|
||||
#include <mysql.h>
|
||||
#include "modules/sql.h"
|
||||
|
||||
#ifdef __GNUC__
|
||||
# pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
# pragma comment(lib, "mysqlclient.lib")
|
||||
#endif
|
||||
|
@ -161,7 +161,7 @@ class CommandTagMsg final
|
||||
{
|
||||
// The target is a user on a specific server (e.g. jto@tolsun.oulu.fi).
|
||||
target = ServerInstance->Users.FindNick(parameters[0].substr(0, targetserver - parameters[0].c_str()));
|
||||
if (target && strcasecmp(target->server->GetName().c_str(), targetserver + 1))
|
||||
if (target && strcasecmp(target->server->GetPublicName().c_str(), targetserver + 1))
|
||||
target = NULL;
|
||||
}
|
||||
else
|
||||
|
@ -37,7 +37,7 @@ class ServerExtBan final
|
||||
|
||||
bool IsMatch(User* user, Channel* channel, const std::string& text) override
|
||||
{
|
||||
return InspIRCd::Match(user->server->GetName(), text);
|
||||
return InspIRCd::Match(user->server->GetPublicName(), text);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -162,3 +162,10 @@ std::string UIDGenerator::GetUID()
|
||||
|
||||
return current_uid;
|
||||
}
|
||||
|
||||
const std::string& Server::GetPublicName() const
|
||||
{
|
||||
if (!ServerInstance->Config->HideServer.empty())
|
||||
return ServerInstance->Config->HideServer;
|
||||
return GetName();
|
||||
}
|
||||
|
@ -1208,14 +1208,12 @@ void User::WriteNotice(const std::string& text)
|
||||
|
||||
const std::string& FakeUser::GetFullHost()
|
||||
{
|
||||
if (!ServerInstance->Config->HideServer.empty())
|
||||
return ServerInstance->Config->HideServer;
|
||||
return server->GetName();
|
||||
return server->GetPublicName();
|
||||
}
|
||||
|
||||
const std::string& FakeUser::GetFullRealHost()
|
||||
{
|
||||
return GetFullHost();
|
||||
return server->GetPublicName();
|
||||
}
|
||||
|
||||
ConnectClass::ConnectClass(std::shared_ptr<ConfigTag> tag, char t, const std::vector<std::string>& masks)
|
||||
|
Loading…
x
Reference in New Issue
Block a user