Switch to redux and webpack

This commit is contained in:
Ken-Håvard Lieng 2015-12-29 00:34:32 +01:00
parent b247287075
commit e389454535
97 changed files with 2722 additions and 2656 deletions

View file

@ -49,9 +49,10 @@ func (i *ircHandler) dispatchMessage(msg *irc.Message) {
func (i *ircHandler) nick(msg *irc.Message) {
i.session.sendJSON("nick", Nick{
Server: i.client.Host,
Old: msg.Nick,
New: msg.Trailing,
Server: i.client.Host,
Old: msg.Nick,
New: msg.Trailing,
Channels: channelStore.FindUserChannels(msg.Nick, i.client.Host),
})
channelStore.RenameUser(msg.Nick, msg.Trailing, i.client.Host)
@ -126,9 +127,10 @@ func (i *ircHandler) message(msg *irc.Message) {
func (i *ircHandler) quit(msg *irc.Message) {
i.session.sendJSON("quit", Quit{
Server: i.client.Host,
User: msg.Nick,
Reason: msg.Trailing,
Server: i.client.Host,
User: msg.Nick,
Reason: msg.Trailing,
Channels: channelStore.FindUserChannels(msg.Nick, i.client.Host),
})
channelStore.RemoveUserAll(msg.Nick, i.client.Host)

View file

@ -27,9 +27,10 @@ type Connect struct {
}
type Nick struct {
Server string `json:"server"`
Old string `json:"old"`
New string `json:"new"`
Server string `json:"server"`
Old string `json:"old"`
New string `json:"new"`
Channels []string `json:"channels"`
}
type Join struct {
@ -52,9 +53,10 @@ type Mode struct {
}
type Quit struct {
Server string `json:"server"`
User string `json:"user"`
Reason string `json:"reason,omitempty"`
Server string `json:"server"`
User string `json:"user"`
Reason string `json:"reason,omitempty"`
Channels []string `json:"channels"`
}
type Chat struct {