Forward irc errors to the client, improve command validation and feedback, handle topic changes
This commit is contained in:
parent
993d29242e
commit
aa59e71745
17 changed files with 328 additions and 96 deletions
|
@ -162,13 +162,19 @@ func (s *Session) sendMessages(server, channel string, count int, fromID string)
|
|||
}
|
||||
}
|
||||
|
||||
func (s *Session) print(server string, a ...interface{}) {
|
||||
func (s *Session) print(a ...interface{}) {
|
||||
s.sendJSON("print", Message{
|
||||
Server: server,
|
||||
Content: fmt.Sprintln(a...),
|
||||
})
|
||||
}
|
||||
|
||||
func (s *Session) printError(a ...interface{}) {
|
||||
s.sendJSON("print", Message{
|
||||
Content: fmt.Sprintln(a...),
|
||||
Type: "error",
|
||||
})
|
||||
}
|
||||
|
||||
func (s *Session) resetExpirationIfEmpty() {
|
||||
if s.numIRC() == 0 && s.numWS() == 0 {
|
||||
s.reset <- AnonymousSessionExpiration
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue