From a7abd6deb7cf1832c145c022b9a294ff956b6355 Mon Sep 17 00:00:00 2001 From: Dpeta Date: Mon, 6 Jun 2022 23:03:12 +0200 Subject: [PATCH] more metadata fallbacks --- irc.py | 20 ++++++++++++++++++++ oyoyo/ircevents.py | 2 ++ 2 files changed, 22 insertions(+) diff --git a/irc.py b/irc.py index 083b2ef..06f2927 100644 --- a/irc.py +++ b/irc.py @@ -554,6 +554,26 @@ class PesterHandler(DefaultCommandHandler): PchumLog.warning(e) self.parent.setConnectionBroken() + def keynotset(self, target, our_handle, failed_handle, key, *error): + # Try to get moods the old way if metadata fails. + PchumLog.info("nomatchingkey: " + failed_handle) + chumglub = "GETMOOD " + try: + helpers.msg(self.client, "#pesterchum", chumglub + failed_handle) + except socket.error as e: + PchumLog.warning(e) + self.parent.setConnectionBroken() + + def keynopermission(self, target, our_handle, failed_handle, key, *error): + # Try to get moods the old way if metadata fails. + PchumLog.info("nomatchingkey: " + failed_handle) + chumglub = "GETMOOD " + try: + helpers.msg(self.client, "#pesterchum", chumglub + failed_handle) + except socket.error as e: + PchumLog.warning(e) + self.parent.setConnectionBroken() + def featurelist(self, target, handle, *params): # RPL_ISUPPORT features = params[:-1] diff --git a/oyoyo/ircevents.py b/oyoyo/ircevents.py index d4150ae..1d479ad 100644 --- a/oyoyo/ircevents.py +++ b/oyoyo/ircevents.py @@ -186,6 +186,8 @@ metadata_numeric_events = { "761": "keyvalue", "762": "metadataend", "766": "nomatchingkey", + "768": "keynotset", + "769": "keynopermission", "770": "metadatasubok", } numeric_events.update(metadata_numeric_events)