Skip to content

Commit bef3db5

Browse files
committed
Merge remote-tracking branch 'upstream/insp4' into insp4
2 parents 2e28773 + 497c44b commit bef3db5

17 files changed

Lines changed: 156 additions & 54 deletions

File tree

.github/workflows/ci-irctest.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
tar -czf artifacts-inspircd.tar.gz inspircd
4040
4141
- name: Upload build artifacts
42-
uses: actions/upload-artifact@v6
42+
uses: actions/upload-artifact@v7
4343
with:
4444
name: installed-inspircd-for-irctest
4545
path: ~/artifacts-inspircd.tar.gz
@@ -54,7 +54,7 @@ jobs:
5454
- build
5555
steps:
5656
- name: Download build artifacts
57-
uses: actions/download-artifact@v7
57+
uses: actions/download-artifact@v8
5858
with:
5959
name: installed-inspircd-for-irctest
6060
path: "~"
@@ -68,7 +68,7 @@ jobs:
6868
uses: actions/checkout@v6
6969
with:
7070
path: irctest
71-
ref: 4ee99ede9a0d6e8e88a6d7d98793f57465f9d841
71+
ref: f1a1ad20dfbc2eaa27e1ecc73a9a1832f8a277f3
7272
repository: progval/irctest
7373

7474
- name: Install irctest dependencies
@@ -83,7 +83,7 @@ jobs:
8383
uses: actions/checkout@v6
8484
with:
8585
path: anope
86-
ref: 2.1.17
86+
ref: 2.1.22
8787
repository: anope/anope
8888

8989
- name: Build and install Anope

docs/conf/help.example.conf

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -465,14 +465,14 @@ Sets your real name to the specified real name.
465465
<helptopic key="coper" title="Oper Commands" value="
466466
ALLTIME CBAN CHECK CHGHOST CHGIDENT
467467
CHGNAME CLEARCHAN CLOAK CONNECT DIE
468-
ELINE FILTER GLINE GLOADMODULE GLOBOPS
469-
GRELOADMODULE GUNLOADMODULE KILL KLINE LOADMODULE
470-
NICKLOCK NICKUNLOCK OJOIN OPERMOTD QLINE
471-
RCONNECT REHASH RELOADMODULE RESTART RLINE
472-
RSQUIT SAJOIN SAKICK SAMODE SANICK
473-
SAPART SAQUIT SATOPIC SETHOST SETIDENT
474-
SETIDLE SHUN SQUIT SWHOIS TLINE
475-
UNLOADMODULE WALLOPS ZLINE
468+
DNSBL ELINE FILTER GLINE GLOADMODULE
469+
GLOBOPS GRELOADMODULE GUNLOADMODULE KILL KLINE
470+
LOADMODULE NICKLOCK NICKUNLOCK OJOIN OPERMOTD
471+
QLINE RCONNECT REHASH RELOADMODULE RESTART
472+
RLINE RSQUIT SAJOIN SAKICK SAMODE
473+
SANICK SAPART SAQUIT SATOPIC SETHOST
474+
SETIDENT SETIDLE SHUN SQUIT SWHOIS
475+
TLINE UNLOADMODULE WALLOPS ZLINE
476476
">
477477

478478
<helptopic key="tline" title="/TLINE <mask>" value="
@@ -821,6 +821,12 @@ trying to get the cloak of a user from /WHOWAS and they were not
821821
using their cloak when they quit.
822822
">
823823

824+
<helptopic key="dnsbl" title="/DNSBL <nick> [<reason>]" value="
825+
Rechecks whether the specified user is in a DNSBL. You can also specify
826+
a reason which will be included in the message sent to other server
827+
operators that have the DNSBL (d) snomask enabled.
828+
">
829+
824830
<helptopic key="umodes" title="User Modes" value="
825831
c Blocks private messages and notices from users who do
826832
not share a common channel with you (requires the

docs/conf/modules.example.conf

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1359,9 +1359,10 @@
13591359
#<module name="ircv3_ctctags">
13601360
#
13611361
# If you want to only allow client tags that are intended for processing
1362-
# by the server you can disable the following setting. Doing this is not
1362+
# by the server you can set allowclientonlytags to "none". Alternately,
1363+
# you can set it to "known" to filter to known tags. Doing this is not
13631364
# recommended though as it may break clients.
1364-
#<ctctags allowclientonlytags="yes">
1365+
#<ctctags allowclientonlytags="all">
13651366

13661367
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
13671368
# IRCv3 echo-message module: Provides the echo-message IRCv3

include/ctables.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,9 @@ class CoreExport Command
254254
/** Whether the command can be issued before registering. */
255255
bool works_before_reg = false;
256256

257+
/** Whether the command is currently being loopcalled. */
258+
bool loopcall = false;
259+
257260
/** Handle the command from a user.
258261
* @param user The user who issued the command.
259262
* @param parameters The parameters for the command.

include/modules/monitor.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ class Monitor::WriteWatchersWithCap
8686
, ev(event)
8787
, sentid(id)
8888
{
89-
if (monitorapi)
89+
if (user->IsFullyConnected() && monitorapi)
9090
monitorapi->ForEachWatcher(user, *this);
9191
}
9292
};

src/commands.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ bool CommandParser::LoopCall(User* user, Command* handler, const CommandBase::Pa
6161
* for every parameter or parameter pair until there are no more
6262
* left to parse.
6363
*/
64+
handler->loopcall = true;
6465
CommandBase::Params splitparams(parameters);
6566
while (items1.GetToken(item) && (!usemax || max++ < ServerInstance->Config->MaxTargets))
6667
{
@@ -86,6 +87,7 @@ bool CommandParser::LoopCall(User* user, Command* handler, const CommandBase::Pa
8687
}
8788
}
8889
}
90+
handler->loopcall = false;
8991

