@@ -80,15 +80,15 @@ func NewPostgresStorage() *PostgresStorage {
80
80
return & PostgresStorage {db }
81
81
}
82
82
83
- func (ms * PostgresStorage ) BotConfig () []* BotConfig {
83
+ func (ps * PostgresStorage ) BotConfig () []* BotConfig {
84
84
85
85
var err error
86
86
var rows * sql.Rows
87
87
88
88
configs := make ([]* BotConfig , 0 )
89
89
90
90
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 )
92
92
if err != nil {
93
93
glog .Fatal ("Error running: " , sql , " " , err )
94
94
}
@@ -120,7 +120,7 @@ func (ms *PostgresStorage) BotConfig() []*BotConfig {
120
120
configs = append (configs , config )
121
121
glog .Infoln ("config.Id:" , config .Id )
122
122
}
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" )
124
124
if err != nil {
125
125
glog .Fatal ("[Error] Error while preparing the statements to retrieve the channel:" , err )
126
126
}
@@ -159,7 +159,6 @@ func (ms *PostgresStorage) SetCount(channel string, count int) error {
159
159
}
160
160
161
161
// Write the count
162
-
163
162
updateSQL := "UPDATE bots_usercount SET counts[$1] = $2 WHERE channel_id = $3 AND dt = $4"
164
163
165
164
var res sql.Result
0 commit comments