Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
342e2eef93 | ||
|
|
b8b076450e | ||
|
|
3bb7cad554 | ||
|
|
44ec540db3 |
@@ -1,6 +1,12 @@
|
|||||||
package button
|
package button
|
||||||
|
|
||||||
|
import "fmt"
|
||||||
|
|
||||||
type Button struct {
|
type Button struct {
|
||||||
Char byte
|
Char byte
|
||||||
Down bool
|
Down bool
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (button Button) String() string {
|
||||||
|
return fmt.Sprintf("%c:%v", button.Char, button.Down)
|
||||||
|
}
|
||||||
|
|||||||
@@ -84,8 +84,12 @@ func (v01 *V01) getUserFeedback(w http.ResponseWriter, r *http.Request) {
|
|||||||
msg = v01.cfg.Broadcast.Message
|
msg = v01.cfg.Broadcast.Message
|
||||||
}
|
}
|
||||||
|
|
||||||
if user.State.GM.Alias != "" {
|
alias := user.State.GM.Alias
|
||||||
msg = fmt.Sprintf("%s (Your secret word is '%s'. Make **someone else** say it!)", msg, user.State.GM.Alias)
|
if alias == "" {
|
||||||
|
alias = user.State.GM.LastAlias
|
||||||
|
}
|
||||||
|
if alias != "" {
|
||||||
|
msg = fmt.Sprintf("%s (Your secret word is '%s'. Make **someone else** say it!)", msg, alias)
|
||||||
}
|
}
|
||||||
|
|
||||||
w.Write([]byte(msg))
|
w.Write([]byte(msg))
|
||||||
|
|||||||
@@ -50,6 +50,9 @@ func Main(ctx context.Context) error {
|
|||||||
keys = append(keys, k)
|
keys = append(keys, k)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if os.Getenv("DEBUG") == "true" {
|
||||||
|
log.Printf("src.Main.writer.Press(%+v) (from %+v)", keys, delta)
|
||||||
|
}
|
||||||
writer.Press(keys...)
|
writer.Press(keys...)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user