]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_spy.cpp
So much stuff changed in this one, i forgot most of it.
[user/henk/code/inspircd.git] / src / modules / m_spy.cpp
index b835e2c666efe5901b3d79cfd70b920fc078ad56..4ded5374fdc2119fb2ff339c46cd196b5bec0a97 100644 (file)
@@ -38,7 +38,6 @@ using namespace std;
 #include "inspircd.h"
 #include "inspstring.h"
 #include "hashcomp.h"
-#include "message.h"
 #include "xline.h"
 #include "typedefs.h"
 #include "cull_list.h"
@@ -48,7 +47,6 @@ using namespace std;
 
 static Server *Srv;
 
-extern ServerConfig* Config;
 extern InspIRCd* ServerInstance;
 extern chan_hash chanlist;
 
@@ -64,7 +62,7 @@ void spy_userlist(userrec *user,chanrec *c)
        CUList *ulist= c->GetUsers();
        for (CUList::iterator i = ulist->begin(); i != ulist->end(); i++)
        {
-               strlcat(list,cmode(i->second,c),MAXBUF);
+               strlcat(list,c->GetStatusChar(i->second),MAXBUF);
                strlcat(list,i->second->nick,MAXBUF);
                strlcat(list," ",MAXBUF);
                if (strlen(list)>(480-NICKMAX))
@@ -95,11 +93,11 @@ class cmd_spylist : public command_t
 
        void Handle (const char** parameters, int pcnt, userrec *user)
        {
-               WriteOpers("*** Oper %s used SPYLIST to list +s/+p channels and keys.",user->nick);
+               ServerInstance->WriteOpers("*** Oper %s used SPYLIST to list +s/+p channels and keys.",user->nick);
                user->WriteServ("321 %s Channel :Users Name",user->nick);
                for (chan_hash::const_iterator i = chanlist.begin(); i != chanlist.end(); i++)
                {
-                       user->WriteServ("322 %s %s %d :[+%s] %s",user->nick,i->second->name,usercount(i->second),chanmodes(i->second,true),i->second->topic);
+                       user->WriteServ("322 %s %s %d :[+%s] %s",user->nick,i->second->name,i->second->GetUserCounter(),i->second->ChanModes(true),i->second->topic);
                }
                user->WriteServ("323 %s :End of channel list.",user->nick);
        }
@@ -127,9 +125,9 @@ class cmd_spynames : public command_t
                if (ServerInstance->Parser->LoopCall(user, this, parameters, pcnt, 1))
                        return;
 
-               WriteOpers("*** Oper %s used SPYNAMES to view the users on %s",user->nick,parameters[0]);
+               ServerInstance->WriteOpers("*** Oper %s used SPYNAMES to view the users on %s",user->nick,parameters[0]);
 
-               c = FindChan(parameters[0]);
+               c = ServerInstance->FindChan(parameters[0]);
                if (c)
                {
                        spy_userlist(user,c);