3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-12-25 04:02:45 +01:00

Merge branches 'master' and 'devel' into devel+unreal32

This commit is contained in:
James Lu 2016-04-02 10:58:23 -07:00
commit 5d0f450c73
4 changed files with 73 additions and 2 deletions

View File

@ -24,7 +24,8 @@ You can also find support via our IRC channels: `#PyLink @ irc.overdrivenetworks
* InspIRCd 2.0.x - module `inspircd` * InspIRCd 2.0.x - module `inspircd`
* charybdis (3.5.x / git master) - module `ts6` * charybdis (3.5.x / git master) - module `ts6`
* Elemental-IRCd (6.6.x / git master) - module `ts6` * Elemental-IRCd (6.6.x / git master) - module `ts6`
* UnrealIRCd 4.x - module `unreal` (*NOT* Unreal 3.2 or lower) * UnrealIRCd 4.x - module `unreal`
- Note: Unreal 3.2, or any mixed 3.2/4.0 networks are **NOT** supported (see [issue #193](https://github.com/GLolol/PyLink/issues/193))
## Setup ## Setup

46
docs/pylink-opers.md Normal file
View File

@ -0,0 +1,46 @@
# Opering with PyLink Relay
*This guide was written for the OVERdrive-IRC network, but may be applicable elsewhere.*
PyLink Relay behaves much like Janus, an extended service used to relay channels together. This guide goes over some of the basic oper commands in Relay, along with the best ways to handle channel emergencies.
## How nick suffixing work
When joining a relay channel, every user from another network will have a network tag attached to their name. The purpose of this is to prevent nick collisions from the same nick being used on multiple nets, and ensure that different networks' registered nicks remain separate.
How is this relevant? Firstly, it means that you **cannot ban users from entire networks** using banmasks such as `*/net1!*@*`! The nick suffix is something PyLink adds artificially; on `net1`'s IRCd, which is checking the bans locally, the nick suffix simply doesn't exist.
However, this *does* mean that you can effectively give access to remote users via services, by specifying masks such as `*/net1@someident@someperson.opers.somenet.org`. Just don't make masks too wide, or you risk getting channel takeovers.
## Basic linking commands
The concept of relay channels in PyLink is greatly inspired from the original Janus implementation, though with a few differences in command syntax.
To create a channel:
- `/msg PyLink create #channelname`
To link to a channel already created on a different network:
- `/msg PyLink link othernet #channelname`
You can also link remote channels to take a different name on your network. (This is the third argument to the LINK command)
- `/msg PyLink link othernet #lobby #othernet-lobby`
## Dealing with channel emergencies
PyLink is not designed with the ability to forward KILLs, G:Lines, or any network bans. **The best thing to do in the case of emergencies is to delink the problem networks / channels!** Kills are actively blocked by the PyLink daemon (user is just respawned), while X:Lines are simply ignored, as there isn't any code to handle them yet.
To delink another network from a channel your network owns:
- `/msg PyLink delink #yourchannel badnetwork`
To delink your network from a bad network's channel:
- `/msg PyLink delink #badchannel`
Basically, only one of the two above commands will work for one specific channel. Almost always, the network that owns a channel should be the one who has it registered via their services. You can see a list of channels by typing `/msg PyLink linked`.
## When a network starts causing disconnect spam
Juping an individual `net.relay` server will likely cause PyLink Relay to break or disconnect completely. When a network starts acting up and disconnecting frequently (and causing netsplit/quit floods), you should disable autoconnect for this network:
- `/msg PyLink autoconnect badnetwork -1` (setting autoconnect to 0 or below will cause it to be disabled)

View File

@ -182,6 +182,30 @@ servers:
# channel list) # channel list)
use_elemental_modes: false use_elemental_modes: false
unrealnet:
ip: 1.2.3.4
port: 8067
recvpass: "coffee"
sendpass: "tea"
hostname: "pylink.example.com"
sid: "2PY"
netname: "This should match your UnrealIRCd config"
sidrange: "8##"
channels: []
protocol: "unreal"
autoconnect: 5
pingfreq: 30
maxnicklen: 30
# 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
# Plugins to load (omit the .py extension) # Plugins to load (omit the .py extension)
plugins: plugins:
# Commands plugin: Provides core commands such as logging in, shutting down # Commands plugin: Provides core commands such as logging in, shutting down

View File

@ -74,7 +74,7 @@ def autoconnect(irc, source, args):
Sets the autoconnect time for <network> to <seconds>. Sets the autoconnect time for <network> to <seconds>.
You can disable autoconnect for a network by setting <seconds> to a negative value.""" You can disable autoconnect for a network by setting <seconds> to a negative value."""
utils.checkAuthenticated(irc, source, allowOper=False) utils.checkAuthenticated(irc, source)
try: try:
netname = args[0] netname = args[0]
seconds = float(args[1]) seconds = float(args[1])