report on the version of dr.botzo in CTCP VERSION
This commit is contained in:
parent
572ecddceb
commit
4289f95800
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user