Added /nick and /topic
This commit is contained in:
parent
ad4354adfc
commit
92c316e9ea
7 changed files with 65 additions and 2 deletions
|
@ -133,6 +133,16 @@ func handleWS(ws *websocket.Conn) {
|
|||
if irc, ok := session.getIRC(data.Server); ok {
|
||||
irc.Privmsg(data.To, data.Message)
|
||||
}
|
||||
|
||||
case "nick":
|
||||
var data Nick
|
||||
|
||||
json.Unmarshal(req.Request, &data)
|
||||
|
||||
if irc, ok := session.getIRC(data.Server); ok {
|
||||
irc.Nick(data.New)
|
||||
session.user.SetNick(data.New, data.Server)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue