diff options
author | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-11-15 18:26:53 +0000 |
---|---|---|
committer | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-11-15 18:26:53 +0000 |
commit | fb3964d5c007900061e86e392ceb786bd47260c0 (patch) | |
tree | 41ff940cce47b6d8ba9aef701205dd0ea6707c6f /src/modules | |
parent | 8ab1381e8d277152d99a72f33f3d1c0564060fee (diff) |
Add Inspircd::AddServices
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12135 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/m_check.cpp | 6 | ||||
-rw-r--r-- | src/modules/m_customtitle.cpp | 4 | ||||
-rw-r--r-- | src/modules/m_httpd_stats.cpp | 6 | ||||
-rw-r--r-- | src/modules/m_sasl.cpp | 5 | ||||
-rw-r--r-- | src/modules/m_spanningtree/main.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_spanningtree/netburst.cpp | 4 |
6 files changed, 13 insertions, 14 deletions
diff --git a/src/modules/m_check.cpp b/src/modules/m_check.cpp index 0a0ecab2b..a907b06e8 100644 --- a/src/modules/m_check.cpp +++ b/src/modules/m_check.cpp @@ -41,9 +41,9 @@ class CommandCheck : public Command ExtensionItem* item = i->first; std::string value = item->serialize(FORMAT_USER, ext, i->second); if (!value.empty()) - user->SendText(checkstr + " meta:" + item->key + " " + value); - else if (!item->key.empty()) - dumpkeys << " " << item->key; + user->SendText(checkstr + " meta:" + item->name + " " + value); + else if (!item->name.empty()) + dumpkeys << " " << item->name; } if (!dumpkeys.str().empty()) user->SendText(checkstr + " metadata", dumpkeys); diff --git a/src/modules/m_customtitle.cpp b/src/modules/m_customtitle.cpp index c89535a3c..8814e8cf6 100644 --- a/src/modules/m_customtitle.cpp +++ b/src/modules/m_customtitle.cpp @@ -53,14 +53,14 @@ class CommandTitle : public Command ConfigReader Conf; for (int i=0; i<Conf.Enumerate("title"); i++) { - std::string name = Conf.ReadValue("title", "name", "", i); + std::string Name = Conf.ReadValue("title", "name", "", i); std::string pass = Conf.ReadValue("title", "password", "", i); std::string hash = Conf.ReadValue("title", "hash", "", i); std::string host = Conf.ReadValue("title", "host", "*@*", i); std::string title = Conf.ReadValue("title", "title", "", i); std::string vhost = Conf.ReadValue("title", "vhost", "", i); - if (!strcmp(name.c_str(),parameters[0].c_str()) && !ServerInstance->PassCompare(user, pass.c_str(), parameters[1].c_str(), hash.c_str()) && OneOfMatches(TheHost,TheIP,host.c_str()) && !title.empty()) + if (!strcmp(Name.c_str(),parameters[0].c_str()) && !ServerInstance->PassCompare(user, pass.c_str(), parameters[1].c_str(), hash.c_str()) && OneOfMatches(TheHost,TheIP,host.c_str()) && !title.empty()) { ctitle.set(user, title); diff --git a/src/modules/m_httpd_stats.cpp b/src/modules/m_httpd_stats.cpp index 36deda11b..e34c4b43f 100644 --- a/src/modules/m_httpd_stats.cpp +++ b/src/modules/m_httpd_stats.cpp @@ -75,9 +75,9 @@ class ModuleHttpStats : public Module ExtensionItem* item = i->first; std::string value = item->serialize(FORMAT_USER, ext, i->second); if (!value.empty()) - data << "<meta name=\"" << item->key << "\">" << Sanitize(value) << "</meta>"; - else if (!item->key.empty()) - data << "<meta name=\"" << item->key << "\"/>"; + data << "<meta name=\"" << item->name << "\">" << Sanitize(value) << "</meta>"; + else if (!item->name.empty()) + data << "<meta name=\"" << item->name << "\"/>"; } data << "</metadata>"; } diff --git a/src/modules/m_sasl.cpp b/src/modules/m_sasl.cpp index add530ff1..298544edc 100644 --- a/src/modules/m_sasl.cpp +++ b/src/modules/m_sasl.cpp @@ -229,10 +229,9 @@ class ModuleSASL : public Module Implementation eventlist[] = { I_OnEvent, I_OnUserRegister }; ServerInstance->Modules->Attach(eventlist, this, 2); - ServerInstance->AddCommand(&auth); - ServerInstance->AddCommand(&sasl); + providerbase* providelist[] = { &auth, &sasl, &authExt }; + ServerInstance->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!"); } diff --git a/src/modules/m_spanningtree/main.cpp b/src/modules/m_spanningtree/main.cpp index 386c95dfc..fe2cfe9b6 100644 --- a/src/modules/m_spanningtree/main.cpp +++ b/src/modules/m_spanningtree/main.cpp @@ -615,7 +615,7 @@ void ModuleSpanningTree::OnUserConnect(LocalUser* user) ExtensionItem* item = i->first; std::string value = item->serialize(FORMAT_NETWORK, user, i->second); if (!value.empty()) - ServerInstance->PI->SendMetaData(user, item->key, value); + ServerInstance->PI->SendMetaData(user, item->name, value); } Utils->TreeRoot->SetUserCount(1); // increment by 1 diff --git a/src/modules/m_spanningtree/netburst.cpp b/src/modules/m_spanningtree/netburst.cpp index 52ce5897d..61a5f66d2 100644 --- a/src/modules/m_spanningtree/netburst.cpp +++ b/src/modules/m_spanningtree/netburst.cpp @@ -225,7 +225,7 @@ void TreeSocket::SendChannelModes(TreeServer* Current) ExtensionItem* item = i->first; std::string value = item->serialize(FORMAT_NETWORK, c->second, i->second); if (!value.empty()) - Utils->Creator->ProtoSendMetaData(this, c->second, item->key, value); + Utils->Creator->ProtoSendMetaData(this, c->second, item->name, value); } FOREACH_MOD(I_OnSyncChannel,OnSyncChannel(c->second,Utils->Creator,this)); @@ -274,7 +274,7 @@ void TreeSocket::SendUsers(TreeServer* Current) ExtensionItem* item = i->first; std::string value = item->serialize(FORMAT_NETWORK, u->second, i->second); if (!value.empty()) - Utils->Creator->ProtoSendMetaData(this, u->second, item->key, value); + Utils->Creator->ProtoSendMetaData(this, u->second, item->name, value); } FOREACH_MOD(I_OnSyncUser,OnSyncUser(u->second,Utils->Creator,this)); |