mirror of
https://salsa.debian.org/mdosch/feed-to-muc.git
synced 2024-11-10 00:06:49 +01:00
Removed checking of MUC join return value as it doesn't represent the MUC status codes.
This commit is contained in:
parent
52303d3d30
commit
3b8f9c22ad
1 changed files with 2 additions and 7 deletions
|
@ -13,7 +13,7 @@ import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/chilts/sid"
|
"github.com/chilts/sid"
|
||||||
"github.com/mattn/go-xmpp"
|
xmpp "github.com/mattn/go-xmpp"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Variables defined globally as they are used by functions pingMUC
|
// Variables defined globally as they are used by functions pingMUC
|
||||||
|
@ -126,16 +126,11 @@ func main() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Join the MUC
|
// Join the MUC
|
||||||
mucStatus, err := client.JoinMUCNoHistory(config.Muc, config.MucNick)
|
_, err := client.JoinMUCNoHistory(config.Muc, config.MucNick)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Exit if Status is > 300, see https://xmpp.org/registrar/mucstatus.html
|
|
||||||
if mucStatus > 300 {
|
|
||||||
os.Exit(mucStatus)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Starting goroutine to ping the server every 30 seconds.
|
// Starting goroutine to ping the server every 30 seconds.
|
||||||
go pingServer(client, config.ServerAddress, config.BotJid)
|
go pingServer(client, config.ServerAddress, config.BotJid)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue