]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/cmd_invite.cpp
Move all_opers into class InspIRCd
[user/henk/code/inspircd.git] / src / cmd_invite.cpp
index 0255c23dd4659f6021d5ed16bb4f44c2a2f4ebb3..f418fda5da6169719c5c2974ffe4c2637c720172 100644 (file)
 #include "modules.h"
 #include "commands.h"
 #include "helperfuncs.h"
-#include "message.h"
 #include "commands/cmd_invite.h"
 
 extern InspIRCd* ServerInstance;
-extern int MODCOUNT;
-extern std::vector<Module*> modules;
-extern std::vector<ircd_module*> factory;
 
 void cmd_invite::Handle (const char** parameters, int pcnt, userrec *user)
 {
@@ -34,8 +30,8 @@ void cmd_invite::Handle (const char** parameters, int pcnt, userrec *user)
 
        if (pcnt == 2)
        {
-               userrec* u = Find(parameters[0]);
-               chanrec* c = FindChan(parameters[1]);
+               userrec* u = ServerInstance->FindNick(parameters[0]);
+               chanrec* c = ServerInstance->FindChan(parameters[1]);
 
                if ((!c) || (!u))
                {
@@ -53,7 +49,7 @@ void cmd_invite::Handle (const char** parameters, int pcnt, userrec *user)
 
                if ((c->modes[CM_INVITEONLY]) && (IS_LOCAL(user)))
                {
-                       if (cstatus(user,c) < STATUS_HOP)
+                       if (c->GetStatus(user) < STATUS_HOP)
                        {
                                user->WriteServ("482 %s %s :You must be at least a half-operator to change modes on this channel",user->nick, c->name);
                                return;