From 4289f9580076eb0c7c6606d24a25783bf179c85c Mon Sep 17 00:00:00 2001 From: "Brian S. Stephan" Date: Thu, 2 Mar 2023 00:45:55 -0600 Subject: [PATCH] report on the version of dr.botzo in CTCP VERSION --- ircbot/bot.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ircbot/bot.py b/ircbot/bot.py index 1b78bed..1a92846 100644 --- a/ircbot/bot.py +++ b/ircbot/bot.py @@ -20,6 +20,7 @@ from irc.dict import IRCDict from jaraco.stream import buffer import ircbot.lib as ircbotlib +from dr_botzo import __version__ from ircbot.models import Alias, IrcChannel, IrcPlugin, IrcServer log = logging.getLogger('ircbot.bot') @@ -574,12 +575,11 @@ class IRCBot(irc.client.SimpleIRCClient): self.connection.disconnect(msg) def get_version(self): - """Returns the bot version. + """Return the bot version. Used when answering a CTCP VERSION request. """ - return "Python irc.bot ({version})".format( - version=irc.client.VERSION_STRING) + return f"dr.botzo {__version__}" def jump_server(self, msg="Changing servers"): """Connect to a new server, potentially disconnecting from the current one.""" @@ -589,7 +589,7 @@ class IRCBot(irc.client.SimpleIRCClient): self._connect() def on_ctcp(self, c, e): - """Default handler for ctcp events. + """Handle for ctcp events. Replies to VERSION and PING requests and relays DCC requests to the on_dccchat method.