diff --git a/plugins/Utilities/plugin.py b/plugins/Utilities/plugin.py index a8766d223..9255b937c 100644 --- a/plugins/Utilities/plugin.py +++ b/plugins/Utilities/plugin.py @@ -1,5 +1,6 @@ ### # Copyright (c) 2002-2004, Jeremiah Fincher +# Copyright (c) 2010, James Vega # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -43,7 +44,11 @@ class Utilities(callbacks.Plugin): Does nothing. Useful sometimes for sequencing commands when you don't care about their non-error return values. """ - pass + if irc.nested: + msg.tag('ignored') + # Need to call NestedCommandsIrcProxy.reply to continue evaluation + # of the remaining nested commands. + irc.reply('') # Do be careful not to wrap this unless you do any('something'). def success(self, irc, msg, args, text): diff --git a/src/callbacks.py b/src/callbacks.py index ce941b4d7..a836165e3 100644 --- a/src/callbacks.py +++ b/src/callbacks.py @@ -1,6 +1,6 @@ ### # Copyright (c) 2002-2005, Jeremiah Fincher -# Copyright (c) 2008-2009, James Vega +# Copyright (c) 2008-2010, James Vega # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -920,7 +920,14 @@ class NestedCommandsIrcProxy(ReplyIrcProxy): finally: self._resetReplyAttributes() else: - self.args[self.counter] = s + if msg.ignored: + # Since the final reply string is constructed via + # ' '.join(self.args), the args index for ignored commands + # needs to be popped to avoid extra spaces in the final reply. + self.args.pop(self.counter) + msg.tag('ignored', False) + else: + self.args[self.counter] = s self.evalArgs() def error(self, s='', Raise=False, **kwargs):