Compare commits
2 Commits
7d9cf97445
...
0ffd5de65c
| Author | SHA1 | Date |
|---|---|---|
|
|
0ffd5de65c | |
|
|
fcaa5a01bc |
|
|
@ -9,6 +9,7 @@ go-xmpp4steam is a XMPP/Steam gateway.
|
||||||
|
|
||||||
* [go-xmpp](https://git.kingpenguin.tk/chteufleur/go-xmpp) for the XMPP part.
|
* [go-xmpp](https://git.kingpenguin.tk/chteufleur/go-xmpp) for the XMPP part.
|
||||||
* [go-steam](https://github.com/Philipp15b/go-steam) for the steam part.
|
* [go-steam](https://github.com/Philipp15b/go-steam) for the steam part.
|
||||||
|
* [go-sqlite3](https://github.com/mattn/go-sqlite3) for the database part.
|
||||||
* [cfg](https://github.com/jimlawless/cfg) for the configuration file.
|
* [cfg](https://github.com/jimlawless/cfg) for the configuration file.
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -88,14 +88,13 @@ func (newLine *DatabaseLine) UpdateLine() bool {
|
||||||
}
|
}
|
||||||
|
|
||||||
func RemoveLine(jid string) bool {
|
func RemoveLine(jid string) bool {
|
||||||
|
// Update Steam login and password to blank before deleting,
|
||||||
|
// because it is not really deleted in the SQLite file.
|
||||||
line := new(DatabaseLine)
|
line := new(DatabaseLine)
|
||||||
line.Jid = jid
|
line.Jid = jid
|
||||||
return line.UpdateLine()
|
line.UpdateLine()
|
||||||
|
|
||||||
// FIXME not working
|
|
||||||
/*
|
|
||||||
log.Printf("%sRemove line %s", LogInfo, jid)
|
log.Printf("%sRemove line %s", LogInfo, jid)
|
||||||
|
|
||||||
stmt, err := db.Prepare(deleteDatabaseStmt)
|
stmt, err := db.Prepare(deleteDatabaseStmt)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Printf("%sError on delete jid %s", LogError, jid, err)
|
log.Printf("%sError on delete jid %s", LogError, jid, err)
|
||||||
|
|
@ -114,11 +113,11 @@ func RemoveLine(jid string) bool {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
if affect == 0 {
|
if affect == 0 {
|
||||||
|
log.Printf("%sNo line affected", LogDebug)
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
return true
|
return true
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func GetLine(jid string) *DatabaseLine {
|
func GetLine(jid string) *DatabaseLine {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue