Provision users with lowercase names
This commit is contained in:
parent
7d9a45ee91
commit
6acb106761
|
@ -8,28 +8,30 @@ def provisionUserNetworkData(num, nick, altnick, ident, realname, network, host,
|
|||
stage2commands = {}
|
||||
stage2commands["status"] = []
|
||||
commands["controlpanel"] = []
|
||||
commands["controlpanel"].append("AddUser %s %s" % (nick, main.config["Relay"]["Password"]))
|
||||
commands["controlpanel"].append("AddNetwork %s %s" % (nick, network))
|
||||
commands["controlpanel"].append("Set Nick %s %s" % (nick, nick))
|
||||
commands["controlpanel"].append("Set Altnick %s %s" % (nick, altnick))
|
||||
commands["controlpanel"].append("Set Ident %s %s" % (nick, ident))
|
||||
commands["controlpanel"].append("Set RealName %s %s" % (nick, realname))
|
||||
user = nick.lower()
|
||||
commands["controlpanel"].append("AddUser %s %s" % (user, main.config["Relay"]["Password"]))
|
||||
commands["controlpanel"].append("AddNetwork %s %s" % (user, network))
|
||||
commands["controlpanel"].append("Set Nick %s %s" % (user, nick))
|
||||
commands["controlpanel"].append("Set Altnick %s %s" % (user, altnick))
|
||||
commands["controlpanel"].append("Set Ident %s %s" % (user, ident))
|
||||
commands["controlpanel"].append("Set RealName %s %s" % (user, realname))
|
||||
if security == "ssl":
|
||||
commands["controlpanel"].append("SetNetwork TrustAllCerts %s %s true" % (nick, network)) # Don't judge me
|
||||
commands["controlpanel"].append("AddServer %s %s %s +%s" % (nick, network, host, port))
|
||||
commands["controlpanel"].append("SetNetwork TrustAllCerts %s %s true" % (user, network)) # Don't judge me
|
||||
commands["controlpanel"].append("AddServer %s %s %s +%s" % (user, network, host, port))
|
||||
elif security == "plain":
|
||||
commands["controlpanel"].append("AddServer %s %s %s %s" % (nick, network, host, port))
|
||||
commands["controlpanel"].append("AddServer %s %s %s %s" % (user, network, host, port))
|
||||
if not main.config["ConnectOnCreate"]:
|
||||
stage2commands["status"].append("Disconnect")
|
||||
if main.config["Toggles"]["CycleChans"]:
|
||||
stage2commands["status"].append("LoadMod disconkick")
|
||||
stage2commands["status"].append("LoadMod chansaver")
|
||||
deliverRelayCommands(num, commands,
|
||||
stage2=[[nick+"/"+network, stage2commands]])
|
||||
stage2=[[user+"/"+network, stage2commands]])
|
||||
|
||||
def provisionAuthenticationData(num, nick, network, security, auth, password):
|
||||
commands = {}
|
||||
commands["status"] = []
|
||||
user = nick.lower()
|
||||
if auth == "sasl":
|
||||
commands["sasl"] = []
|
||||
commands["status"].append("LoadMod sasl")
|
||||
|
@ -39,7 +41,7 @@ def provisionAuthenticationData(num, nick, network, security, auth, password):
|
|||
commands["nickserv"] = []
|
||||
commands["status"].append("LoadMod nickserv")
|
||||
commands["nickserv"].append("Set %s" % password)
|
||||
deliverRelayCommands(num, commands, user=nick+"/"+network)
|
||||
deliverRelayCommands(num, commands, user=user+"/"+network)
|
||||
|
||||
|
||||
def provisionRelay(num, network): # provision user and network data
|
||||
|
|
Loading…
Reference in New Issue