9092
return true;
9193
}

src/coremods/core_channel/cmd_names.cpp

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,6 @@
3131

3232
#include "core_channel.h"
3333

34-
enum
35-
{
36-
// From RFC 1459.
37-
RPL_NAMREPLY = 353,
38-
RPL_ENDOFNAMES = 366,
39-
};
40-
4134
CommandNames::CommandNames(Module* parent)
4235
: SplitCommand(parent, "NAMES")
4336
, secretmode(parent, "secret")
@@ -50,18 +43,19 @@ CommandNames::CommandNames(Module* parent)
5043

5144
CmdResult CommandNames::HandleLocal(LocalUser* user, const Params& parameters)
5245
{
53-
Channel* c;
54-
5546
if (parameters.empty())
5647
{
5748
user->WriteNumeric(RPL_ENDOFNAMES, '*', "End of /NAMES list.");
5849
return CmdResult::SUCCESS;
5950
}
6051

6152
if (CommandParser::LoopCall(user, this, parameters, 0))
53+
{
54+
user->WriteNumeric(RPL_ENDOFNAMES, parameters[0], "End of /NAMES list.");
6255
return CmdResult::SUCCESS;
56+
}
6357

64-
c = ServerInstance->Channels.Find(parameters[0]);
58+
auto* c = ServerInstance->Channels.Find(parameters[0]);
6559
if (c)
6660
{
6761
// Show the NAMES list if one of the following is true:
@@ -72,14 +66,12 @@ CmdResult CommandNames::HandleLocal(LocalUser* user, const Params& parameters)
7266
// If the user is inside the channel or has privs, instruct SendNames() to show invisible (+i) members
7367
bool show_invisible = ((c->HasUser(user)) || (user->HasPrivPermission("channels/auspex")));
7468
if ((show_invisible) || (!c->IsModeSet(secretmode)))
75-
{
7669
SendNames(user, c, show_invisible);
77-
return CmdResult::SUCCESS;
78-
}
7970
}
8071

81-
user->WriteNumeric(RPL_ENDOFNAMES, parameters[0], "End of /NAMES list.");
82-
return CmdResult::FAILURE;
72+
if (!this->loopcall)
73+
user->WriteNumeric(RPL_ENDOFNAMES, parameters[0], "End of /NAMES list.");
74+
return c ? CmdResult::SUCCESS : CmdResult::FAILURE;
8375
}
8476

8577
void CommandNames::SendNames(LocalUser* user, Channel* chan, bool show_invisible)
@@ -118,5 +110,4 @@ void CommandNames::SendNames(LocalUser* user, Channel* chan, bool show_invisible
118110
}
119111

120112
reply.Flush();
121-
user->WriteNumeric(RPL_ENDOFNAMES, chan->name, "End of /NAMES list.");
122113
}

src/coremods/core_channel/core_channel.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,7 @@ class CoreModChannel final
334334

335335
// Show all members of the channel, including invisible (+i) users
336336
cmdnames.SendNames(localuser, chan, true);
337+
localuser->WriteNumeric(RPL_ENDOFNAMES, chan->name, "End of /NAMES list.");
337338
}
338339
}
339340

src/coremods/core_channel/core_channel.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,13 @@
2525
#include "modules/exemption.h"
2626
#include "modules/extban.h"
2727

28+
enum
29+
{
30+
// From RFC 1459.
31+
RPL_NAMREPLY = 353,
32+
RPL_ENDOFNAMES = 366,
33+
};
34+
2835
namespace Topic
2936
{
3037
void ShowTopic(LocalUser* user, Channel* chan);

src/coremods/core_user/cmd_user.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,17 +42,19 @@ CommandUser::CommandUser(Module* parent)
4242
CmdResult CommandUser::HandleLocal(LocalUser* user, const Params& parameters)
4343
{
4444
/* A user may only send the USER command once */
45+
const auto& newuser = parameters[0];
46+
const auto& newreal = parameters[3];
4547
if (!(user->connected & User::CONN_USER))
4648
{
47-
if (!ServerInstance->IsUser(parameters[0]))
49+
if (!ServerInstance->IsUser(newuser))
4850
{
49-
user->WriteNumeric(ERR_INVALIDUSERNAME, name, "Your username is not valid");
51+
user->WriteNumeric(ERR_INVALIDUSERNAME, newuser, "Your username is not valid");
5052
return CmdResult::FAILURE;
5153
}
5254
else
5355
{
54-
user->ChangeRealUser(parameters[0], true);
55-
user->ChangeRealName(parameters[3]);
56+
user->ChangeRealUser(newuser, true);
57+
user->ChangeRealName(newreal);
5658
user->connected |= User::CONN_USER;
5759
}
5860
}

0 commit comments

Comments
 (0)