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.