diff options
author | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-08-25 15:43:46 +0000 |
---|---|---|
committer | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-08-25 15:43:46 +0000 |
commit | 56f500b2c916d8801daaa631cd9215263bb3de23 (patch) | |
tree | 33b050055e621338bde398ea74f841d91e9f547d /src/commands/cmd_who.cpp | |
parent | fc7576e098618cb2b2ee4e10a076e848559bb4bf (diff) |
Implement /who 1d t (search for who matches for users connected for a given time)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10278 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/commands/cmd_who.cpp')
-rw-r--r-- | src/commands/cmd_who.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/commands/cmd_who.cpp b/src/commands/cmd_who.cpp index 561981df1..1ce4e4c28 100644 --- a/src/commands/cmd_who.cpp +++ b/src/commands/cmd_who.cpp @@ -89,7 +89,14 @@ bool CommandWho::whomatch(User* user, const char* matchtext) } else if (opt_away) match = InspIRCd::Match(user->awaymsg, matchtext, lowermap); + 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 |