From bc7051e51512fd558ae6c851181d7c6a19d23f13 Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Sat, 5 Jan 2013 19:06:49 +0100 Subject: [PATCH] core: Fix tests of plugins using user id for checking capabilities. --- src/ircdb.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ircdb.py b/src/ircdb.py index e12dfdc53..601ce52e6 100644 --- a/src/ircdb.py +++ b/src/ircdb.py @@ -1046,7 +1046,8 @@ def checkCapability(hostmask, capability, users=users, channels=channels, ignoreOwner=False): """Checks that the user specified by name/hostmask has the capability given. """ - if world.testing and ('@' not in hostmask or + if world.testing and (not isinstance(hostmask, str) or + '@' not in hostmask or '__no_testcap__' not in hostmask.split('@')[1]): return _x(capability, True) try: