--- deliantra/server/ext/schmorplog.ext 2008/05/01 08:58:59 1.18 +++ deliantra/server/ext/schmorplog.ext 2008/05/03 13:29:14 1.20 @@ -45,14 +45,14 @@ cf::player->attach ( on_login => sub { my ($pl) = @_; - $pl->ob->set_ob_key_value (schmorplog_last_login => time); + $pl->ob->kv_set (schmorplog_last_login => time); - $pl->ob->set_ob_key_value (schmorplog_login_count => - 1 + $pl->ob->get_ob_key_value ("schmorplog_login_count")); + $pl->ob->kv_set (schmorplog_login_count => + 1 + $pl->ob->kv_get ("schmorplog_login_count")); (my $client = $pl->ns->version) =~ s/\n/\\n/g; - $pl->ob->set_ob_key_value (schmorplog_client => $client); + $pl->ob->kv_set (schmorplog_client => $client); ext::irc::do_notice (sprintf "%s logged in", $pl->ob->name); @@ -62,7 +62,7 @@ }, on_logout => sub { my ($pl, $cleanly) = @_; - $pl->ob->set_ob_key_value (schmorplog_last_logout => time); + $pl->ob->kv_set (schmorplog_last_logout => time); ext::irc::do_notice (sprintf "%s left", $pl->ob->name); $UPDATE_LOGINS->start; @@ -72,7 +72,7 @@ on_birth => sub { my ($pl) = @_; ext::irc::do_notice (sprintf "%s was just born", $pl->ob->name); - $pl->ob->set_ob_key_value (schmorplog_birthdate => time); + $pl->ob->kv_set (schmorplog_birthdate => time); warn "BIRTH: ", $pl->ob->name, " from ", $pl->ns->host; }, @@ -88,16 +88,16 @@ ++$pl->ob->{stats_death}{$pl->killer_name}; - $pl->ob->set_ob_key_value (schmorplog_death_count => - 1 + $pl->ob->get_ob_key_value ("schmorplog_death_count")); + $pl->ob->kv_set (schmorplog_death_count => + 1 + $pl->ob->kv_get ("schmorplog_death_count")); }, on_load => sub { my ($pl, $path) = @_; - $pl->ob->set_ob_key_value (schmorplog_last_load => time); + $pl->ob->kv_set (schmorplog_last_load => time); }, on_save => sub { my ($pl, $path) = @_; - $pl->ob->set_ob_key_value (schmorplog_last_save => time); + $pl->ob->kv_set (schmorplog_last_save => time); }, ); @@ -116,7 +116,7 @@ my $s = $pl->ob->{stats_death} or return $who->reply ($npc, "$args didn't die even once."); - my $rep = "$args died a total of " . $pl->ob->get_ob_key_value ("schmorplog_death_count") . " times, among them:\n\n\n\n"; + my $rep = "$args died a total of " . $pl->ob->kv_get ("schmorplog_death_count") . " times, among them:\n\n\n\n"; for (sort { $s->{$b} <=> $s->{$a} } keys %$s) { $rep .= "$s->{$_} time(s) due to $_.\n\n";