Merge branch 'master' into datarestructure

This commit is contained in:
Al Beano
2019-08-11 22:01:29 +01:00
10 changed files with 119 additions and 120 deletions

View File

@@ -55,11 +55,6 @@ def event(name, numberedName, cast, event=None):
target = cast["target"]
else:
target = None
if set(["nick", "ident", "host", "message"]).issubset(set(cast)):
if main.config["Compat"]["ZNC"] and "message" in cast.keys():
if cast["nick"][0] == main.config["Tweaks"]["ZNC"]["Prefix"] and cast["ident"] == "znc" and cast["host"] == "znc.in":
sendRelayNotification(numberedName, {"type": "znc", "message": cast["message"]})
return
sendRelayNotification(name, cast)
monitorGroups = testNetTarget(name, target)

View File

@@ -39,6 +39,9 @@ def provisionNetworkData(relay, alias, network, host, port, security, auth, pass
if not main.config["ConnectOnCreate"]:
stage3commands["status"] = []
stage3commands["status"].append("Disconnect")
if main.config["Toggles"]["CycleChans"]:
stage2commands["status"] = []
stage2commands["status"].append("LoadMod disconkick")
deliverRelayCommands(relay, commands,
stage2=[[alias+"/"+network, stage2commands],
[alias+"/"+network, stage3commands]])

View File

@@ -76,7 +76,7 @@ def initialNames(name, channel, names):
p.sadd("live.chan."+name+"."+i, channel)
p.execute()
def editUser(name, channel, nick, user):
def editUser(name, user):
gnamespace = "live.who.%s" % name
main.r.sadd(gnamespace, user)
@@ -151,7 +151,7 @@ def delUserByNetwork(name, nick, user):
p.delete(chanspace)
p.execute()
def delChannel(name, channel):
def delChannel(name, channel): # This function is extremely expensive, look to replace
gnamespace = "live.who.%s" % name
namespace = "live.who.%s.%s" % (name, channel)
p = main.r.pipeline()
@@ -171,4 +171,5 @@ def delNetwork(name, channels):
log("Purging channels for %s" % name)
for i in channels:
delChannel(name, i)
log("Finished purging channels for %s" % name)
return