From 7b983bc921d3e0334f38842e43dc7f34117da8dc Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Tue, 16 Dec 2003 20:56:05 +0000 Subject: [PATCH] Added some better logging. --- src/ircdb.py | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/src/ircdb.py b/src/ircdb.py index 4624547f7..b574de2e1 100644 --- a/src/ircdb.py +++ b/src/ircdb.py @@ -569,6 +569,7 @@ def checkIgnored(hostmask, recipient='', users=users, channels=channels): """ for ignore in conf.ignores: if ircutils.hostmaskPatternEqual(ignore, hostmask): + log.info('Ignoring %s due to conf.ignores.', hostmask) return True try: id = users.getUserId(hostmask) @@ -577,18 +578,31 @@ def checkIgnored(hostmask, recipient='', users=users, channels=channels): # If there's no user... if ircutils.isChannel(recipient): channel = channels.getChannel(recipient) - return channel.checkIgnored(hostmask) + if channel.checkIgnored(hostmask): + log.info('Ignoring %s due to the channel ignores.', hostmask) + return True + else: + return False else: - return conf.defaultIgnore + if conf.defaultIgnore: + log.info('Ignoring %s due to conf.defaultIgnore', hostmask) + return True + else: + return False if user.checkCapability('owner'): # Owners shouldn't ever be ignored. return False elif user.ignore: + log.info('Ignoring %s due to his IrcUser ignore flag.', hostmask) return True elif recipient: if ircutils.isChannel(recipient): channel = channels.getChannel(recipient) - return channel.checkIgnored(hostmask) + if channel.checkIgnored(hostmask): + log.info('Ignoring %s due to the channel ignores.', hostmask) + return True + else: + return False else: return False else: