Dont send empty whois results to the client
This commit is contained in:
parent
0689c74101
commit
a084e6d0af
File diff suppressed because one or more lines are too long
@ -87,18 +87,16 @@ export default function handleSocket({ socket, store: { dispatch, getState } })
|
|||||||
},
|
},
|
||||||
|
|
||||||
whois(data) {
|
whois(data) {
|
||||||
if (data.nick) {
|
const tab = getState().tab.selected;
|
||||||
const tab = getState().tab.selected;
|
|
||||||
|
|
||||||
dispatch(print([
|
dispatch(print([
|
||||||
`Nick: ${data.nick}`,
|
`Nick: ${data.nick}`,
|
||||||
`Username: ${data.username}`,
|
`Username: ${data.username}`,
|
||||||
`Realname: ${data.realname}`,
|
`Realname: ${data.realname}`,
|
||||||
`Host: ${data.host}`,
|
`Host: ${data.host}`,
|
||||||
`Server: ${data.server}`,
|
`Server: ${data.server}`,
|
||||||
`Channels: ${data.channels}`
|
`Channels: ${data.channels}`
|
||||||
], tab.server, tab.name));
|
], tab.server, tab.name));
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
print(message) {
|
print(message) {
|
||||||
|
@ -201,7 +201,9 @@ func (i *ircHandler) whoisChannels(msg *irc.Message) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (i *ircHandler) whoisEnd(msg *irc.Message) {
|
func (i *ircHandler) whoisEnd(msg *irc.Message) {
|
||||||
i.session.sendJSON("whois", i.whois)
|
if i.whois.Nick != "" {
|
||||||
|
i.session.sendJSON("whois", i.whois)
|
||||||
|
}
|
||||||
i.whois = WhoisReply{}
|
i.whois = WhoisReply{}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user