mirror of
https://github.com/jlu5/PyLink.git
synced 2025-01-24 11:14:07 +01:00
unreal: remove mixed_link option; this is now implied
pylink<->unreal4<->unreal3.2 links are stable enough.
This commit is contained in:
parent
a018dd19b5
commit
f457018f89
@ -37,7 +37,7 @@ These IRCds (in alphabetical order) are frequently tested and well supported. If
|
|||||||
* [charybdis](http://charybdis.io/) (3.5+ / git master) - module `ts6`
|
* [charybdis](http://charybdis.io/) (3.5+ / git master) - module `ts6`
|
||||||
* [InspIRCd](http://www.inspircd.org/) 2.0.x - module `inspircd`
|
* [InspIRCd](http://www.inspircd.org/) 2.0.x - module `inspircd`
|
||||||
* [UnrealIRCd](https://www.unrealircd.org/) 4.x - module `unreal`
|
* [UnrealIRCd](https://www.unrealircd.org/) 4.x - module `unreal`
|
||||||
- Note: Support for mixed UnrealIRCd 3.2/4.0 networks is experimental, and requires you to enable a `mixed_link` option in the configuration. This may in turn void your support.
|
- Linking to UnrealIRCd 3.2 servers is only supported when using an UnrealIRCd 4.x server as a hub, with topology such as `pylink<->unreal4<->unreal3.2`
|
||||||
|
|
||||||
### Extended support
|
### Extended support
|
||||||
|
|
||||||
|
@ -191,15 +191,6 @@ servers:
|
|||||||
protocol: "unreal"
|
protocol: "unreal"
|
||||||
autoconnect: 5
|
autoconnect: 5
|
||||||
|
|
||||||
# This option enables SUPER HACKY UNREAL 3.2 COMPAT mode, which allows
|
|
||||||
# PyLink to link to mixed Unreal 3.2/4.0 networks, using a 4.0 server
|
|
||||||
# as a direct uplink.
|
|
||||||
# THIS IS EXPERIMENTAL, NOT WELL TESTED, AND MAY SET YOUR HOUSE ON FIRE
|
|
||||||
# AND G-LINE EVERYONE ON YOUR NETWORK.
|
|
||||||
# We encourage you to upgrade so that all your servers are running the
|
|
||||||
# same IRCd version.
|
|
||||||
#mixed_link: true
|
|
||||||
|
|
||||||
# You can also define network-specific nicks and idents for various service
|
# You can also define network-specific nicks and idents for various service
|
||||||
# bots, using the configuration options "servicename_nick" and "servicename_ident".
|
# bots, using the configuration options "servicename_nick" and "servicename_ident".
|
||||||
#pylink_nick: MagicServ
|
#pylink_nick: MagicServ
|
||||||
|
@ -34,13 +34,6 @@ class UnrealProtocol(TS6BaseProtocol):
|
|||||||
# Some command aliases
|
# Some command aliases
|
||||||
self.handle_svskill = self.handle_kill
|
self.handle_svskill = self.handle_kill
|
||||||
|
|
||||||
# Toggle whether we're using super hack mode for Unreal 3.2 mixed links.
|
|
||||||
self.mixed_link = self.irc.serverdata.get('mixed_link')
|
|
||||||
|
|
||||||
if self.mixed_link:
|
|
||||||
log.warning('(%s) mixed_link is experimental and may cause problems. '
|
|
||||||
'You have been warned!', self.irc.name)
|
|
||||||
|
|
||||||
def _expandPUID(self, uid):
|
def _expandPUID(self, uid):
|
||||||
"""
|
"""
|
||||||
Returns the outgoing nick for the given UID. For PUIDs (used to store UID-less
|
Returns the outgoing nick for the given UID. For PUIDs (used to store UID-less
|
||||||
@ -588,12 +581,12 @@ class UnrealProtocol(TS6BaseProtocol):
|
|||||||
|
|
||||||
def handle_nick(self, numeric, command, args):
|
def handle_nick(self, numeric, command, args):
|
||||||
"""Handles NICK changes, and legacy NICK introductions from pre-4.0 servers."""
|
"""Handles NICK changes, and legacy NICK introductions from pre-4.0 servers."""
|
||||||
if self.mixed_link and len(args) > 2:
|
if len(args) > 2:
|
||||||
# Handle legacy NICK introduction here.
|
# Handle legacy NICK introduction here.
|
||||||
# I don't want to rewrite all the user introduction stuff, so I'll just reorder the arguments
|
# I don't want to rewrite all the user introduction stuff, so I'll just reorder the arguments
|
||||||
# so that handle_uid can handle this instead.
|
# so that handle_uid can handle this instead.
|
||||||
# But since legacy nicks don't have any UIDs attached, we'll have to store the users
|
# But since legacy nicks don't have any UIDs attached, we'll have to store the users
|
||||||
# internally by their nicks. In other words, we need to convert from this:
|
# internally using pseudo UIDs. In other words, we need to convert from this:
|
||||||
# <- NICK Global 3 1456843578 services novernet.com services.novernet.com 0 +ioS * :Global Noticer
|
# <- NICK Global 3 1456843578 services novernet.com services.novernet.com 0 +ioS * :Global Noticer
|
||||||
# & nick hopcount timestamp username hostname server service-identifier-token :realname
|
# & nick hopcount timestamp username hostname server service-identifier-token :realname
|
||||||
# <- NICK GL32 2 1460221959 gl localhost unreal32.midnight.vpn 0 +iowx * fwAAAQ== :realname (with NICKIP enabled)
|
# <- NICK GL32 2 1460221959 gl localhost unreal32.midnight.vpn 0 +iowx * fwAAAQ== :realname (with NICKIP enabled)
|
||||||
@ -604,7 +597,9 @@ class UnrealProtocol(TS6BaseProtocol):
|
|||||||
new_args = args[:] # Clone the old args list
|
new_args = args[:] # Clone the old args list
|
||||||
servername = new_args[5].lower() # Get the name of the users' server.
|
servername = new_args[5].lower() # Get the name of the users' server.
|
||||||
|
|
||||||
# Fake a UID and put it where it belongs in the new-style UID command.
|
# Fake a UID and put it where it belongs in the new-style UID command. These take the
|
||||||
|
# NICK@COUNTER, where COUNTER is an int starting at 0 and incremented every time a new
|
||||||
|
# user joins.
|
||||||
fake_uid = self.legacy_uidgen.next_uid(prefix=args[0])
|
fake_uid = self.legacy_uidgen.next_uid(prefix=args[0])
|
||||||
new_args[5] = fake_uid
|
new_args[5] = fake_uid
|
||||||
|
|
||||||
@ -617,13 +612,7 @@ class UnrealProtocol(TS6BaseProtocol):
|
|||||||
else:
|
else:
|
||||||
# Normal NICK change, just let ts6_common handle it.
|
# Normal NICK change, just let ts6_common handle it.
|
||||||
# :70MAAAAAA NICK GL-devel 1434744242
|
# :70MAAAAAA NICK GL-devel 1434744242
|
||||||
try:
|
|
||||||
return super().handle_nick(numeric, command, args)
|
return super().handle_nick(numeric, command, args)
|
||||||
except KeyError:
|
|
||||||
log.exception('(%s) Malformed NICK command received. If you are linking PyLink to a '
|
|
||||||
'mixed UnrealIRCd 3.2/4.0 network, enable the mixed_link option in the '
|
|
||||||
'server config and restart your PyLink daemon.', self.irc.name)
|
|
||||||
self.irc.disconnect()
|
|
||||||
|
|
||||||
def handle_mode(self, numeric, command, args):
|
def handle_mode(self, numeric, command, args):
|
||||||
# <- :unreal.midnight.vpn MODE #test +bb test!*@* *!*@bad.net
|
# <- :unreal.midnight.vpn MODE #test +bb test!*@* *!*@bad.net
|
||||||
|
Loading…
Reference in New Issue
Block a user