Merge pull request #1 from sigio/patch-1

Fix het topic
This commit is contained in:
Arjan 2018-11-21 19:10:41 +01:00 committed by GitHub
commit 865aa33642
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -52,7 +52,7 @@ nc "$SERVER" 6667 | while read message; do
ERROR*) echo "$message"; exit;; ERROR*) echo "$message"; exit;;
*PRIVMSG*) echo "${message}" | sed -nr "s/^:([^!]+).*PRIVMSG[^:]+:(.*)/[$(date '+%R')] <\1> \2/p";; *PRIVMSG*) echo "${message}" | sed -nr "s/^:([^!]+).*PRIVMSG[^:]+:(.*)/[$(date '+%R')] <\1> \2/p";;
*332*) *332*)
TOPIC=$(echo "$message" | cut -d \: -f 3) TOPIC=$(echo "$message" | cut -d \: -f 3-)
SPACESTATE=$(cat $SPACESTATEFILE) SPACESTATE=$(cat $SPACESTATEFILE)
SETTOPIC=$(cat $SETTOPICFILE) SETTOPIC=$(cat $SETTOPICFILE)
if [ "$SETTOPIC" == "1" ]; then if [ "$SETTOPIC" == "1" ]; then