]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/commands/cmd_who.cpp
Fix <options:noservices> causing +o (and +q!) not being correctly given on channel...
[user/henk/code/inspircd.git] / src / commands / cmd_who.cpp
index 561981df17124b94addaeaa57a1b5f77d22bcdd4..403ec5f64668cc7ef09bb8ee2c9ee2fa507a0c98 100644 (file)
@@ -71,11 +71,11 @@ bool CommandWho::whomatch(User* user, const char* matchtext)
                if (opt_metadata)
                        match = user->GetExt(matchtext, dummy);
                else if (opt_realname)
-                       match = InspIRCd::Match(user->fullname, matchtext, lowermap);
+                       match = InspIRCd::Match(user->fullname, matchtext);
                else if (opt_showrealhost)
-                       match = InspIRCd::Match(user->host, matchtext, lowermap);
+                       match = InspIRCd::Match(user->host, matchtext);
                else if (opt_ident)
-                       match = InspIRCd::Match(user->ident, matchtext, lowermap);
+                       match = InspIRCd::Match(user->ident, matchtext);
                else if (opt_port)
                {
                        irc::portparser portrange(matchtext, false);
@@ -88,8 +88,15 @@ bool CommandWho::whomatch(User* user, const char* matchtext)
                                }
                }
                else if (opt_away)
-                       match = InspIRCd::Match(user->awaymsg, matchtext, lowermap);
+                       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
@@ -99,13 +106,13 @@ bool CommandWho::whomatch(User* user, const char* matchtext)
                 * -- w00t
                 */
                if (!match)
-                       match = InspIRCd::Match(user->dhost, matchtext, lowermap);
+                       match = InspIRCd::Match(user->dhost, matchtext);
 
                if (!match)
-                       match = InspIRCd::Match(user->nick, matchtext, lowermap);
+                       match = InspIRCd::Match(user->nick, matchtext);
 
                if (!match)
-                       match = InspIRCd::Match(user->server, matchtext, lowermap);
+                       match = InspIRCd::Match(user->server, matchtext);
 
                return match;
        }