From 15b3ad07fad9c553cd1bb96e9f6cb64d5a47f4ee Mon Sep 17 00:00:00 2001 From: Azareal Date: Mon, 24 Sep 2018 09:42:17 +1000 Subject: [PATCH] Try to eliminate some of these debug comments. --- common/parser.go | 1 - common/theme_list.go | 5 ----- common/ws_hub.go | 4 ---- common/ws_user.go | 4 ++++ routes/panel/settings.go | 3 +-- 5 files changed, 5 insertions(+), 12 deletions(-) diff --git a/common/parser.go b/common/parser.go index f38fd85b..491a6384 100644 --- a/common/parser.go +++ b/common/parser.go @@ -360,7 +360,6 @@ func PreparseMessage(msg string) string { continue } - //fmt.Printf("username: %+v\n", username) user, err := Users.GetByName(username) if err != nil { if err != ErrNoRows { diff --git a/common/theme_list.go b/common/theme_list.go index 89f91f5c..d0a8f527 100644 --- a/common/theme_list.go +++ b/common/theme_list.go @@ -374,17 +374,12 @@ func GetThemeTemplate(theme string, template string) interface{} { // Might have something to do with it being the theme's TmplPtr map, investigate. tmpl, ok := Themes[theme].TmplPtr[template] if ok { - //fmt.Println("tmpl: ", tmpl) - //fmt.Println("exiting at Themes[theme].TmplPtr[template]") return tmpl } - tmpl, ok = TmplPtrMap[template] if ok { - //fmt.Println("exiting at TmplPtrMap[template]") return tmpl } - //fmt.Println("just passing back the template name") return template } diff --git a/common/ws_hub.go b/common/ws_hub.go index d8bd6159..5ed7b8ce 100644 --- a/common/ws_hub.go +++ b/common/ws_hub.go @@ -126,7 +126,6 @@ func (hub *WsHubImpl) Tick() error { } _ = forumList // Might use this later after we get the base feature working - //fmt.Println("canSeeItem") if topicList[0].Sticky { var lastSticky = 0 for i, row := range topicList { @@ -138,10 +137,7 @@ func (hub *WsHubImpl) Tick() error { if lastSticky == 0 { continue } - //fmt.Println("lastSticky: ", lastSticky) - //fmt.Println("before topicList: ", topicList) topicList = topicList[lastSticky:] - //fmt.Println("after topicList: ", topicList) } // TODO: Compare to previous tick to eliminate unnecessary work and data diff --git a/common/ws_user.go b/common/ws_user.go index d71f2687..49eb52eb 100644 --- a/common/ws_user.go +++ b/common/ws_user.go @@ -73,11 +73,13 @@ func (wsUser *WSUser) AddSocket(conn *websocket.Conn, page string) { if socket == nil { wsUser.Sockets[i] = &WSUserSocket{conn, page} wsUser.Unlock() + //fmt.Printf("%+v\n", wsUser.Sockets) return } } } wsUser.Sockets = append(wsUser.Sockets, &WSUserSocket{conn, page}) + //fmt.Printf("%+v\n", wsUser.Sockets) wsUser.Unlock() } @@ -91,6 +93,7 @@ func (wsUser *WSUser) RemoveSocket(conn *websocket.Conn) { if socket.conn == conn { wsUser.Sockets[i] = nil wsUser.Unlock() + //fmt.Printf("%+v\n", wsUser.Sockets) return } } @@ -104,6 +107,7 @@ func (wsUser *WSUser) RemoveSocket(conn *websocket.Conn) { } } wsUser.Sockets = append(wsUser.Sockets[:key], wsUser.Sockets[key+1:]...) + //fmt.Printf("%+v\n", wsUser.Sockets) wsUser.Unlock() } diff --git a/routes/panel/settings.go b/routes/panel/settings.go index 88092f52..17a62cbb 100644 --- a/routes/panel/settings.go +++ b/routes/panel/settings.go @@ -2,7 +2,6 @@ package panel import ( "database/sql" - "fmt" "net/http" "strconv" "strings" @@ -75,7 +74,7 @@ func SettingEdit(w http.ResponseWriter, r *http.Request, user common.User, sname if err != nil { return common.LocalError("The value of this setting couldn't be converted to an integer", w, r, user) } - fmt.Println("llist: ", llist) + //fmt.Println("llist: ", llist) for index, label := range strings.Split(llist, ",") { itemList = append(itemList, common.OptionLabel{