--- cf.schmorp.de/maps/perl/schmorplog.ext 2006/02/03 07:25:25 1.1 +++ cf.schmorp.de/maps/perl/schmorplog.ext 2006/04/02 20:44:23 1.8 @@ -1,29 +1,45 @@ #! perl sub on_login { - my ($event) = @_; + my ($pl, $host) = @_; + + $pl->ob->set_ob_key_value (schmorplog_last_login => time); cf::LOG cf::llevDebug, sprintf "QBERT %s logged in\n", - $event->{activator}->name, $event->{message}; + $pl->ob->name, $host; } sub on_logout { - my ($event) = @_; + my ($pl, $host) = @_; + + $pl->ob->set_ob_key_value (schmorplog_last_logout => time); cf::LOG cf::llevDebug, sprintf "QBERT %s left\n", - $event->{activator}->name, $event->{message}; + $pl->ob->name, $host; } sub on_shout { - my ($event) = @_; + my ($ob, $msg) = @_; - cf::LOG cf::llevDebug, sprintf "QBERT %s: %s\n", - $event->{activator}->name, $event->{message}; + cf::LOG cf::llevDebug, sprintf "QBERT [%s] %s\n", + $ob->name, $msg; } sub on_player_death { - my ($event) = @_; + my ($ob) = @_; + + cf::LOG cf::llevDebug, sprintf "QBERT %s died a quick and not very horrible death\n", + $ob->name; +} + +sub on_player_load { + my ($ob, $path) = @_; + + $ob->set_ob_key_value (schmorplog_last_load => time); +} + +sub on_player_save { + my ($ob, $path) = @_; - cf::LOG cf::llevDebug, sprintf "QBERT %s died\n", - $event->{who}->name; + $ob->set_ob_key_value (schmorplog_last_save => time); }