diff --git a/plugins/__init__.py b/plugins/__init__.py index 03316e120..ea93268ac 100644 --- a/plugins/__init__.py +++ b/plugins/__init__.py @@ -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(), ) diff --git a/src/conf.py b/src/conf.py index 3336f2599..2b89d6396 100644 --- a/src/conf.py +++ b/src/conf.py @@ -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