Implement setting modes in ZNC
This commit is contained in:
parent
abdfc48b95
commit
19e04dbf36
|
@ -2,6 +2,7 @@ import main
|
||||||
from core.bot import deliverRelayCommands
|
from core.bot import deliverRelayCommands
|
||||||
from utils.logging.log import *
|
from utils.logging.log import *
|
||||||
from twisted.internet import reactor
|
from twisted.internet import reactor
|
||||||
|
import modules.regproc
|
||||||
|
|
||||||
def provisionUserNetworkData(num, nick, altnick, ident, realname, network, host, port, security, auth, password):
|
def provisionUserNetworkData(num, nick, altnick, ident, realname, network, host, port, security, auth, password):
|
||||||
commands = {}
|
commands = {}
|
||||||
|
@ -25,6 +26,10 @@ def provisionUserNetworkData(num, nick, altnick, ident, realname, network, host,
|
||||||
if main.config["Toggles"]["CycleChans"]:
|
if main.config["Toggles"]["CycleChans"]:
|
||||||
stage2commands["status"].append("LoadMod disconkick")
|
stage2commands["status"].append("LoadMod disconkick")
|
||||||
stage2commands["status"].append("LoadMod chansaver")
|
stage2commands["status"].append("LoadMod chansaver")
|
||||||
|
inst = modules.regproc.selectInst(network)
|
||||||
|
if "setmode" in inst.keys():
|
||||||
|
stage2commands["status"].append("LoadMod perform")
|
||||||
|
#stage2commands["perform"].append("add mode %nick% +"+inst["setmode"])
|
||||||
deliverRelayCommands(num, commands,
|
deliverRelayCommands(num, commands,
|
||||||
stage2=[[user+"/"+network, stage2commands]])
|
stage2=[[user+"/"+network, stage2commands]])
|
||||||
|
|
||||||
|
@ -41,6 +46,10 @@ def provisionAuthenticationData(num, nick, network, security, auth, password):
|
||||||
commands["nickserv"] = []
|
commands["nickserv"] = []
|
||||||
commands["status"].append("LoadMod nickserv")
|
commands["status"].append("LoadMod nickserv")
|
||||||
commands["nickserv"].append("Set %s" % password)
|
commands["nickserv"].append("Set %s" % password)
|
||||||
|
inst = modules.regproc.selectInst(network)
|
||||||
|
if "setmode" in inst.keys():
|
||||||
|
#commands["status"].append("LoadMod perform")
|
||||||
|
commands["perform"] = ["add mode %nick% +"+inst["setmode"]]
|
||||||
deliverRelayCommands(num, commands, user=user+"/"+network)
|
deliverRelayCommands(num, commands, user=user+"/"+network)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue