* | 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
/**
* Tracks SASL authentication state like charybdis does. --nenolod
*/
-class SaslAuthenticator : public classbase
+class SaslAuthenticator
{
private:
InspIRCd *ServerInstance;
ModuleSASL()
: authExt("sasl_auth", this), cap(this, "sasl"), auth(this, authExt, cap), sasl(this, authExt)
{
- Implementation eventlist[] = { I_OnEvent, I_OnUserRegister, I_OnPostConnect, I_OnUserDisconnect };
- ServerInstance->Modules->Attach(eventlist, this, 4);
+ Implementation eventlist[] = { I_OnEvent, I_OnUserRegister };
+ ServerInstance->Modules->Attach(eventlist, this, 2);
- ServerInstance->AddCommand(&auth);
- ServerInstance->AddCommand(&sasl);
+ ServiceProvider* providelist[] = { &auth, &sasl, &authExt };
+ ServerInstance->Modules->AddServices(providelist, 3);
- ServerInstance->Extensions.Register(&authExt);
if (!ServerInstance->Modules->Find("m_services_account.so") || !ServerInstance->Modules->Find("m_cap.so"))
ServerInstance->Logs->Log("m_sasl", DEFAULT, "WARNING: m_services_account.so and m_cap.so are not loaded! m_sasl.so will NOT function correctly until these two modules are loaded!");
}
- ModResult OnUserRegister(User *user)
+ ModResult OnUserRegister(LocalUser *user)
{
SaslAuthenticator *sasl_ = authExt.get(user);
if (sasl_)