]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/cmd_privmsg.cpp
FindNick, FindChan, ChanModes, UserList, CountInvisible, PurgeEmptyChannels, GetClass...
[user/henk/code/inspircd.git] / src / cmd_privmsg.cpp
index 415b6ea399df7b79261618bd1a5ba74a501b7283..e72e1ef757ac6d606cc368cc492e57f7c546663d 100644 (file)
@@ -26,7 +26,6 @@
 #include "helperfuncs.h"
 #include "commands/cmd_privmsg.h"
 
-extern ServerConfig* Config;
 extern InspIRCd* ServerInstance;
 extern int MODCOUNT;
 extern ModuleList modules;
@@ -53,9 +52,9 @@ void cmd_privmsg::Handle (const char** parameters, int pcnt, userrec *user)
                parameters[1] = (char*)temp.c_str();
                // notice to server mask
                const char* servermask = parameters[0] + 1;
-               if (match(Config->ServerName,servermask))
+               if (match(ServerInstance->Config->ServerName,servermask))
                {
-                       ServerPrivmsgAll("%s",parameters[1]);
+                       ServerInstance->ServerPrivmsgAll("%s",parameters[1]);
                }
                FOREACH_MOD(I_OnUserMessage,OnUserMessage(user,(void*)parameters[0],TYPE_SERVER,parameters[1],0));
                return;
@@ -68,7 +67,7 @@ void cmd_privmsg::Handle (const char** parameters, int pcnt, userrec *user)
        }
        if (parameters[0][0] == '#')
        {
-               chan = FindChan(parameters[0]);
+               chan = ServerInstance->FindChan(parameters[0]);
                if (chan)
                {
                        if (IS_LOCAL(user))
@@ -110,7 +109,7 @@ void cmd_privmsg::Handle (const char** parameters, int pcnt, userrec *user)
                return;
        }
 
-       dest = Find(parameters[0]);
+       dest = ServerInstance->FindNick(parameters[0]);
        if (dest)
        {
                if ((IS_LOCAL(user)) && (*dest->awaymsg))