diff --git a/matrix-send b/matrix-send index 0c15e98..de36628 100755 --- a/matrix-send +++ b/matrix-send @@ -17,12 +17,16 @@ conf_error () { exit 2 } +warning () { + printf "\033[93;1mwarning:\033[0m $1\n" +} + vargrep () { printf "$2\n" | grep "$1" $3 } usage () { - printf "usage: matrix-send [-t type] [-c] [-h] [-V] message room\n" + printf "usage: matrix-send [-t type] [-C config] [-chV] message room\n" exit 1 } @@ -31,6 +35,7 @@ help () { matrix-send: send a message to a Matrix room Options: -t type: change default event type + -C config: use a custom configuration file -c: clear cached access tokens -h: show this help menu -V: show version and program information @@ -130,9 +135,6 @@ ClearCache () { Send () { curl -s -XPOST -d "{"'"'"msgtype"'"'":"'"'"$mtype"'"'", "'"'"body"'"'":"'"'"$message"'"'"}" "https://$server/_matrix/client/r0/rooms/%21$roomid/send/m.room.message?access_token=$token" - #cat <