mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-05 18:49:23 +01:00
supybot.reply.format.databaseRecord: Add $nick
This commit is contained in:
parent
4046a1b201
commit
7444e656d8
@ -444,10 +444,13 @@ class ChannelIdDatabasePlugin(callbacks.Plugin):
|
||||
|
||||
def showRecord(self, record):
|
||||
template = string.Template(conf.supybot.reply.format.databaseRecord())
|
||||
username = getUserName(record.by)
|
||||
nick = username.split('!')[0] # nick==username iff this is a registered user
|
||||
return template.substitute(
|
||||
id=record.id,
|
||||
text=record.text,
|
||||
username=getUserName(record.by),
|
||||
username=username,
|
||||
nick=nick,
|
||||
at=record.at,
|
||||
**self.typeSubstitutions(),
|
||||
)
|
||||
|
@ -509,7 +509,7 @@ registerChannelValue(supybot.reply.format, 'databaseRecord',
|
||||
_("""Format used by generic database plugins (Lart, Dunno, Prase, Success,
|
||||
Quote, ...) to show an entry. You can use the following variables:
|
||||
$type/$types/$Type/$Types (plugin name and variants), $id, $text,
|
||||
$userid/$username (author), $at (creation time).""")))
|
||||
$at (creation time), $userid/$username/$nick (author).""")))
|
||||
|
||||
registerGlobalValue(supybot.reply, 'maximumLength',
|
||||
registry.Integer(512*256, _("""Determines the absolute maximum length of
|
||||
|
Loading…
Reference in New Issue
Block a user