From bd1fb9f9a66017d26e298cf9cacdf5bede724f01 Mon Sep 17 00:00:00 2001 From: Daniel Folkinshteyn Date: Sun, 11 Apr 2010 16:25:07 -0400 Subject: [PATCH] make on-join telling for later configurable. --- plugins/Later/config.py | 5 ++++- plugins/Later/plugin.py | 6 ++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/plugins/Later/config.py b/plugins/Later/config.py index 97ddde7ca..9ae208bc0 100644 --- a/plugins/Later/config.py +++ b/plugins/Later/config.py @@ -45,5 +45,8 @@ conf.registerGlobalValue(Later, 'maximum', conf.registerGlobalValue(Later, 'private', registry.Boolean(True, """Determines whether users will be notified in the first place in which they're seen, or in private.""")) - +conf.registerGlobalValue(Later, 'tellOnJoin', + registry.Boolean(True, """Determines whether users will be notified upon + joining any channel the bot is in, or only upon sending a message.""")) + # vim:set shiftwidth=4 softtabstop=4 expandtab textwidth=79: diff --git a/plugins/Later/plugin.py b/plugins/Later/plugin.py index 92e7298a2..bf89718b9 100644 --- a/plugins/Later/plugin.py +++ b/plugins/Later/plugin.py @@ -197,8 +197,10 @@ class Later(callbacks.Plugin): def _formatNote(self, when, whence, note): return 'Sent %s: <%s> %s' % (self._timestamp(when), whence, note) - - doJoin = doPrivmsg + + def doJoin(self, irc, msg): + if self.registryValue('tellOnJoin'): + self.doPrivmsg(irc, msg) Class = Later