Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #721 from thelounge/astorije/whois-idle
Add human-readable idle time in whois info
- Loading branch information
Showing
4 changed files
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
"use strict"; | ||
|
||
exports.commands = ["whois"]; | ||
|
||
exports.input = function(network, chan, cmd, args) { | ||
if (args.length === 1) { | ||
// This queries server of the other user and not of the current user, which | ||
// does not know idle time. | ||
// See http://superuser.com/a/272069/208074. | ||
network.irc.raw("WHOIS", args[0], args[0]); | ||
} else { | ||
// Re-assembling the command parsed in client.js | ||
network.irc.raw(`${cmd} ${args.join(" ")}`); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters