diff options
-rw-r--r-- | include/u_listmode.h | 11 | ||||
-rw-r--r-- | src/modules/m_banexception.cpp | 5 | ||||
-rw-r--r-- | src/modules/m_inviteexception.cpp | 3 |
3 files changed, 9 insertions, 10 deletions
diff --git a/include/u_listmode.h b/include/u_listmode.h index 28c364698..d5770d9b7 100644 --- a/include/u_listmode.h +++ b/include/u_listmode.h @@ -45,7 +45,7 @@ class ListItem : public classbase { public: std::string nick; - std::string mask; + irc::string mask; std::string time; }; @@ -102,11 +102,12 @@ class ListModeBase : public ModeHandler { modelist* el; channel->GetExt(infokey, el); + irc::string csp(assign(parameter)); if (el) { for (modelist::iterator it = el->begin(); it != el->end(); it++) { - if(parameter == it->mask) + if(csp == it->mask) { return std::make_pair(true, parameter); } @@ -145,7 +146,7 @@ class ListModeBase : public ModeHandler n->SetFd(FD_MAGIC_NUMBER); for(modelist::iterator it = el->begin(); it != el->end(); it++) { - modestack.Push(this->GetModeChar(), it->mask); + modestack.Push(this->GetModeChar(), assign(it->mask)); } while (modestack.GetStackedLine(stackresult)) { @@ -252,7 +253,7 @@ class ListModeBase : public ModeHandler { // And now add the mask onto the list... ListItem e; - e.mask = parameter; + e.mask = assign(parameter); e.nick = source->nick; e.time = stringtime(); @@ -338,7 +339,7 @@ class ListModeBase : public ModeHandler { for (modelist::iterator it = list->begin(); it != list->end(); it++) { - modestack.Push(std::string(1, mode)[0], it->mask); + modestack.Push(std::string(1, mode)[0], assign(it->mask)); } } while (modestack.GetStackedLine(stackresult)) diff --git a/src/modules/m_banexception.cpp b/src/modules/m_banexception.cpp index d36d23c68..a340a5ce7 100644 --- a/src/modules/m_banexception.cpp +++ b/src/modules/m_banexception.cpp @@ -81,7 +81,7 @@ public: snprintf(mask, MAXBUF, "%s!%s@%s", user->nick, user->ident, user->GetIPString()); for (modelist::iterator it = list->begin(); it != list->end(); it++) { - if (ServerInstance->MatchText(user->GetFullRealHost(), it->mask) || ServerInstance->MatchText(user->GetFullHost(), it->mask) || (match(mask, it->mask.c_str(), true))) + if (match(user->GetFullRealHost(), it->mask.c_str()) || match(user->GetFullHost(), it->mask.c_str()) || (match(mask, it->mask.c_str(), true))) { // They match an entry on the list, so let them in. return 1; @@ -127,8 +127,7 @@ public: snprintf(mask, MAXBUF, "%s!%s@%s", LM->user->nick, LM->user->ident, LM->user->GetIPString()); for (modelist::iterator it = list->begin(); it != list->end(); it++) { - if (ServerInstance->MatchText(LM->user->GetFullRealHost(), it->mask) || ServerInstance->MatchText(LM->user->GetFullHost(), it->mask) || - (match(mask, it->mask.c_str(), true))) + if (match(LM->user->GetFullRealHost(), it->mask.c_str()) || match(LM->user->GetFullHost(), it->mask.c_str()) || (match(mask, it->mask.c_str(), true))) { // They match an entry return (char*)it->mask.c_str(); diff --git a/src/modules/m_inviteexception.cpp b/src/modules/m_inviteexception.cpp index 26d36b094..8cca13b1e 100644 --- a/src/modules/m_inviteexception.cpp +++ b/src/modules/m_inviteexception.cpp @@ -103,8 +103,7 @@ public: snprintf(mask, MAXBUF, "%s!%s@%s", LM->user->nick, LM->user->ident, LM->user->GetIPString()); for (modelist::iterator it = list->begin(); it != list->end(); it++) { - if (ServerInstance->MatchText(LM->user->GetFullRealHost(), it->mask) || ServerInstance->MatchText(LM->user->GetFullHost(), it->mask) || - (match(mask, it->mask.c_str(), true))) + if (match(LM->user->GetFullRealHost(), it->mask.c_str()) || match(LM->user->GetFullHost(), it->mask.c_str()) || (match(mask, it->mask.c_str(), true))) { // They match an entry return (char*)it->mask.c_str(); |