Store WHO list in RPL_ENDOFWHO
This allows the state-tracker to figure out whether a WHO query returned no result.
This commit is contained in:
7
state.js
7
state.js
@@ -384,14 +384,9 @@ export const State = {
|
||||
return updateUser(who.nick, who);
|
||||
case irc.RPL_ENDOFWHO:
|
||||
target = msg.params[1];
|
||||
if (!client.isChannel(target) && target.indexOf("*") < 0) {
|
||||
if (msg.list.length == 0 && !client.isChannel(target) && target.indexOf("*") < 0) {
|
||||
// Not a channel nor a mask, likely a nick
|
||||
return updateUser(target, (user) => {
|
||||
// TODO: mark user offline if we have old WHO info but this
|
||||
// WHO reply is empty
|
||||
if (user) {
|
||||
return;
|
||||
}
|
||||
return { offline: true };
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user