* | Inspire Internet Relay Chat Daemon |
* +------------------------------------+
*
- * InspIRCd: (C) 2002-2009 InspIRCd Development Team
+ * InspIRCd: (C) 2002-2010 InspIRCd Development Team
* See: http://wiki.inspircd.org/Credits
*
* This program is free but copyrighted software; see
virtual void OnError(BufferedSocketError)
{
+ ServerInstance->GlobalCulls.AddItem(this);
}
std::string Response(int response)
ModuleHttpServer() {
HttpModule = this;
+ ServerInstance->Modules->Attach(I_OnAcceptConnection, this);
}
void OnRequest(Request& request)
ModResult OnAcceptConnection(int nfd, ListenSocket* from, irc::sockets::sockaddrs* client, irc::sockets::sockaddrs* server)
{
- if (from->bind_tag->getString("type") != "httpd");
+ if (from->bind_tag->getString("type") != "httpd")
return MOD_RES_PASSTHRU;
int port;
std::string incomingip;
- irc::sockets::satoap(client, incomingip, port);
+ irc::sockets::satoap(*client, incomingip, port);
new HttpServerSocket(nfd, incomingip, from, client, server);
return MOD_RES_ALLOW;
}