… | |
… | |
1370 | $self->{deny_save} = 1; |
1370 | $self->{deny_save} = 1; |
1371 | |
1371 | |
1372 | $cf::PLAYER{$login} = $self; |
1372 | $cf::PLAYER{$login} = $self; |
1373 | |
1373 | |
1374 | $self |
1374 | $self |
|
|
1375 | } |
|
|
1376 | |
|
|
1377 | =item $player->send_msg ($channel, $msg, $color, [extra...]) |
|
|
1378 | |
|
|
1379 | =cut |
|
|
1380 | |
|
|
1381 | sub send_msg { |
|
|
1382 | my $ns = shift->ns |
|
|
1383 | or return; |
|
|
1384 | $ns->send_msg (@_); |
1375 | } |
1385 | } |
1376 | |
1386 | |
1377 | =item $pl->quit_character |
1387 | =item $pl->quit_character |
1378 | |
1388 | |
1379 | Nukes the player without looking back. If logged in, the connection will |
1389 | Nukes the player without looking back. If logged in, the connection will |
… | |
… | |
2243 | $self->message ($msg, $flags); |
2253 | $self->message ($msg, $flags); |
2244 | } |
2254 | } |
2245 | } |
2255 | } |
2246 | } |
2256 | } |
2247 | |
2257 | |
|
|
2258 | =item $object->send_msg ($channel, $msg, $color, [extra...]) |
|
|
2259 | |
|
|
2260 | =cut |
|
|
2261 | |
|
|
2262 | sub cf::object::send_msg { |
|
|
2263 | my $pl = shift->contr |
|
|
2264 | or return; |
|
|
2265 | $pl->send_msg (@_); |
|
|
2266 | } |
|
|
2267 | |
2248 | =item $player_object->may ("access") |
2268 | =item $player_object->may ("access") |
2249 | |
2269 | |
2250 | Returns wether the given player is authorized to access resource "access" |
2270 | Returns wether the given player is authorized to access resource "access" |
2251 | (e.g. "command_wizcast"). |
2271 | (e.g. "command_wizcast"). |
2252 | |
2272 | |
… | |
… | |
2724 | |
2744 | |
2725 | The following functions and methods are available within a safe environment: |
2745 | The following functions and methods are available within a safe environment: |
2726 | |
2746 | |
2727 | cf::object |
2747 | cf::object |
2728 | contr pay_amount pay_player map x y force_find force_add |
2748 | contr pay_amount pay_player map x y force_find force_add |
2729 | insert remove |
2749 | insert remove name archname title slaying race |
2730 | |
2750 | |
2731 | cf::object::player |
2751 | cf::object::player |
2732 | player |
2752 | player |
2733 | |
2753 | |
2734 | cf::player |
2754 | cf::player |
… | |
… | |
2739 | |
2759 | |
2740 | =cut |
2760 | =cut |
2741 | |
2761 | |
2742 | for ( |
2762 | for ( |
2743 | ["cf::object" => qw(contr pay_amount pay_player map force_find force_add x y |
2763 | ["cf::object" => qw(contr pay_amount pay_player map force_find force_add x y |
2744 | insert remove inv)], |
2764 | insert remove inv name archname title slaying race)], |
2745 | ["cf::object::player" => qw(player)], |
2765 | ["cf::object::player" => qw(player)], |
2746 | ["cf::player" => qw(peaceful)], |
2766 | ["cf::player" => qw(peaceful)], |
2747 | ["cf::map" => qw(trigger)], |
2767 | ["cf::map" => qw(trigger)], |
2748 | ) { |
2768 | ) { |
2749 | no strict 'refs'; |
2769 | no strict 'refs'; |