Changeset 275 for scripts/usr/local/lib/7dtd
- Timestamp:
- May 17, 2016, 11:01:47 AM (9 years ago)
- Location:
- scripts/usr/local/lib/7dtd
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
scripts/usr/local/lib/7dtd/VERSION
r265 r275 1 Version: 10 02 Release: 2016-0 4-201 Version: 101 2 Release: 2016-05-17 3 3 -
scripts/usr/local/lib/7dtd/monitor-log.sh
r259 r275 59 59 60 60 handleChat() { 61 echo "$(timestamp): $1 " >> $CHATLOG61 echo "$(timestamp): $1: $2" >> $CHATLOG 62 62 63 63 for H in $(getHooksFor chat $INSTANCE); do 64 $H $INSTANCE "$1" "$2" 65 done 66 } 67 68 handleGmsg() { 69 echo "$(timestamp): GMSG: $1" >> $CHATLOG 70 71 for H in $(getHooksFor gmsg $INSTANCE); do 64 72 $H $INSTANCE "$1" 65 73 done … … 134 142 if [ -n "$(echo "$line" | grep -E '^GMSG: .+')" ]; then 135 143 msg=$(expr "$line" : 'GMSG: \(.*\)$') 136 handle Chat"$msg"144 handleGmsg "$msg" 137 145 unset msg 146 else 147 #Chat: 'name': .*$ 148 if [ -n "$(echo "$line" | grep -E '^Chat: .+')" ]; then 149 name=$(expr "$line" : "Chat: '\(.*\)': .*$") 150 msg=$(expr "$line" : "Chat: '.*': \(.*\)$") 151 handleChat "$name" "$msg" 152 unset name msg 138 153 else 139 154 #Executing command ".*" from client ".*"$ … … 155 170 fi 156 171 fi 172 fi 157 173 fi 158 174 done
Note:
See TracChangeset
for help on using the changeset viewer.