@@ -80,15 +80,15 @@ func NewPostgresStorage() *PostgresStorage {
8080 return & PostgresStorage {db }
8181}
8282
83- func (ms * PostgresStorage ) BotConfig () []* BotConfig {
83+ func (ps * PostgresStorage ) BotConfig () []* BotConfig {
8484
8585 var err error
8686 var rows * sql.Rows
8787
8888 configs := make ([]* BotConfig , 0 )
8989
9090 sql := "SELECT id, server, server_password, nick, password, real_name, server_identifier FROM bots_chatbot WHERE is_active=true"
91- rows , err = ms .db .Query (sql )
91+ rows , err = ps .db .Query (sql )
9292 if err != nil {
9393 glog .Fatal ("Error running: " , sql , " " , err )
9494 }
@@ -120,7 +120,7 @@ func (ms *PostgresStorage) BotConfig() []*BotConfig {
120120 configs = append (configs , config )
121121 glog .Infoln ("config.Id:" , config .Id )
122122 }
123- channelStmt , err := ms .db .Prepare ("SELECT id, name, password, fingerprint FROM bots_channel WHERE is_active=true and chatbot_id=$1" )
123+ channelStmt , err := ps .db .Prepare ("SELECT id, name, password, fingerprint FROM bots_channel WHERE is_active=true and chatbot_id=$1" )
124124 if err != nil {
125125 glog .Fatal ("[Error] Error while preparing the statements to retrieve the channel:" , err )
126126 }
@@ -159,7 +159,6 @@ func (ms *PostgresStorage) SetCount(channel string, count int) error {
159159 }
160160
161161 // Write the count
162-
163162 updateSQL := "UPDATE bots_usercount SET counts[$1] = $2 WHERE channel_id = $3 AND dt = $4"
164163
165164 var res sql.Result
0 commit comments