From f3a09ce684fa0bc4e79a6ea82781c8a543fe925a Mon Sep 17 00:00:00 2001 From: James McCoy Date: Wed, 23 May 2012 00:52:24 -0400 Subject: [PATCH] Success: Allow the plugin to be loaded from a query Closes: Sf#3513915 Signed-off-by: James McCoy --- plugins/Success/plugin.py | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/plugins/Success/plugin.py b/plugins/Success/plugin.py index ec6adbcf0..b9f011472 100644 --- a/plugins/Success/plugin.py +++ b/plugins/Success/plugin.py @@ -47,7 +47,7 @@ class Success(plugins.ChannelIdDatabasePlugin): self.originalClass = conf.supybot.replies.success.__class__ class MySuccessClass(self.originalClass): def __call__(self): - ret = pluginSelf.db.random(pluginSelf.target) + ret = pluginSelf.db.random(dynamic.msg.args[0]) if ret is None: try: self.__class__ = pluginSelf.originalClass @@ -68,14 +68,6 @@ class Success(plugins.ChannelIdDatabasePlugin): self.__parent.die() conf.supybot.replies.success.__class__ = self.originalClass - def inFilter(self, irc, msg): - # We need the target, but we need it before Owner.doPrivmsg is called, - # so this seems like the only way to do it. - self.target = msg.args[0] - return msg - - Class = Success - # vim:set shiftwidth=4 softtabstop=8 expandtab textwidth=78: