summaryrefslogtreecommitdiffstats
path: root/wat/game.go
diff options
context:
space:
mode:
authorGeorg Pfuetzenreuter2024-10-02 22:30:06 +0200
committerGeorg Pfuetzenreuter2024-10-02 22:30:06 +0200
commitaccf16c92aa8420dd12d414ab05c60358cbc23ba (patch)
treeb41954a839ea64893a00ba457a0e0c1e02e0cfdb /wat/game.go
parent394d6ca2fa34f924b1790ad66da42cf374829315 (diff)
downloadwatbot-accf16c92aa8420dd12d414ab05c60358cbc23ba.tar.gz
watbot-accf16c92aa8420dd12d414ab05c60358cbc23ba.tar.bz2
watbot-accf16c92aa8420dd12d414ab05c60358cbc23ba.zip
Change host lookup to be optional
Some parts of the logic do not make use of the host column in the players table, allow the field to be empty and do not query for an empty value (which might return bogus entries) if no value is passed to the lookup function. This additionally avoids the need for the hardcoded initial host when configuring the bot player. Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
Diffstat (limited to 'wat/game.go')
-rw-r--r--wat/game.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/wat/game.go b/wat/game.go
index 40aa6f3..8de6991 100644
--- a/wat/game.go
+++ b/wat/game.go
@@ -28,7 +28,7 @@ var unconscious = "wat, your hands fumble and fail you. try resting, weakling."
func NewWatGame(bot *WatBot, db *WatDb) *WatGame {
g := WatGame{bot, db, Player{}, nil, nil, nil, nil, map[string]int{}}
- g.me = g.db.User(bot.Nick, "amia8t89xfp8y.liberta.casa", true)
+ g.me = g.db.User(bot.Nick, "", true)
g.commands = map[string](func(*Player, []string) string){
//"wat": g.megaWat,
"steroid": g.Steroid,