* | Inspire Internet Relay Chat Daemon |
* +------------------------------------+
*
- * InspIRCd: (C) 2002-2008 InspIRCd Development Team
+ * InspIRCd: (C) 2002-2009 InspIRCd Development Team
* See: http://www.inspircd.org/wiki/index.php/Credits
*
* This program is free but copyrighted software; see
{
if (params.size() > 1)
{
- if (Instance->MatchText(Instance->Config->GetSID(), params[0]))
+ if (InspIRCd::Match(ServerInstance->Config->GetSID(), params[0]))
{
Event event((char*) ¶ms, (Module*)this->Utils->Creator, "encap_received");
- event.Send(Instance);
- }
- else
- {
- User* u = Instance->FindNick(params[0]);
-
- if (u && IS_LOCAL(u))
- {
- Event event((char*) ¶ms, (Module*)this->Utils->Creator, "encap_received");
- event.Send(Instance);
- }
-
- return true;
+ event.Send(ServerInstance);
}
if (params[0].find('*') != std::string::npos)
{
- User* u = Instance->FindNick(params[0]);
- if (u)
- Utils->DoOneToAllButSender(prefix, "ENCAP", params, u->server);
- else
- Utils->DoOneToAllButSender(prefix, "ENCAP", params, params[0]);
+ Utils->DoOneToAllButSender(prefix, "ENCAP", params, prefix);
}
else
- Utils->DoOneToOne(prefix, "ENCAP", params, prefix);
+ Utils->DoOneToOne(prefix, "ENCAP", params, params[0]);
}
return true;
}