From 89f035fdcfd5a4ce157e5cb5dac293736b42dfbf Mon Sep 17 00:00:00 2001 From: jesopo Date: Sun, 10 Feb 2019 20:44:29 +0000 Subject: [PATCH] Add `IRCServer.hostmask()` to construct our nick!user@host hostmask --- src/IRCServer.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/IRCServer.py b/src/IRCServer.py index f3f9d47b..f37a45f0 100644 --- a/src/IRCServer.py +++ b/src/IRCServer.py @@ -91,6 +91,9 @@ class Server(IRCObject.Object): def fileno(self) -> int: return self.cached_fileno or self.socket.fileno() + def hostmask(self): + return "%s!%s@%s" % (self.nickname, self.username, self.hostname) + def tls_wrap(self): client_certificate = self.bot.config.get("tls-certificate", None) client_key = self.bot.config.get("tls-key", None)