#include "inspircd.h"
-/* $ModDesc: Provides masking of user hostnames in a different way to m_cloaking */
-
/** Holds information on a host set by m_hostchange
*/
class Host
std::string MySeparator;
public:
- void init() CXX11_OVERRIDE
- {
- OnRehash(NULL);
- Implementation eventlist[] = { I_OnRehash, I_OnUserConnect };
- ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
- }
-
- void OnRehash(User* user) CXX11_OVERRIDE
+ void ReadConfig(ConfigStatus& status) CXX11_OVERRIDE
{
ConfigTag* host = ServerInstance->Config->ConfValue("host");
MySuffix = host->getString("suffix");
if (!newhost.empty())
{
user->WriteNotice("Setting your virtual host: " + newhost);
- if (!user->ChangeDisplayedHost(newhost.c_str()))
+ if (!user->ChangeDisplayedHost(newhost))
user->WriteNotice("Could not set your virtual host: " + newhost);
return;
}