#ifndef INSPIRCD_LISTMODE_PROVIDER
#define INSPIRCD_LISTMODE_PROVIDER
-#include "wildcard.h"
-
/** Get the time as a string
*/
inline std::string stringtime()
for (limitlist::iterator it = chanlimits.begin(); it != chanlimits.end(); it++)
{
- if (match(channel->name, it->mask))
+ if (InspIRCd::Match(channel->name, it->mask))
{
// We have a pattern matching the channel...
maxsize = el->size();
#include "channels.h"
#include "modules.h"
#include "transport.h"
-#include "wildcard.h"
/** Handle /FINGERPRINT
*/
std::string xhost;
while (hl >> xhost)
{
- if (match(host, xhost) || match(ip, xhost, true))
+ if (InspIRCd::Match(host, xhost) || match(ip, xhost, true))
{
return true;
}
#include "channels.h"
#include "modules.h"
#include "transport.h"
-#include "wildcard.h"
#include "dns.h"
/* $ModDesc: Provides /sslinfo command used to test who a mask matches */
*/
#include "inspircd.h"
-#include "wildcard.h"
/* $ModDesc: Provides aliases of commands. */
/* Does it match the pattern? */
if (!Aliases[i].format.empty())
{
- if (!match(Aliases[i].case_sensitive, compare, Aliases[i].format))
+ if (InspIRCd::Match(Aliases[i].case_sensitive, compare, Aliases[i].format))
continue;
}
#include "inspircd.h"
#include "u_listmode.h"
-#include "wildcard.h"
/* $ModDesc: Provides support for the +e channel mode */
/* $ModDep: ../../include/u_listmode.h */
std::string maskptr = it->mask.substr(2);
- if (match(user->GetFullRealHost(), maskptr) || match(user->GetFullHost(), maskptr) || (match(mask, maskptr, true)))
+ if (InspIRCd::Match(user->GetFullRealHost(), maskptr) || match(user->GetFullHost(), maskptr) || (InspIRCd::Match(mask, maskptr, true)))
{
// They match an entry on the list, so let them pass this.
return 1;
continue;
std::string maskptr = it->mask.substr(2);
- if (match(str, maskptr))
+ if (InspIRCd::Match(str, maskptr))
return 1; // matches
}
}
std::string mask = std::string(user->nick) + "!" + user->ident + "@" + user->GetIPString();
for (modelist::iterator it = list->begin(); it != list->end(); it++)
{
- if (match(user->GetFullRealHost(), it->mask) || match(user->GetFullHost(), it->mask) || (match(mask, it->mask, true)))
+ if (InspIRCd::Match(user->GetFullRealHost(), it->mask) || match(user->GetFullHost(), it->mask) || (InspIRCd::Match(mask, it->mask, true)))
{
// They match an entry on the list, so let them in.
return 1;
std::string mask = std::string(LM->user->nick) + "!" + LM->user->ident + "@" + LM->user->GetIPString();
for (modelist::iterator it = list->begin(); it != list->end(); it++)
{
- if (match(LM->user->GetFullRealHost(), it->mask) || match(LM->user->GetFullHost(), it->mask) || (match(mask, it->mask, true)))
+ if (InspIRCd::Match(LM->user->GetFullRealHost(), it->mask) || match(LM->user->GetFullHost(), it->mask) || (InspIRCd::Match(mask, it->mask, true)))
{
// They match an entry
return (char*)it->mask.c_str();
*/
#include "inspircd.h"
-#include "wildcard.h"
/* $ModDesc: Provides the /check command to retrieve information on a user, channel, or IP address */
/* hostname or other */
for (user_hash::const_iterator a = ServerInstance->Users->clientlist->begin(); a != ServerInstance->Users->clientlist->end(); a++)
{
- if (match(a->second->host, parameters[0]) || match(a->second->dhost, parameters[0]))
+ if (InspIRCd::Match(a->second->host, parameters[0]) || match(a->second->dhost, parameters[0]))
{
/* host or vhost matches mask */
user->WriteServ(checkstr + " match " + ConvToStr(++x) + " " + a->second->GetFullRealHost());
}
/* IP address */
- else if (match(a->second->GetIPString(), parameters[0], true))
+ else if (InspIRCd::Match(a->second->GetIPString(), parameters[0], true))
{
/* same IP. */
user->WriteServ(checkstr + " match " + ConvToStr(++x) + " " + a->second->GetFullRealHost());
*/
#include "inspircd.h"
-#include "wildcard.h"
#include "m_hash.h"
/* $ModDesc: Provides masking of user hostnames */
snprintf(mask, MAXBUF, "%s!%s@%s", user->nick.c_str(), user->ident.c_str(), tofree->c_str());
for (BanList::iterator i = chan->bans.begin(); i != chan->bans.end(); i++)
{
- if (match(mask,i->data))
+ if (InspIRCd::Match(mask,i->data))
return -1;
}
}
*/
#include "inspircd.h"
-#include "wildcard.h"
/* $ModDesc: Provides the /clones command to retrieve information on clones. */
*/
#include "inspircd.h"
-#include "wildcard.h"
/* $ModDesc: Sets (and unsets) modes on users when they connect */
{
std::string hostn = Conf->ReadValue("connect","allow",j);
/* XXX: Fixme: does not respect port, limit, etc */
- if ((match(user->GetIPString(),hostn,true)) || (match(user->host,hostn)))
+ if ((InspIRCd::Match(user->GetIPString(),hostn,true)) || (InspIRCd::Match(user->host,hostn)))
{
std::string ThisModes = Conf->ReadValue("connect","modes",j);
if (!ThisModes.empty())
*/
#include "inspircd.h"
-#include "wildcard.h"
/* $ModDesc: Provides the TITLE command which allows setting of CUSTOM WHOIS TITLE line */
std::string xhost;
while (hl >> xhost)
{
- if (match(host, xhost) || match(ip,xhost, true))
+ if (InspIRCd::Match(host, xhost) || match(ip,xhost, true))
{
return true;
}
*/
#include "inspircd.h"
-#include "wildcard.h"
/* $ModDesc: Implements config tags which allow blocking of joins to channels */
for (int j =0; j < Conf->Enumerate("badchan"); j++)
{
- if (match(redirect, Conf->ReadValue("badchan","name",j)))
+ if (InspIRCd::Match(redirect, Conf->ReadValue("badchan","name",j)))
{
bool goodchan = false;
for (int k =0; k < Conf->Enumerate("goodchan"); k++)
{
- if (match(redirect, Conf->ReadValue("goodchan","name",k)))
+ if (InspIRCd::Match(redirect, Conf->ReadValue("goodchan","name",k)))
goodchan = true;
}
{
for (int j =0; j < Conf->Enumerate("badchan"); j++)
{
- if (match(cname, Conf->ReadValue("badchan","name",j)))
+ if (InspIRCd::Match(cname, Conf->ReadValue("badchan","name",j)))
{
if (IS_OPER(user) && Conf->ReadFlag("badchan","allowopers",j))
{
for (int i = 0; i < Conf->Enumerate("goodchan"); i++)
{
- if (match(cname, Conf->ReadValue("goodchan", "name", i)))
+ if (InspIRCd::Match(cname, Conf->ReadValue("goodchan", "name", i)))
{
return 0;
}
*/
#include "inspircd.h"
-#include "wildcard.h"
/* $ModDesc: Provides masking of user hostnames in a different way to m_cloaking */
{
for (hostchanges_t::iterator i = hostchanges.begin(); i != hostchanges.end(); i++)
{
- if (((match(user->MakeHost(), i->first, true)) || (match(user->MakeHostIP(), i->first))))
+ if (((InspIRCd::Match(user->MakeHost(), i->first, true)) || (InspIRCd::Match(user->MakeHostIP(), i->first))))
{
Host* h = i->second;
#include "inspircd.h"
#include "httpd.h"
#include "protocol.h"
-#include "wildcard.h"
/* $ModDesc: Provides access control lists (passwording of resources, ip restrictions etc) to m_httpd.so dependent modules */
/* $ModDep: httpd.h */
for (std::vector<HTTPACL>::const_iterator this_acl = acl_list.begin(); this_acl != acl_list.end(); ++this_acl)
{
- if (match(http->GetURI(), this_acl->path))
+ if (InspIRCd::Match(http->GetURI(), this_acl->path))
{
if (!this_acl->blacklist.empty())
{
while (sep.GetToken(entry))
{
- if (match(http->GetIP(), entry))
+ if (InspIRCd::Match(http->GetIP(), entry))
{
ServerInstance->Logs->Log("m_httpd_acl", DEBUG, "Denying access to blacklisted resource %s (matched by pattern %s) from ip %s (matched by entry %s)",
http->GetURI().c_str(), this_acl->path.c_str(), http->GetIP().c_str(), entry.c_str());
while (sep.GetToken(entry))
{
- if (match(http->GetIP(), entry))
+ if (InspIRCd::Match(http->GetIP(), entry))
allow_access = true;
}
std::string mask = std::string(user->nick) + "!" + user->ident + "@" + user->GetIPString();
for (modelist::iterator it = list->begin(); it != list->end(); it++)
{
- if(match(user->GetFullRealHost(), it->mask) || match(user->GetFullHost(), it->mask) || (match(mask, it->mask, true)))
+ if(InspIRCd::Match(user->GetFullRealHost(), it->mask) || match(user->GetFullHost(), it->mask) || (InspIRCd::Match(mask, it->mask, true)))
{
// They match an entry on the list, so let them in.
return 1;
std::string mask = std::string(LM->user->nick) + "!" + LM->user->ident + "@" + LM->user->GetIPString();
for (modelist::iterator it = list->begin(); it != list->end(); it++)
{
- if (match(LM->user->GetFullRealHost(), it->mask) || match(LM->user->GetFullHost(), it->mask.c_str()) || (match(mask, it->mask, true)))
+ if (InspIRCd::Match(LM->user->GetFullRealHost(), it->mask) || match(LM->user->GetFullHost(), it->mask.c_str()) || (InspIRCd::Match(mask, it->mask, true)))
{
// They match an entry
return (char*)it->mask.c_str();
*/
#include "inspircd.h"
-#include "wildcard.h"
/* $ModDesc: Provides support for unreal-style oper-override */
*/
#include "inspircd.h"
-#include "wildcard.h"
/** Holds a users m_safelist state
*/
if ((chan) && (chan->modes[CM_PRIVATE]) && (!IS_OPER(user)))
{
- bool display = (match(chan->name, ld->glob) || (!chan->topic.empty() && match(chan->topic, ld->glob)));
+ bool display = (InspIRCd::Match(chan->name, ld->glob) || (!chan->topic.empty() && match(chan->topic, ld->glob)));
if ((users) && (display))
{
int counter = snprintf(buffer, MAXBUF, "322 %s * %ld :", user->nick.c_str(), users);
}
else if ((chan) && ((((!(chan->IsModeSet('p'))) && (!(chan->IsModeSet('s'))))) || (has_user) || IS_OPER(user)))
{
- bool display = (match(chan->name, ld->glob) || (!chan->topic.empty() && match(chan->topic, ld->glob)));
+ bool display = (InspIRCd::Match(chan->name, ld->glob) || (!chan->topic.empty() && match(chan->topic, ld->glob)));
if ((users) && (display))
{
int counter = snprintf(buffer, MAXBUF, "322 %s %s %ld :[+%s] %s", user->nick.c_str(), chan->name.c_str(), users, chan->ChanModes(has_user || IS_OPER(user)), chan->topic.c_str());
*/
#include "inspircd.h"
-#include "wildcard.h"
/* $ModDesc: Provides support for the /SILENCE command */
#include "commands/cmd_whois.h"
#include "commands/cmd_stats.h"
#include "socket.h"
-#include "wildcard.h"
#include "xline.h"
#include "transport.h"
#include "commands/cmd_whois.h"
#include "commands/cmd_stats.h"
#include "socket.h"
-#include "wildcard.h"
#include "xline.h"
#include "transport.h"
#include "commands/cmd_whois.h"
#include "commands/cmd_stats.h"
#include "socket.h"
-#include "wildcard.h"
#include "xline.h"
#include "transport.h"
#include "m_hash.h"
#include "commands/cmd_whois.h"
#include "commands/cmd_stats.h"
#include "socket.h"
-#include "wildcard.h"
#include "xline.h"
#include "transport.h"
#include "commands/cmd_whois.h"
#include "commands/cmd_stats.h"
#include "socket.h"
-#include "wildcard.h"
#include "xline.h"
#include "transport.h"
{
if (parameters.size() > 0)
{
- if (match(ServerInstance->Config->ServerName, parameters[0]))
+ if (InspIRCd::Match(ServerInstance->Config->ServerName, parameters[0]))
return 0;
/* Remote ADMIN, the server is within the 1st parameter */
/* $ModDesc: Provides a spanning tree server link protocol */
#include "inspircd.h"
-#include "wildcard.h"
#include "m_spanningtree/main.h"
#include "m_spanningtree/utils.h"
#include "commands/cmd_whois.h"
#include "commands/cmd_stats.h"
#include "socket.h"
-#include "wildcard.h"
#include "xline.h"
#include "transport.h"
{
if (parameters.size() > 0)
{
- if (match(ServerInstance->Config->ServerName, parameters[0]))
+ if (InspIRCd::Match(ServerInstance->Config->ServerName, parameters[0]))
return 0;
std::deque<std::string> params;
#include "commands/cmd_whois.h"
#include "commands/cmd_stats.h"
#include "socket.h"
-#include "wildcard.h"
#include "xline.h"
#include "transport.h"
{
if (parameters.size() > 0)
{
- if (match(ServerInstance->Config->ServerName, parameters[0]))
+ if (InspIRCd::Match(ServerInstance->Config->ServerName, parameters[0]))
return 0;
/* Remote MOTD, the server is within the 1st parameter */
#include "commands/cmd_whois.h"
#include "commands/cmd_stats.h"
#include "socket.h"
-#include "wildcard.h"
#include "xline.h"
#include "transport.h"
#include "commands/cmd_whois.h"
#include "commands/cmd_stats.h"
#include "socket.h"
-#include "wildcard.h"
#include "xline.h"
#include "transport.h"
{
if (parameters.size() > 1)
{
- if (match(ServerInstance->Config->ServerName, parameters[1]))
+ if (InspIRCd::Match(ServerInstance->Config->ServerName, parameters[1]))
return 0;
/* Remote STATS, the server is within the 2nd parameter */
#include "commands/cmd_whois.h"
#include "commands/cmd_stats.h"
#include "socket.h"
-#include "wildcard.h"
#include "xline.h"
#include "transport.h"
#include "commands/cmd_whois.h"
#include "commands/cmd_stats.h"
#include "socket.h"
-#include "wildcard.h"
#include "xline.h"
#include "transport.h"
#include "commands/cmd_whois.h"
#include "commands/cmd_stats.h"
#include "socket.h"
-#include "wildcard.h"
#include "xline.h"
#include "transport.h"
#include "socketengine.h"
#include "commands/cmd_whois.h"
#include "commands/cmd_stats.h"
#include "socket.h"
-#include "wildcard.h"
#include "xline.h"
#include "transport.h"
#include "socketengine.h"
#include "commands/cmd_whois.h"
#include "commands/cmd_stats.h"
#include "socket.h"
-#include "wildcard.h"
#include "xline.h"
#include "transport.h"
#include "commands/cmd_whois.h"
#include "commands/cmd_stats.h"
#include "socket.h"
-#include "wildcard.h"
#include "xline.h"
#include "transport.h"
#include "commands/cmd_whois.h"
#include "commands/cmd_stats.h"
#include "socket.h"
-#include "wildcard.h"
#include "xline.h"
#include "transport.h"
#include "socketengine.h"
#include "commands/cmd_whois.h"
#include "commands/cmd_stats.h"
#include "socket.h"
-#include "wildcard.h"
#include "xline.h"
#include "transport.h"
#include "commands/cmd_whois.h"
#include "commands/cmd_stats.h"
#include "socket.h"
-#include "wildcard.h"
#include "xline.h"
#include "transport.h"
#include "commands/cmd_stats.h"
#include "socket.h"
#include "inspircd.h"
-#include "wildcard.h"
#include "xline.h"
#include "transport.h"
#include "commands/cmd_whois.h"
#include "commands/cmd_stats.h"
#include "socket.h"
-#include "wildcard.h"
#include "xline.h"
#include "transport.h"
#include "commands/cmd_whois.h"
#include "commands/cmd_stats.h"
#include "socket.h"
-#include "wildcard.h"
#include "xline.h"
#include "transport.h"
#include "socketengine.h"
#include "commands/cmd_whois.h"
#include "commands/cmd_stats.h"
#include "socket.h"
-#include "wildcard.h"
#include "xline.h"
#include "transport.h"
#include "socketengine.h"
#include "commands/cmd_whois.h"
#include "commands/cmd_stats.h"
#include "socket.h"
-#include "wildcard.h"
#include "xline.h"
#include "transport.h"
#include "socketengine.h"
#include "commands/cmd_whois.h"
#include "commands/cmd_stats.h"
#include "socket.h"
-#include "wildcard.h"
#include "xline.h"
#include "transport.h"
#include "socketengine.h"
#include "commands/cmd_whois.h"
#include "commands/cmd_stats.h"
#include "socket.h"
-#include "wildcard.h"
#include "xline.h"
#include "transport.h"
#include "socketengine.h"
#include "commands/cmd_whois.h"
#include "commands/cmd_stats.h"
#include "socket.h"
-#include "wildcard.h"
#include "xline.h"
#include "transport.h"
#include "socketengine.h"
#include "commands/cmd_whois.h"
#include "commands/cmd_stats.h"
#include "socket.h"
-#include "wildcard.h"
#include "xline.h"
#include "transport.h"
#include "commands/cmd_stats.h"
#include "socket.h"
#include "inspircd.h"
-#include "wildcard.h"
#include "xline.h"
#include "transport.h"
#include "commands/cmd_whois.h"
#include "commands/cmd_stats.h"
#include "socket.h"
-#include "wildcard.h"
#include "xline.h"
#include "transport.h"
#include "m_hash.h"
#include "commands/cmd_whois.h"
#include "commands/cmd_stats.h"
#include "socket.h"
-#include "wildcard.h"
#include "xline.h"
#include "transport.h"
#include "socketengine.h"
#include "commands/cmd_whois.h"
#include "commands/cmd_stats.h"
#include "socket.h"
-#include "wildcard.h"
#include "xline.h"
#include "transport.h"
#include "m_hash.h"
#include "commands/cmd_whois.h"
#include "commands/cmd_stats.h"
#include "socket.h"
-#include "wildcard.h"
#include "xline.h"
#include "transport.h"
#include "socketengine.h"
{
for (server_hash::iterator i = serverlist.begin(); i != serverlist.end(); i++)
{
- if (match(i->first,ServerName))
+ if (InspIRCd::Match(i->first,ServerName))
return i->second;
}
return NULL;
#include "commands/cmd_whois.h"
#include "commands/cmd_stats.h"
#include "socket.h"
-#include "wildcard.h"
#include "xline.h"
#include "transport.h"
#include "socketengine.h"
#include "commands/cmd_whois.h"
#include "commands/cmd_stats.h"
#include "socket.h"
-#include "wildcard.h"
#include "xline.h"
#include "transport.h"
#include "socketengine.h"
/* $ModDesc: Provides the ability to see the complete names list of channels an oper is not a member of */
#include "inspircd.h"
-#include "wildcard.h"
class ModuleSpy : public Module
{
*/
#include "inspircd.h"
-#include "wildcard.h"
/* $ModDesc: Provides /tline command used to test who a mask matches */
for (user_hash::const_iterator u = ServerInstance->Users->clientlist->begin(); u != ServerInstance->Users->clientlist->end(); u++)
{
n_counted++;
- if (match(u->second->GetFullRealHost(),parameters[0]))
+ if (InspIRCd::Match(u->second->GetFullRealHost(),parameters[0]))
{
n_matched++;
n_match_host++;
else
{
std::string host = std::string(u->second->ident) + "@" + u->second->GetIPString();
- if (match(host, parameters[0], true))
+ if (InspIRCd::Match(host, parameters[0], true))
{
n_matched++;
n_match_ip++;