]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules.cpp
Aaaand, fix the typo
[user/henk/code/inspircd.git] / src / modules.cpp
index 2c72943ec9cbf078b5798a07adc31ba928721873..1e92e2bda99488d33dfd42cd1505704229bbca33 100644 (file)
@@ -292,6 +292,19 @@ Module* Server::FindFeature(const std::string &FeatureName)
        return iter->second;
 }
 
+const std::string& Server::GetModuleName(Module* m)
+{
+       static std::string nothing = ""; /* Prevent compiler warning */
+       for (int i = 0; i <= MODCOUNT; i++)
+       {
+               if (modules[i] == m)
+               {
+                       return Config->module_names[i];
+               }
+       }
+       return nothing; /* As above */
+}
+
 void Server::RehashServer()
 {
        WriteOpers("*** Rehashing config file");
@@ -583,6 +596,16 @@ bool Server::AddMode(ModeHandler* mh, const unsigned char mode)
        return ServerInstance->ModeGrok->AddMode(mh,mode);
 }
 
+bool Server::AddModeWatcher(ModeWatcher* mw)
+{
+       return ServerInstance->ModeGrok->AddModeWatcher(mw);
+}
+
+bool Server::DelModeWatcher(ModeWatcher* mw)
+{
+       return ServerInstance->ModeGrok->DelModeWatcher(mw);
+}
+
 int Server::CountUsers(chanrec* c)
 {
        return usercount(c);