mirror of
https://github.com/m1k1o/neko.git
synced 2025-06-04 03:42:40 +02:00
lint fix.
This commit is contained in:
parent
1ff743c598
commit
9c014336ff
16 changed files with 76 additions and 46 deletions
|
@ -66,7 +66,10 @@ func (h *MessageHandler) adminControl(id string, session types.Session) error {
|
|||
|
||||
host, ok := h.sessions.GetHost()
|
||||
|
||||
h.sessions.SetHost(id)
|
||||
err := h.sessions.SetHost(id)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if ok {
|
||||
if err := h.sessions.Broadcast(
|
||||
|
@ -138,7 +141,10 @@ func (h *MessageHandler) adminGive(id string, session types.Session, payload *me
|
|||
}
|
||||
|
||||
// set host
|
||||
h.sessions.SetHost(payload.ID)
|
||||
err := h.sessions.SetHost(payload.ID)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// let everyone know
|
||||
if err := h.sessions.Broadcast(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue