Handle nick collisions by right-padding with _
This commit is contained in:
parent
50dc0ef64f
commit
961c0415a0
8 changed files with 51 additions and 27 deletions
|
@ -4,6 +4,8 @@ import (
|
|||
"sync"
|
||||
"time"
|
||||
|
||||
"fmt"
|
||||
|
||||
"github.com/khlieng/dispatch/irc"
|
||||
"github.com/khlieng/dispatch/storage"
|
||||
)
|
||||
|
@ -125,6 +127,13 @@ func (s *Session) sendError(err error, server string) {
|
|||
})
|
||||
}
|
||||
|
||||
func (s *Session) print(server string, a ...interface{}) {
|
||||
s.sendJSON("print", Chat{
|
||||
Server: server,
|
||||
Message: fmt.Sprintln(a...),
|
||||
})
|
||||
}
|
||||
|
||||
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