- return ((port) || (away) || (ident) || (metadata) || (realname) || (realhost) || (match(user->dhost, matchtext)) || (match(user->nick, matchtext)) || (match(user->server, matchtext)));
+ else if (opt_away)
+ match = InspIRCd::Match(user->awaymsg, matchtext);
+ else if (opt_time)
+ {
+ long seconds = ServerInstance->Duration(matchtext);
+
+ // Okay, so time matching, we want all users connected `seconds' ago
+ if (user->age >= ServerInstance->Time() - seconds)
+ match = true;
+ }
+
+ /*
+ * Once the conditionals have been checked, only check dhost/nick/server
+ * if they didn't match this user -- and only match if we don't find a match.
+ *
+ * This should make things minutely faster, and again, less ugly.
+ * -- w00t
+ */
+ if (!match)
+ match = InspIRCd::Match(user->dhost, matchtext);
+
+ if (!match)
+ match = InspIRCd::Match(user->nick, matchtext);
+
+ if (!match)
+ match = InspIRCd::Match(user->server, matchtext);
+
+ return match;