Now we don't try to send empty messages privately.

This commit is contained in:
Jeremy Fincher 2004-12-18 14:00:27 +00:00
parent 481752fddd
commit bb4890c067

View File

@ -163,13 +163,14 @@ class Config(callbacks.Privmsg):
search = wrap(search, ['lowered']) # XXX compose with withoutSpaces? search = wrap(search, ['lowered']) # XXX compose with withoutSpaces?
def _getValue(self, irc, msg, group): def _getValue(self, irc, msg, group):
value = str(group) or ' '
if hasattr(group, 'value'): if hasattr(group, 'value'):
if not group._private: if not group._private:
irc.reply(str(group) or ' ') irc.reply(value)
else: else:
capability = getCapability(group._name) capability = getCapability(group._name)
if ircdb.checkCapability(msg.prefix, capability): if ircdb.checkCapability(msg.prefix, capability):
irc.reply(str(group), private=True) irc.reply(value, private=True)
else: else:
irc.errorNoCapability(capability) irc.errorNoCapability(capability)
else: else: