\n"
@@ -296,7 +317,7 @@
set timelong [clock format [$child time]]
set timeshort [clock format [$child time] -format {[%H:%M:%S]}]
set userlink [my user_link -user_id $user_id -color $color]
-
+
append result "
$timeshort " \
"$userlink " \
"[my encode $msg]
\n"
@@ -319,22 +340,22 @@
}
my log "-- ending"
}
-
+
ChatClass method initialize_nsvs {} {
# read the last_activity information at server start into a nsv array
::xo::dc foreach get_rooms {
- select room_id, to_char(max(creation_date),'HH24:MI:SS YYYY-MM-DD') as last_activity
+ select room_id, to_char(max(creation_date),'HH24:MI:SS YYYY-MM-DD') as last_activity
from chat_msgs group by room_id
} {
::xo::clusterwide nsv_set [self]-$room_id-seen last [clock scan $last_activity]
}
}
-
+
ChatClass method flush_messages {-chat_id:required} {
set array "[self]-$chat_id"
- ::xo::clusterwide nsv_unset $array
- ::xo::clusterwide nsv_unset $array-seen
- ::xo::clusterwide nsv_unset $array-last-activity
+ ::xo::clusterwide nsv_unset -nocomplain $array
+ ::xo::clusterwide nsv_unset -nocomplain $array-seen
+ ::xo::clusterwide nsv_unset -nocomplain $array-last-activity
}
ChatClass method init {} {