- if (!dumpkeys.str().empty())
- user->SendText(checkstr + " metadata", dumpkeys);
+ };
+};
+
+/** Handle /CHECK
+ */
+class CommandCheck : public Command
+{
+ UserModeReference snomaskmode;
+
+ std::string GetSnomasks(User* user)
+ {
+ std::string ret;
+ if (snomaskmode)
+ ret = snomaskmode->GetUserParameter(user);
+
+ if (ret.empty())
+ ret = "+";
+ return ret;
+ }
+
+ public:
+ CommandCheck(Module* parent)
+ : Command(parent,"CHECK", 1)
+ , snomaskmode(parent, "snomask")
+ {
+ flags_needed = 'o'; syntax = "<nickname>|<ip>|<hostmask>|<channel> <server>";
+ }
+
+ std::string timestring(time_t time)
+ {
+ char timebuf[60];
+ struct tm *mytime = gmtime(&time);
+ strftime(timebuf, 59, "%Y-%m-%d %H:%M:%S UTC (", mytime);
+ std::string ret(timebuf);
+ ret.append(ConvToStr(time)).push_back(')');
+ return ret;