From 88cf2d92653dac40ff1665ab8a819e9da00b4fb0 Mon Sep 17 00:00:00 2001 From: "Kay Marquardt (Gnadelwartz)" Date: Thu, 11 Apr 2019 20:54:26 +0200 Subject: [PATCH] make user_is_creator more failsave --- bashbot.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bashbot.sh b/bashbot.sh index 752f4a0..ca500ee 100755 --- a/bashbot.sh +++ b/bashbot.sh @@ -10,7 +10,7 @@ # This file is public domain in the USA and all free countries. # Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying) # -#### $$VERSION$$ v0.6-dev2-10-gdb64978 +#### $$VERSION$$ v0.6-dev2-12-g307363a # # Exit Codes: # - 0 sucess (hopefully) @@ -224,7 +224,7 @@ leave_chat() { } user_is_creator() { - if [ "$1" == "$2" ] || [ "$(get_chat_member_status "$1" "$2")" == "creator" ]; then return 0; fi + if [ "${1:--}" == "${2:-+}" ] || [ "$(get_chat_member_status "$1" "$2")" == "creator" ]; then return 0; fi return 1 }