Update modules/ban_engine.py
This commit is contained in:
parent
c284166e0f
commit
cea8899819
1 changed files with 2 additions and 2 deletions
|
@ -5,12 +5,12 @@ __ircat_giveme__ ["sql"]
|
||||||
class IRCatModule:
|
class IRCatModule:
|
||||||
memory = {} # {ip: [content]}
|
memory = {} # {ip: [content]}
|
||||||
useSQLengine = False
|
useSQLengine = False
|
||||||
def __init__(self, ban_provider, host):
|
def __init__(self, ban_provider, host, sql):
|
||||||
self.ban_provider = ban_provider
|
self.ban_provider = ban_provider
|
||||||
if ban_provider == "sql":
|
if ban_provider == "sql":
|
||||||
self.host = host
|
self.host = host
|
||||||
self.useSQLengine = True
|
self.useSQLengine = True
|
||||||
self.SQLengine = config
|
self.SQLengine = sql
|
||||||
def onValidate(self, socket, ip):
|
def onValidate(self, socket, ip):
|
||||||
print("IP is banned, killing connection now...")
|
print("IP is banned, killing connection now...")
|
||||||
reason = " ".join(i.split(" ")[1:])
|
reason = " ".join(i.split(" ")[1:])
|
||||||
|
|
Loading…
Add table
Reference in a new issue