|
|
|
@ -172,17 +172,20 @@ func main() {
|
|
|
|
|
log.Fatal("Can't use message type headline for groupchat messages.")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Get the current user.
|
|
|
|
|
currUser, err := osUser.Current()
|
|
|
|
|
if err != nil {
|
|
|
|
|
log.Fatal("Failed to get current user: ", err)
|
|
|
|
|
}
|
|
|
|
|
if currUser.Username == "root" {
|
|
|
|
|
fmt.Println("WARNING: It seems you are running go-sendxmpp as root user.\n" +
|
|
|
|
|
"This is is not recommended as go-sendxmpp does not require root " +
|
|
|
|
|
"privileges. Please consider using a less privileged user. For an " +
|
|
|
|
|
"example how to do this with sudo please consult the manpage chapter " +
|
|
|
|
|
"TIPS.")
|
|
|
|
|
// Print a warning if go-sendxmpp is run by the user root on non-windows systems.
|
|
|
|
|
if runtime.GOOS != "windows" {
|
|
|
|
|
// Get the current user.
|
|
|
|
|
currUser, err := osUser.Current()
|
|
|
|
|
if err != nil {
|
|
|
|
|
log.Fatal("Failed to get current user: ", err)
|
|
|
|
|
}
|
|
|
|
|
if currUser.Username == "root" {
|
|
|
|
|
fmt.Println("WARNING: It seems you are running go-sendxmpp as root user.\n" +
|
|
|
|
|
"This is is not recommended as go-sendxmpp does not require root " +
|
|
|
|
|
"privileges. Please consider using a less privileged user. For an " +
|
|
|
|
|
"example how to do this with sudo please consult the manpage chapter " +
|
|
|
|
|
"TIPS.")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
switch *flagSCRAMPinning {
|
|
|
|
|