From 0b309b0e7dffbb4d48c157a60029eb3275a99f7d Mon Sep 17 00:00:00 2001 From: Jon Bergli Heier Date: Wed, 9 Jun 2010 20:25:20 +0200 Subject: Added CTCP VERSION and SOURCE replies. --- fot.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/fot.py b/fot.py index 5ecd65d..d85ace8 100755 --- a/fot.py +++ b/fot.py @@ -4,8 +4,9 @@ from twisted.words.protocols import irc from twisted.internet import reactor, protocol from twisted.python import log from twisted.protocols.basic import LineReceiver +from twisted._version import version as twisted_version -import os, re +import os, re, platform from ConfigParser import ConfigParser @@ -57,6 +58,11 @@ def refresh_modules(): class Bot(irc.IRCClient): def __init__(self): + self.versionName = 'fot' + self.versionNum = 'Python/%s %s' % (platform.python_version(), str(twisted_version)) + self.versionEnv = '%s %s %s %s' % (platform.system(), platform.release(), platform.version(), platform.machine()) + self.sourceURL = 'http://cgit.jvnv.net/fot/' + bots.append(self) self.modules = {} self.keywords = {} -- cgit v1.2.3