]> 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 d6119bd5bb2dd4b10fb3507d8094b80c97cb448e..1e92e2bda99488d33dfd42cd1505704229bbca33 100644 (file)
@@ -292,16 +292,17 @@ Module* Server::FindFeature(const std::string &FeatureName)
        return iter->second;
 }
 
-const char* Server::GetModuleName(Module* m)
+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 module_names[i];
+                       return Config->module_names[i];
                }
        }
-       return "";
+       return nothing; /* As above */
 }
 
 void Server::RehashServer()
@@ -595,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);