just some more core config stuff and disabled xmpp logging
This commit is contained in:
parent
caa9abe3dc
commit
8583a58223
2 changed files with 3 additions and 3 deletions
|
|
@ -19,7 +19,7 @@ class JabberTask(Task):
|
|||
|
||||
def execute(self, msg, core):
|
||||
#TODO: totally unstable just to use values from core. make checks before...!
|
||||
client = xmpp.Client(core["tasks"]["jabber"]["host"])
|
||||
client = xmpp.Client(core["tasks"]["jabber"]["host"], core["tasks"]["jabber"]["port"], None)
|
||||
client.connect(server=(core["tasks"]["jabber"]["host"], core["tasks"]["jabber"]["port"]))
|
||||
client.auth(core["tasks"]["jabber"]["username"], core["tasks"]["jabber"]["password"], 'alert')
|
||||
client.sendInitPresence()
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ class MailTask(Task):
|
|||
if not "type" in kwargs:
|
||||
raise Exception("'type' not in typeDict " + str(kwargs))
|
||||
if not "args" in kwargs:
|
||||
raise Exception("typeDict " + str(kwargs) + " has nor arguments!")
|
||||
raise Exception("typeDict " + str(kwargs) + " has no arguments!")
|
||||
self.set_task_type(kwargs["type"])
|
||||
self.recipient = kwargs["args"]["rcpt"]
|
||||
|
||||
|
|
@ -27,7 +27,7 @@ class MailTask(Task):
|
|||
message['From'] = core["tasks"]["mail"]["from"]
|
||||
message['To'] = self.recipient
|
||||
s = smtplib.SMTP(core["tasks"]["mail"]["host"], core["tasks"]["mail"]["port"])
|
||||
s.sendmail("warning@linspector.org", self.recipient, message.as_string())
|
||||
s.sendmail(core["tasks"]["mail"]["from"], self.recipient, message.as_string())
|
||||
s.quit()
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue