X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_spy.cpp;h=4ded5374fdc2119fb2ff339c46cd196b5bec0a97;hb=f9636a2eff46f6829bf9e01c711ab1ba45a7d50a;hp=b835e2c666efe5901b3d79cfd70b920fc078ad56;hpb=fea1a27cb96a114f698eedcf90401b78406108fb;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_spy.cpp b/src/modules/m_spy.cpp index b835e2c66..4ded5374f 100644 --- a/src/modules/m_spy.cpp +++ b/src/modules/m_spy.cpp @@ -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);