Mercurial > hg > anonet-resdb
diff scripts/add_udpmsg4_chat @ 1020:bace90f3f318 draft
[scripts/add_udpmsg4_chat] [security] .gitignore seckey (thanks Ivo)
author | d3v11 <d3v11@d3v11.ano> |
---|---|
date | Sat, 06 Oct 2012 22:06:10 +0000 |
parents | 115f429c1758 |
children | 9c22f6ca8b1f |
line wrap: on
line diff
--- a/scripts/add_udpmsg4_chat Mon Oct 01 00:23:17 2012 +0000 +++ b/scripts/add_udpmsg4_chat Sat Oct 06 22:06:10 2012 +0000 @@ -1,11 +1,12 @@ #!/bin/sh -if [ -z $3 ]; then - echo "Usage: $0 <chat> <owner> <pubkey> <seckey>" >&2; exit 255 +if [ -z $5 ]; then + echo "Usage: $0 <chat> <owner> <pubkey> <seckey> <topic>" >&2; exit 255 fi chat="$1" owner="$2" pubkey="$3" seckey="$4" +topic="$5" if [ "$(echo -n "${chat/chat\//}" | tr -d 'A-Za-z0-9_-' | wc -c | tr -d ' \t')" != 0 ]; then echo "udpmsg4 chats do not allow funny chars." >&2; exit 255 @@ -29,3 +30,5 @@ echo -n "$owner" >"$fullchat/@/owner" echo -n "$pubkey" >"$fullchat/@/pubkey" echo -n "$seckey" >"$fullchat/@/seckey" +echo -n "$topic" >"$fullchat/@/topic" +echo -n "seckey" >"$fullchat/@/.gitignore"