mirror of
https://github.com/unrealircd/unrealircd.git
synced 2026-07-06 18:43:12 +02:00
Get rid of set::new-linking-protocol and __PANGPANG__ stuff for
compatibility with old 3.2.x servers.
This commit is contained in:
@@ -108,7 +108,6 @@ struct Configuration {
|
||||
char *restrict_usermodes;
|
||||
char *restrict_channelmodes;
|
||||
char *restrict_extendedbans;
|
||||
int new_linking_protocol;
|
||||
char *channel_command_prefix;
|
||||
long unknown_flood_bantime;
|
||||
long unknown_flood_amount;
|
||||
@@ -222,7 +221,6 @@ extern MODVAR int ipv6_disabled;
|
||||
#define RESTRICT_USERMODES iConf.restrict_usermodes
|
||||
#define RESTRICT_CHANNELMODES iConf.restrict_channelmodes
|
||||
#define RESTRICT_EXTENDEDBANS iConf.restrict_extendedbans
|
||||
#define NEW_LINKING_PROTOCOL iConf.new_linking_protocol
|
||||
#define THROTTLING_PERIOD iConf.throttle_period
|
||||
#define THROTTLING_COUNT iConf.throttle_count
|
||||
#define USE_BAN_VERSION iConf.use_ban_version
|
||||
@@ -321,7 +319,6 @@ struct SetCheck {
|
||||
unsigned has_restrict_usermodes:1;
|
||||
unsigned has_restrict_channelmodes:1;
|
||||
unsigned has_restrict_extendedbans:1;
|
||||
unsigned has_new_linking_protocol:1;
|
||||
unsigned has_channel_command_prefix:1;
|
||||
unsigned has_anti_flood_unknown_flood_bantime:1;
|
||||
unsigned has_anti_flood_unknown_flood_amount:1;
|
||||
|
||||
@@ -1524,7 +1524,6 @@ void config_setdefaultsettings(Configuration *i)
|
||||
i->maxbanlength = 2048;
|
||||
i->level_on_join = CHFL_CHANOP;
|
||||
i->watch_away_notification = 1;
|
||||
i->new_linking_protocol = 1;
|
||||
i->uhnames = 1;
|
||||
i->ping_cookie = 1;
|
||||
i->ping_warning = 15; /* default ping warning notices 15 seconds */
|
||||
@@ -7266,9 +7265,6 @@ int _conf_set(ConfigFile *conf, ConfigEntry *ce)
|
||||
else if (!strcmp(cep->ce_varname, "restrict-extendedbans")) {
|
||||
safe_strdup(tempiConf.restrict_extendedbans, cep->ce_vardata);
|
||||
}
|
||||
else if (!strcmp(cep->ce_varname, "new-linking-protocol")) {
|
||||
tempiConf.new_linking_protocol = atoi(cep->ce_vardata);
|
||||
}
|
||||
else if (!strcmp(cep->ce_varname, "anti-spam-quit-message-time")) {
|
||||
tempiConf.anti_spam_quit_message_time = config_checkval(cep->ce_vardata,CFG_TIME);
|
||||
}
|
||||
@@ -8111,11 +8107,6 @@ int _test_set(ConfigFile *conf, ConfigEntry *ce)
|
||||
CheckDuplicate(cep, restrict_extendedbans, "restrict-extendedbans");
|
||||
CheckNull(cep);
|
||||
}
|
||||
else if (!strcmp(cep->ce_varname, "new-linking-protocol"))
|
||||
{
|
||||
CheckDuplicate(cep, new_linking_protocol, "new-linking-protocol");
|
||||
CheckNull(cep);
|
||||
}
|
||||
else if (!strcmp(cep->ce_varname, "link")) {
|
||||
for (cepp = cep->ce_entries; cepp; cepp = cepp->ce_next) {
|
||||
CheckNull(cepp);
|
||||
|
||||
@@ -210,7 +210,7 @@ CMD_FUNC(cmd_protoctl)
|
||||
strlcpy(client->id, sid, IDLEN);
|
||||
add_to_id_hash_table(client->id, client); /* add SID */
|
||||
}
|
||||
else if (!strcmp(name, "EAUTH") && value && NEW_LINKING_PROTOCOL)
|
||||
else if (!strcmp(name, "EAUTH") && value)
|
||||
{
|
||||
/* Early authorization: EAUTH=servername,protocol,flags,software
|
||||
* (Only servername is mandatory, rest is optional)
|
||||
@@ -279,7 +279,7 @@ CMD_FUNC(cmd_protoctl)
|
||||
if (!IsHandshake(client) && aconf) /* Send PASS early... */
|
||||
sendto_one(client, NULL, "PASS :%s", (aconf->auth->type == AUTHTYPE_PLAINTEXT) ? aconf->auth->data : "*");
|
||||
}
|
||||
else if (!strcmp(name, "SERVERS") && value && NEW_LINKING_PROTOCOL)
|
||||
else if (!strcmp(name, "SERVERS") && value)
|
||||
{
|
||||
Client *aclient, *srv;
|
||||
char *sid = NULL;
|
||||
@@ -414,7 +414,6 @@ CMD_FUNC(cmd_protoctl)
|
||||
/* SERVER message moved from completed_connection() to here due to EAUTH/SERVERS PROTOCTL stuff,
|
||||
* which needed to be delayed until after both sides have received SERVERS=xx (..or not.. in case
|
||||
* of older servers).
|
||||
* Actually, this is often not reached, as the PANGPANG stuff in do_numeric() is reached first.
|
||||
*/
|
||||
send_server_message(client);
|
||||
}
|
||||
|
||||
@@ -180,9 +180,6 @@ void _send_protoctl_servers(Client *client, int response)
|
||||
char buf[512];
|
||||
Client *acptr;
|
||||
|
||||
if (!NEW_LINKING_PROTOCOL)
|
||||
return;
|
||||
|
||||
sendto_one(client, NULL, "PROTOCTL EAUTH=%s,%d,%s%s,%s",
|
||||
me.name, UnrealProtocol, serveropts, extraflags ? extraflags : "", version);
|
||||
|
||||
|
||||
-10
@@ -620,16 +620,6 @@ static int do_numeric(int numeric, Client *client, MessageTag *recv_mtags, int p
|
||||
* We need to handle a few responses here.
|
||||
*/
|
||||
|
||||
/* If we get a numeric 451 (not registered) back for the magic command __PANGPANG__
|
||||
* Then this means we are dealing with an Unreal server <3.2.9 and we should send the
|
||||
* SERVER command right now.
|
||||
*/
|
||||
if ((numeric == 451) && (parc > 2) && strstr(parv[1], "__PANGPANG__"))
|
||||
{
|
||||
send_server_message(client);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* STARTTLS: unknown command */
|
||||
if ((numeric == 451) && (parc > 2) && strstr(parv[1], "STARTTLS"))
|
||||
{
|
||||
|
||||
+3
-14
@@ -550,20 +550,9 @@ void start_server_handshake(Client *client)
|
||||
|
||||
send_protoctl_servers(client, 0);
|
||||
send_proto(client, aconf);
|
||||
if (NEW_LINKING_PROTOCOL)
|
||||
{
|
||||
/* Sending SERVER message moved to cmd_protoctl, so it's send after the first PROTOCTL
|
||||
* we receive from the remote server. Of course, this assumes that the remote server
|
||||
* to which we are connecting will at least send one PROTOCTL... but since it's an
|
||||
* outgoing connect, we can safely assume it's a remote UnrealIRCd server (or some
|
||||
* other advanced server..). -- Syzop
|
||||
*/
|
||||
|
||||
/* Use this nasty hack, to make 3.2.9<->pre-3.2.9 linking work */
|
||||
sendto_one(client, NULL, "__PANGPANG__");
|
||||
} else {
|
||||
send_server_message(client);
|
||||
}
|
||||
/* Sending SERVER message moved to cmd_protoctl, so it's send after the first PROTOCTL
|
||||
* that we receive from the remote server. -- Syzop
|
||||
*/
|
||||
}
|
||||
|
||||
/** Do an ident lookup if necessary.
|
||||
|
||||
Reference in New Issue
Block a user