PEP8 clean
This commit is contained in:
parent
95deafe7af
commit
e17996d858
23 changed files with 496 additions and 331 deletions
|
|
@ -20,6 +20,7 @@ import imp
|
|||
|
||||
from exception import IRCException
|
||||
|
||||
|
||||
def call_game(call, *args, **kargs):
|
||||
"""TODO"""
|
||||
l = list()
|
||||
|
|
@ -70,6 +71,7 @@ from hooks.messagehook import MessageHook
|
|||
|
||||
last_registered = []
|
||||
|
||||
|
||||
def hook(store, *args, **kargs):
|
||||
"""Function used as a decorator for module loading"""
|
||||
def sec(call):
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@
|
|||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
class HooksManager:
|
||||
|
||||
"""Class to manage hooks"""
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ from exception import IRCException
|
|||
import hooks
|
||||
import message
|
||||
|
||||
|
||||
class MessageHook(hooks.AbstractHook):
|
||||
|
||||
"""Class storing hook information, specialized for a generic Message"""
|
||||
|
|
@ -52,9 +53,9 @@ class MessageHook(hooks.AbstractHook):
|
|||
|
||||
def is_matching(self, strcmp, receivers=list(), server=None):
|
||||
"""Test if the current hook correspond to the message"""
|
||||
if (server is None or self.server is None or self.server == server
|
||||
) and ((self.name is None or strcmp == self.name) and (
|
||||
self.regexp is None or re.match(self.regexp, strcmp))):
|
||||
if ((server is None or self.server is None or self.server == server)
|
||||
and ((self.name is None or strcmp == self.name) and (
|
||||
self.regexp is None or re.match(self.regexp, strcmp)))):
|
||||
|
||||
if receivers and self.channels:
|
||||
for receiver in receivers:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue