Remove starttls.py, it's harder than I thought.
This commit is contained in:
parent
a4f0d1bf28
commit
e06fb1e3c7
1 changed files with 0 additions and 26 deletions
|
@ -1,26 +0,0 @@
|
|||
import base64
|
||||
|
||||
class Module(object):
|
||||
def __init__(self, bot, events, exports):
|
||||
self.bot = bot
|
||||
events.on("received.cap.ls").hook(self.on_cap)
|
||||
events.on("received.cap.ack").hook(self.on_cap_ack)
|
||||
|
||||
events.on("received.numeric.670").hook(self.starttls_success)
|
||||
events.on("received.numeric.691").hook(self.starttls_failed)
|
||||
|
||||
def on_cap(self, event):
|
||||
if "tls" in event["capabilities"].keys() and not event["server"].tls:
|
||||
event["server"].queue_capability("tls")
|
||||
|
||||
def on_cap_ack(self, event):
|
||||
if "tls" in event["capabilities"].keys():
|
||||
event["server"].send_starttls()
|
||||
event["server"].wait_for_capability("tls")
|
||||
|
||||
def starttls_success(self, event):
|
||||
event["server"].wrap_tls()
|
||||
event["server"].capability_done("tls")
|
||||
def starttls_failed(self, event):
|
||||
event["server"].capability_done("tls")
|
||||
|
Loading…
Reference in a new issue