'Retreat Plugin' lines at Source-code

Wrote new code? Fixed a bug? Want to discuss technical stuff? Feel free to post it here.

Moderator: Moderators

SkylorD
Moderators
Moderators
Posts: 1202
Joined: 16 Dec 2011, 02:53
Noob?: Yes

'Retreat Plugin' lines at Source-code

#1 Post by SkylorD »

sub avoidGM_onTeleport {
my (undef, $callerArgs) = @_;
my ($map) = $callerArgs->{map} =~ /([\s\S]*)\./;
return unless $AI == 2;
return unless $config{allowedMaps};
return if existsInList($config{allowedMaps}, $map);
return if $config{allowedMaps_reaction} == 0;
return if $config{quitOn_teleported} == 1;
exit;
}
I've added an line, as you can see.
These lines are the plugin retreat, but I was thinking the same thing, then I remembered and decided to pick up and put as "source code" of the kore.
What you think ?
But have an condition, this sub will works only when don't have anywhere way to teleport. 'Cause of this i added that line.
If this block is wrong, I can renovate.
-
Other thing, this block verify if $map is the same map at allowed Maps.
I was thinking in remove this comparison.

If i remove this comparison, this block will effect or no ?
Will activate when a GM teleport me anywhere?
DEACTIVATED 8-)