gosora/no_websockets.go
Azareal 91f70d2a4a Add a per-user theme switcher. The CSS might be slightly broken in the themes, that'll be fixed in a follow-up commit.
Added basic support for server sync.

Re-added a few missing defers.
Renamed TO-DO to TODO across the entire codebase.
Renamed StaticForumStore to MemoryForumStore.
The ForumStore is now built on a sync.Map with a view slice for generating /forums rather than a slice.
Renamed many more functions and variables to satisfy the linter.
increase_post_user_stats() and decrease_post_user_stats() are now methods on the User struct. We also fix a bug where they take the moderator's score rather than the target user's into account when recalculating their level after a post / topic is deleted.
Transitioned the topic list to CSS Grid for Tempra Simple, with a float fallback.
Cosmo and Cosmo Conflux are now hidden from the theme list.
Fixed more data races.
Added more debug data to the template compiler logs.
2017-09-10 17:57:22 +01:00

40 lines
733 B
Go

// +build no_ws
package main
import "errors"
import "net/http"
var wsHub WS_Hub
var errWsNouser = errors.New("This user isn't connected via WebSockets")
type WS_Hub struct {
}
func (_ *WS_Hub) guestCount() int {
return 0
}
func (_ *WS_Hub) userCount() int {
return 0
}
func (hub *WS_Hub) broadcastMessage(_ string) error {
return nil
}
func (hub *WS_Hub) pushMessage(_ int, _ string) error {
return errWsNouser
}
func (hub *WS_Hub) pushAlert(_ int, _ int, _ string, _ string, _ int, _ int, _ int) error {
return errWsNouser
}
func (hub *WS_Hub) pushAlerts(_ []int, _ int, _ string, _ string, _ int, _ int, _ int) error {
return errWsNouser
}
func route_websockets(_ http.ResponseWriter, _ *http.Request, _ User) {
}