Skip to content

Commit d8ecc7d

Browse files
committed
Ctcp: Add configuration variable supybot.plugins.Ctcp.userinfo. Closes GH-204.
1 parent 8add491 commit d8ecc7d

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

plugins/Ctcp/config.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ def configure(advanced):
5050
wait after getting a version command (not a CTCP VERSION, but an actual
5151
call of the command in this plugin named "version") before replying with
5252
the results it has collected."""))
53+
conf.registerGlobalValue(Ctcp, 'userinfo',
54+
registry.String('', """Determines what will be sent when a
55+
USERINFO query is received."""))
5356

5457
###
5558
# supybot.abuse configuration variables.

plugins/Ctcp/plugin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def ctcpVersion(self, irc, msg, match):
9090
def ctcpUserinfo(self, irc, msg, match):
9191
"\x01USERINFO\x01"
9292
self.log.info('Received CTCP USERINFO from %s', msg.prefix)
93-
self._reply(irc, msg, 'USERINFO')
93+
self._reply(irc, msg, 'USERINFO %s' % self.registryValue('userinfo'))
9494

9595
def ctcpTime(self, irc, msg, match):
9696
"\x01TIME\x01"

0 commit comments

Comments
 (0)