This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Undernet IRC Server Source Code.".
The branch, u2_10_12_branch has been updated
via 7e9ec9de603e6a01bec219042927fe28d55890d8 (commit)
via 45ae2f0a03ee99c8988841e3187de452b1d30efe (commit)
from 668bee3995c94ca05b36014f5bed070fb0dea5a3 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 7e9ec9de603e6a01bec219042927fe28d55890d8
Merge: 668bee39 45ae2f0a
Author: Michael Poole <[email protected]>
Date: Sat Jul 27 14:15:32 2024 -0400
Merge pull request #35 from hiddn/connectport
Allow the use of port 0 in local /connects
commit 45ae2f0a03ee99c8988841e3187de452b1d30efe
Author: Hidden <[email protected]>
Date: Sat Jul 20 11:32:27 2024 -0400
Allow the use of port 0 in local /connects
Remote connects allow `/connect dst* 0 src*`, but when the source is not
specified or is the same as the local server, port 0 was not allowed
before this fix.
diff --git a/ircd/m_connect.c b/ircd/m_connect.c
index c31c20bc..3e91eb42 100644
--- a/ircd/m_connect.c
+++ b/ircd/m_connect.c
@@ -313,20 +313,22 @@ int mo_connect(struct Client* cptr, struct Client* sptr,
int parc, char* parv[])
port = aconf->address.port;
if (parc > 2) {
assert(0 != parv[2]);
- if (0 == (port = atoi(parv[2]))) {
+ /*
+ * Allow opers to `/connect foo.* 0` using the conf's port
+ */
+ if (0 == (port = atoi(parv[2])) && strcmp(parv[2], "0") != 0) {
sendcmdto_one(&me, CMD_NOTICE, sptr, "%C :Connect: Invalid port number",
sptr);
return 0;
}
}
- if (0 == port && 0 == (port = feature_int(FEAT_SERVER_PORT))) {
- sendcmdto_one(&me, CMD_NOTICE, sptr, "%C :Connect: missing port number",
- sptr);
- return 0;
- }
-
+ /*
+ * Save the old port
+ */
tmpport = aconf->address.port;
- aconf->address.port = port;
+ /* Use the port provided by the user if different from 0. Otherwise, use
config's. */
+ if (port)
+ aconf->address.port = port;
if (connect_server(aconf, sptr)) {
sendcmdto_one(&me, CMD_NOTICE, sptr, "%C :*** Connecting to %s.", sptr,
-----------------------------------------------------------------------
Summary of changes:
ircd/m_connect.c | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
hooks/post-receive
--
Undernet IRC Server Source Code.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].