X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_spy.cpp;h=17998b9643a87ac3047c3356c690c1cc0498e407;hb=cd7657bddc7a6dc2e7326077d173a874bf71f6bd;hp=4ef628436a85cc1e5f6ecfd5af8b2b59cc642804;hpb=3a554ef1e9be9dbcf3de3301a4a6c2938d643bea;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_spy.cpp b/src/modules/m_spy.cpp index 4ef628436..17998b964 100644 --- a/src/modules/m_spy.cpp +++ b/src/modules/m_spy.cpp @@ -18,11 +18,10 @@ /* $ModDesc: Provides SPYLIST and SPYNAMES capability, allowing opers to see who's in +s channels */ -#include "inspircd_config.h" +#include "inspircd.h" #include "users.h" #include "channels.h" #include "modules.h" -#include "inspircd.h" #include "wildcard.h" void spy_userlist(userrec *user, chanrec *c) @@ -39,7 +38,7 @@ void spy_userlist(userrec *user, chanrec *c) for (CUList::iterator i = ulist->begin(); i != ulist->end(); i++) { - size_t ptrlen = snprintf(ptr, MAXBUF, "%s%s ", c->GetPrefixChar(i->second), i->second->nick); + size_t ptrlen = snprintf(ptr, MAXBUF, "%s%s ", c->GetPrefixChar(i->first), i->first->nick); curlen += ptrlen; ptr += ptrlen; @@ -85,7 +84,7 @@ class cmd_spylist : public command_t { 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 = ServerInstance->chanlist.begin(); i != ServerInstance->chanlist.end(); i++) + for (chan_hash::const_iterator i = ServerInstance->chanlist->begin(); i != ServerInstance->chanlist->end(); i++) { if (pcnt && !match(i->second->name, parameters[0])) continue; @@ -127,7 +126,6 @@ class cmd_spynames : public command_t { ServerInstance->WriteOpers("*** Oper %s used SPYNAMES to view the users on %s", user->nick, parameters[0]); spy_userlist(user,c); - user->WriteServ("366 %s %s :End of /NAMES list.", user->nick, c->name); } else { @@ -143,7 +141,7 @@ class ModuleSpy : public Module cmd_spylist *mycommand; cmd_spynames *mycommand2; public: - ModuleSpy(InspIRCd* Me) : Module::Module(Me) + ModuleSpy(InspIRCd* Me) : Module(Me) { mycommand = new cmd_spylist(ServerInstance); @@ -182,7 +180,7 @@ class ModuleSpyFactory : public ModuleFactory }; -extern "C" void * init_module( void ) +extern "C" DllExport void * init_module( void ) { return new ModuleSpyFactory; }