+bool whomatch(userrec* user, const char* matchtext, bool opt_realname, bool opt_showrealhost)
+{
+ bool realhost = false;
+ bool realname = false;
+
+ if (user->registered != REG_ALL)
+ return false;
+
+ if (opt_realname)
+ realname = match(user->fullname, matchtext);
+
+ if (opt_showrealhost)
+ realhost = match(user->host, matchtext);
+
+ return ((realname) || (realhost) || (match(user->dhost, matchtext)) || (match(user->nick, matchtext)) || (match(user->server, matchtext)));
+}
+
+
+
+extern "C" command_t* init_command(InspIRCd* Instance)
+{
+ return new cmd_who(Instance);
+}
+
+CmdResult cmd_who::Handle (const char** parameters, int pcnt, userrec *user)