]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/helperfuncs.cpp
Adding hook type checking to event calls to speed them up
[user/henk/code/inspircd.git] / src / helperfuncs.cpp
index 037a7a3af9d01aeae99347675ae230d7a7cce3f1..71840a22a19542e89005bf857aff88f95d72cb4e 100644 (file)
@@ -366,7 +366,7 @@ void ChanExceptSender(chanrec* Ptr, userrec* user, char* text, ...)
 std::string GetServerDescription(char* servername)
 {
        std::string description = "";
-       FOREACH_MOD OnGetServerDescription(servername,description);
+       FOREACH_MOD(I_OnGetServerDescription,OnGetServerDescription(servername,description));
        if (description != "")
        {
                return description;
@@ -922,9 +922,9 @@ char* Passwd(userrec *user)
 {
         for (ClassVector::iterator i = Config->Classes.begin(); i != Config->Classes.end(); i++)
         {
-                if ((i->type == CC_ALLOW) && match(user->host,i->host))
+                if ((i->type == CC_ALLOW) && match(user->host,i->host.c_str()))
                 {
-                        return i->pass;
+                        return (char*)i->pass.c_str();
                 }
         }
         return "";
@@ -934,7 +934,7 @@ bool IsDenied(userrec *user)
 {
         for (ClassVector::iterator i = Config->Classes.begin(); i != Config->Classes.end(); i++)
         {
-                if ((i->type == CC_DENY) && match(user->host,i->host))
+                if ((i->type == CC_DENY) && match(user->host,i->host.c_str()))
                 {
                         return true;
                 }