From 404154826252d8a031d83ef5c098a8727d3fb6e2 Mon Sep 17 00:00:00 2001 From: attilamolnar Date: Wed, 4 Jul 2012 15:44:38 +0200 Subject: m_inviteexception Remove useless check --- src/modules/m_inviteexception.cpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'src/modules/m_inviteexception.cpp') diff --git a/src/modules/m_inviteexception.cpp b/src/modules/m_inviteexception.cpp index 33c82fa0a..5e6628e6d 100644 --- a/src/modules/m_inviteexception.cpp +++ b/src/modules/m_inviteexception.cpp @@ -68,17 +68,14 @@ public: ModResult OnCheckInvite(User* user, Channel* chan) { - if(chan != NULL) + modelist* list = ie.extItem.get(chan); + if (list) { - modelist* list = ie.extItem.get(chan); - if (list) + for (modelist::iterator it = list->begin(); it != list->end(); it++) { - for (modelist::iterator it = list->begin(); it != list->end(); it++) + if (chan->CheckBan(user, it->mask)) { - if (chan->CheckBan(user, it->mask)) - { - return MOD_RES_ALLOW; - } + return MOD_RES_ALLOW; } } } -- cgit v1.2.3