diff --git a/Tail/config.py b/Tail/config.py index cc6e86f..1933582 100644 --- a/Tail/config.py +++ b/Tail/config.py @@ -53,6 +53,9 @@ class Targets(registry.SpaceSeparatedListOfStrings): conf.registerGlobalValue(Tail, 'targets', Targets([], """Determines what targets will be messaged with lines from the files being tailed.""")) +conf.registerGlobalValue(Tail, 'prepend_filename', + registry.Boolean(True, """Determines whether the bot will prepend the filename + to the tail lines announced to the channel.""")) conf.registerGlobalValue(Tail, 'bold', registry.Boolean(False, """Determines whether the bot will bold the filename in tail lines announced to the channel.""")) diff --git a/Tail/plugin.py b/Tail/plugin.py index 2905d82..72d4a57 100644 --- a/Tail/plugin.py +++ b/Tail/plugin.py @@ -91,7 +91,10 @@ def _send(self, irc, filename, text): if self.registryValue('bold'): filename = ircutils.bold(filename) notice = self.registryValue('notice') - payload = '%s: %s' % (filename, text) + if self.registryValue('prepend_filename'): + payload = '%s: %s' % (filename, text) + else: + payload = text for target in self.registryValue('targets'): irc.reply(payload, to=target, notice=notice, private=True) @@ -139,8 +142,10 @@ def target(self, irc, msg, args, optlist, targets): irc.reply(format('%L', L)) else: irc.reply('I\'m not currently targeting anywhere.') - elif remove: - pass #XXX + else: + # XXX + irc.reply('Not implemented; use config plugins.Tail.targets instead') + target = wrap(target, [getopts({'remove': ''}), any('something')])