]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_check.cpp
Fix iteration of ServerInstance->Users->local_users now that QuitUser can modify...
[user/henk/code/inspircd.git] / src / modules / m_check.cpp
index 33f950b4c21ed3a266d199108f1e9396c68d3421..a84bd4dc686193d326b430c2869b3f435fec904e 100644 (file)
@@ -20,9 +20,9 @@
 class CommandCheck : public Command
 {
  public:
-       CommandCheck (InspIRCd* Instance, Module* parent) : Command(Instance,parent,"CHECK", "o", 1)
+       CommandCheck(Module* parent) : Command(parent,"CHECK", 1)
        {
-               syntax = "<nickname>|<ip>|<hostmask>|<channel> <server>";
+               flags_needed = 'o'; syntax = "<nickname>|<ip>|<hostmask>|<channel> <server>";
        }
 
        std::string timestring(time_t time)
@@ -41,7 +41,7 @@ class CommandCheck : public Command
                        ExtensionItem* item = Extensible::GetItem(i->first);
                        std::string value;
                        if (item)
-                               value = item->serialize(creator, ext, i->second);
+                               value = item->serialize(FORMAT_USER, ext, i->second);
                        if (value.empty())
                                dumpkeys << " " << i->first;
                        else
@@ -198,7 +198,7 @@ class ModuleCheck : public Module
  private:
        CommandCheck mycommand;
  public:
-       ModuleCheck(InspIRCd* Me) : Module(Me), mycommand(Me, this)
+       ModuleCheck(InspIRCd* Me) : Module(Me), mycommand(this)
        {
                ServerInstance->AddCommand(&mycommand);
        }
@@ -211,17 +211,6 @@ class ModuleCheck : public Module
        {
                return Version("CHECK command, view user/channel details", VF_VENDOR|VF_OPTCOMMON);
        }
-
-       std::string ProtoTranslate(Extensible* item)
-       {
-               User* u = dynamic_cast<User*>(item);
-               Channel* c = dynamic_cast<Channel*>(item);
-               if (u)
-                       return u->nick;
-               if (c)
-                       return c->name;
-               return "?";
-       }
 };
 
 MODULE_INIT(ModuleCheck)