]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/cmd_privmsg.cpp
Fix to new API
[user/henk/code/inspircd.git] / src / cmd_privmsg.cpp
index 8a2175ecc67e59b68ba9f612fcdce6f9dab2c27b..9255b67e3179507a02424dbf2e452832c682c391 100644 (file)
@@ -67,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))
@@ -77,7 +77,7 @@ void cmd_privmsg::Handle (const char** parameters, int pcnt, userrec *user)
                                        user->WriteServ("404 %s %s :Cannot send to channel (no external messages)", user->nick, chan->name);
                                        return;
                                }
-                               if ((chan->modes[CM_MODERATED]) && (cstatus(user,chan)<STATUS_VOICE))
+                               if ((chan->modes[CM_MODERATED]) && (chan->GetStatus(user) < STATUS_VOICE))
                                {
                                        user->WriteServ("404 %s %s :Cannot send to channel (+m)", user->nick, chan->name);
                                        return;
@@ -109,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))