From 85e863f92c2d2dcc2dbe62ab9ed96828ddcffbd6 Mon Sep 17 00:00:00 2001 From: James Vega Date: Thu, 23 Oct 2003 15:23:01 +0000 Subject: [PATCH] Parse 'my' in @lart and @praise (Closes: RFE #828950) --- plugins/FunDB.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/plugins/FunDB.py b/plugins/FunDB.py index 2da60ff35..fa9ae1ab4 100755 --- a/plugins/FunDB.py +++ b/plugins/FunDB.py @@ -427,8 +427,10 @@ class FunDB(callbacks.Privmsg): irc.error(msg, 'There are currently no available larts.') else: (id, lart) = cursor.fetchone() - if nick == irc.nick or nick == 'me': + if nick in (irc.nick, 'me'): lartee = msg.nick + elif 'my' in nick: + lartee = nick.replace('my', '%s\'s' % msg.nick) else: lartee = nick lart = lart.replace("$who", lartee) @@ -478,8 +480,10 @@ class FunDB(callbacks.Privmsg): irc.error(msg, 'There are currently no available praises.') else: (id, praise) = cursor.fetchone() - if nick == msg.nick or nick == 'me': + if nick in (msg.nick, 'me'): praisee = msg.nick + elif 'my' in nick: + praisee = nick.replace('my', '%s\'s' % msg.nick) else: praisee = nick praise = praise.replace("$who", praisee)