- ExtensionItem* wiext = ServerInstance->Extensions.GetItem(extname);
- if (!wiext)
- return false;
-
- if (wiext->creator->ModuleSourceFile != "m_cgiirc.so")
- return false;
-
- StringExtItem* stringext = static_cast<StringExtItem*>(wiext);
- std::string* addr = stringext->get(user);
- if (!addr)
- return false;
-
- out = *addr;
- return true;
- }
-
-
- void SendHostIP()
- {
- std::string host, ip;
-
- if (!ReadCGIIRCExt("cgiirc_webirc_hostname", user, host))
- {
- host = user->host;
- }
- if (!ReadCGIIRCExt("cgiirc_webirc_ip", user, ip))
- {
- ip = user->GetIPString();
- }
- else
- {
- /* IP addresses starting with a : on irc are a Bad Thing (tm) */
- if (ip.c_str()[0] == ':')
- ip.insert(ip.begin(),1,'0');
- }
+ std::vector<std::string> params;
+ params.push_back(user->GetRealHost());
+ params.push_back(user->GetIPString());
+ params.push_back(sslapi && sslapi->GetCertificate(user) ? "S" : "P");