Ctcp: Add configuration variable supybot.plugins.Ctcp.userinfo. Closes GH-204.

This commit is contained in:
Valentin Lorentz 2012-02-11 13:44:19 +01:00
parent 8add4911f5
commit d8ecc7db5f
2 changed files with 4 additions and 1 deletions

View File

@ -50,6 +50,9 @@ conf.registerGlobalValue(Ctcp, 'versionWait',
wait after getting a version command (not a CTCP VERSION, but an actual
call of the command in this plugin named "version") before replying with
the results it has collected."""))
conf.registerGlobalValue(Ctcp, 'userinfo',
registry.String('', """Determines what will be sent when a
USERINFO query is received."""))
###
# supybot.abuse configuration variables.

View File

@ -90,7 +90,7 @@ class Ctcp(callbacks.PluginRegexp):
def ctcpUserinfo(self, irc, msg, match):
"\x01USERINFO\x01"
self.log.info('Received CTCP USERINFO from %s', msg.prefix)
self._reply(irc, msg, 'USERINFO')
self._reply(irc, msg, 'USERINFO %s' % self.registryValue('userinfo'))
def ctcpTime(self, irc, msg, match):
"\x01TIME\x01"