X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_check.cpp;h=ba6f65673df971f5d9884867a3059ae1e6b47365;hb=02c6ce1ad09a7471a6b03dc00bac4b843d157489;hp=5304347c2d0375eb160fcace2bd8584adcb6f204;hpb=5b12684030f3f76116e2ed58b906ccf4c8a9c378;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_check.cpp b/src/modules/m_check.cpp index 5304347c2..ba6f65673 100644 --- a/src/modules/m_check.cpp +++ b/src/modules/m_check.cpp @@ -11,10 +11,10 @@ * --------------------------------------------------- */ +#include "inspircd.h" #include "users.h" #include "channels.h" #include "modules.h" -#include "inspircd.h" #include "wildcard.h" /* $ModDesc: Provides the /check command to retrieve information on a user, channel, or IP address */ @@ -64,16 +64,19 @@ class cmd_check : public command_t user->WriteServ(checkstr + " modes +" + targuser->FormatModes()); user->WriteServ(checkstr + " snomasks +" + targuser->FormatNoticeMasks()); user->WriteServ(checkstr + " server " + targuser->server); - if (targuser->awaymsg[0] != 0) + + if (IS_AWAY(targuser)) { /* user is away */ user->WriteServ(checkstr + " awaymsg " + targuser->awaymsg); } - if (targuser->oper[0] != 0) + + if (IS_OPER(targuser)) { /* user is an oper of type ____ */ user->WriteServ(checkstr + " opertype " + irc::Spacify(targuser->oper)); } + if (IS_LOCAL(targuser)) { /* port information is only held for a local user! */ @@ -119,7 +122,7 @@ class cmd_check : public command_t /* * Unlike Asuka, I define a clone as coming from the same host. --w00t */ - snprintf(tmpbuf, MAXBUF, "%lu %s%s (%s@%s) %s ", i->second->GlobalCloneCount(), targchan->GetAllPrefixChars(i->second), i->second->nick, i->second->ident, i->second->dhost, i->second->fullname); + snprintf(tmpbuf, MAXBUF, "%lu %s%s (%s@%s) %s ", i->first->GlobalCloneCount(), targchan->GetAllPrefixChars(i->first), i->first->nick, i->first->ident, i->first->dhost, i->first->fullname); user->WriteServ(checkstr + " member " + tmpbuf); } } @@ -159,7 +162,7 @@ class ModuleCheck : public Module private: cmd_check *mycommand; public: - ModuleCheck(InspIRCd* Me) : Module::Module(Me) + ModuleCheck(InspIRCd* Me) : Module(Me) { mycommand = new cmd_check(ServerInstance); @@ -202,7 +205,7 @@ class ModuleCheckFactory : public ModuleFactory }; -extern "C" void * init_module( void ) +extern "C" DllExport void * init_module( void ) { return new ModuleCheckFactory; }