mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-24 03:29:28 +01:00
Make default max nick length a config option
This commit is contained in:
parent
fdcb58ba2c
commit
042edb3e1c
@ -51,6 +51,10 @@ servers:
|
||||
# Separator character (used by relay)
|
||||
separator: "/"
|
||||
|
||||
# Sets the max nick length for the network. It is important this is set correctly, or
|
||||
# PyLink might introduce a nick that is too long and cause netsplits!
|
||||
maxnicklen: 30
|
||||
|
||||
# Plugins to load (omit the .py extension)
|
||||
plugins:
|
||||
- commands
|
||||
|
12
main.py
12
main.py
@ -36,13 +36,11 @@ class Irc():
|
||||
'oper': 'o',
|
||||
'*A': '', '*B': '', '*C': 's', '*D': 'iow'}
|
||||
|
||||
# This nicklen value is only a default, and SHOULD be set by the
|
||||
# protocol module as soon as the relevant capability information is
|
||||
# received from the uplink. Plugins that depend on maxnicklen being
|
||||
# set MUST call "irc.connected.wait()", which blocks until the
|
||||
# capability information is received. This handling of irc.connected
|
||||
# is also dependent on the protocol module.
|
||||
self.maxnicklen = 30
|
||||
# This max nick length starts off as the config value, but may be
|
||||
# overwritten later by the protocol module if such information is
|
||||
# received. Note that only some IRCds (InspIRCd) give us nick length
|
||||
# during link, so it is still required that the config value be set!
|
||||
self.maxnicklen = self.serverdata['maxnicklen']
|
||||
self.prefixmodes = {'o': '@', 'v': '+'}
|
||||
|
||||
# Uplink SID (filled in by protocol module)
|
||||
|
Loading…
Reference in New Issue
Block a user