You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
525 B
27 lines
525 B
package Templog; |
|
|
|
use Milkbone; |
|
|
|
# print `pwd`; |
|
|
|
register_hook("buddy_in", sub { |
|
return unless $ARGS{-buddy} =~ /tiff/i; |
|
|
|
open(LOG, "log.txt"); |
|
|
|
print LOG "$ARGS{-buddy} logged in at " . time . "\n\n"; |
|
}); |
|
|
|
register_hook("buddy_out", sub { |
|
return unless $ARGS{-buddy} =~ /tiff/i; |
|
|
|
open(LOG, "log.txt"); |
|
|
|
print LOG "$ARGS{-buddy} logged out at " . time . "\n\n"; |
|
}); |
|
|
|
register_hook("msg_in", sub { |
|
open(LOG, "log.txt"); |
|
|
|
print LOG "$ARGS{-user} sent this at " . time . ": $ARGS{-msg}\n\n"; |
|
});
|
|
|