From 10ca8a12192016bf9f9465ad5451064df869079b Mon Sep 17 00:00:00 2001 From: jesopo Date: Tue, 12 Mar 2019 10:39:54 +0000 Subject: [PATCH] Add IRCUser.hostmask() to format nick/user/host in to a hostmask --- src/IRCUser.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/IRCUser.py b/src/IRCUser.py index c371bf5b..6cc1c506 100644 --- a/src/IRCUser.py +++ b/src/IRCUser.py @@ -32,6 +32,9 @@ class User(IRCObject.Object): def __str__(self) -> str: return self.nickname + def hostmask(self) -> str: + return "%s!%s@%s" % (self.nickname, self.username, self.hostname) + def get_id(self)-> int: return (self.identified_account_id_override or self.identified_account_id or self._id)