--- deliantra/Deliantra-Client/DC.pm 2006/08/14 04:34:40 1.114 +++ deliantra/Deliantra-Client/DC.pm 2006/08/18 01:01:00 1.116 @@ -71,7 +71,12 @@ sub put($$$) { my ($db, $key, $data) = @_; - $DB_SYNC{$db} = AnyEvent->timer (after => 5, cb => sub { $db->db_sync }); + my $key = $db + 0; + Scalar::Util::weaken $db; + $DB_SYNC{$key} ||= AnyEvent->timer (after => 5, cb => sub { + delete $DB_SYNC{$key}; + $db->db_sync if $db; + }); $db->db_put ($key => $data) } @@ -291,7 +296,8 @@ my ($entry, $txt) = @_; $::CONN->send ("mark ". pack "N", $self->{tag}); $::CONN->send ("command rename to <$txt>"); - }); + }, $self->{name}, + "If you input no name or erase the current custom name, the custom name will be unset"); } ], ["apply", sub { $::CONN->send ("apply $self->{tag}") }],