-lasttime=`cat ~/.xonotic-map-compiler-autobuild/${M:30} 2>/dev/null` # oppress warnings if file doesn't exist
-echo "Done in approximately $(($lasttime/60)) minutes."
+lasttime=`cat ~/.xonotic-map-compiler-autobuild/"${M##*/}".buildtime 2>/dev/null || true`
+if [ -n "$lasttime" ] ; then
+ echo "Done in approximately $((($lasttime+59)/60)) minutes."
+ if [ -n "$IRCSPAM" ]; then
+ echo "Done in approximately $((($lasttime+59)/60)) minutes." | $IRCSPAM >/dev/null 2>&1 || true
+ fi
+fi