This commit is contained in:
0xd3d0c3d 2022-08-24 04:53:08 -05:00
parent 536e83cd82
commit 7a3b888333

@ -13,15 +13,15 @@ class Plugin:
#######################################################################################
def __init__(self,bot):
self.bot=bot
self.mode="dupe"
self.enforcing=False
self.token="Z12345678901234567"
token=""
self.color=""
try:
self.mode=os.environ['HYDRA_DESIGNATION']
self.home=os.environ['HYDRA_HOME']
self.enforcing=False
except:
self.mode="dupe"
self.enforcing=False
return
if self.mode=="core": self.color="\x0304"
for i in range(7): token+=hex(rint(0,255))[2:].zfill(2).upper()
@ -75,7 +75,7 @@ class Plugin:
@irc3.event(irc3.rfc.PRIVMSG)
def on_privmsg(self,mask=None,event=None,target=None,data=None,**kw):
###################################################################################
if not self.enforcing: return
if self.enforcing==False: return
if target!=self.bot.config['nick'] and mask.nick==self.bot.nick: return
if mask.nick==self.bot.nick and target==self.bot.config['nick'] and self.mode=='core':
if data.endswith('dupe - connected'):
@ -121,7 +121,7 @@ class Plugin:
if kw['event']=='JOIN':
self.bot.privmsg("maple",f"joined {target}".lower())
if target!=self.home:
if self.enforcing:
if self.enforcing::
reason=".[d]."
self.bot.part(target,reason)
self.bot.privmsg("maple",f"parted {target} - {reason}".lower())