feat(bot): rend le refresh plus discret
This commit is contained in:
parent
b2f8a75616
commit
fd0f995aca
14
icingabot.py
14
icingabot.py
@ -259,19 +259,7 @@ class IcingaBot(Icinga2ServiceManager, irc.bot.SingleServerIRCBot):
|
|||||||
self.suffix_nick("[{}]".format(len(self.notifications)))
|
self.suffix_nick("[{}]".format(len(self.notifications)))
|
||||||
else:
|
else:
|
||||||
self.suffix_nick("")
|
self.suffix_nick("")
|
||||||
for srv in lost:
|
return
|
||||||
if srv is not None:
|
|
||||||
self.send("{} is OK".format(srv["name"]))
|
|
||||||
for srv in news:
|
|
||||||
try:
|
|
||||||
self.send(
|
|
||||||
"{}: => {}".format(
|
|
||||||
srv["name"],
|
|
||||||
srv["attrs"]["last_check_result"]["output"],
|
|
||||||
)
|
|
||||||
)
|
|
||||||
except Exception:
|
|
||||||
self.send("{}: => No check result.".format(srv["name"]))
|
|
||||||
|
|
||||||
def on_nicknameinuse(self, c, e):
|
def on_nicknameinuse(self, c, e):
|
||||||
c.nick(+"_")
|
c.nick(+"_")
|
||||||
|
Loading…
Reference in New Issue
Block a user