Games-Axmud
view release on metacpan or search on metacpan
lib/Games/Axmud/Client.pm view on Meta::CPAN
'music' => ['v', 'l', 'p', 'c', 't', 'u'],
'gauge' => ['max', 'caption', 'color'],
'stat' => ['max', 'caption'],
'frame' => [
'name', 'action', 'open', 'close', 'redirect',
'title', 'internal', 'align', 'left', 'top',
'width', 'height', 'scrolling', 'floating',
],
# 'destination' => undef,
'dest' => ['x', 'y', 'eol', 'eof'],
'relocate' => undef,
'quiet' => undef,
'user' => undef,
'password' => undef,
'image' => [
'fname', 'url', 't', 'h', 'w', 'hspace', 'vspace',
'align', 'ismap',
],
'filter' => ['src', 'dest', 'name'],
# 'SCRIPT => undef, # Deprecated since MXP v0.4
},
lib/Games/Axmud/Session.pm view on Meta::CPAN
$self->writeText(
'Unrecognised host \'' . $self->initHost . '\'',
$self->_objClass . '->connectionError',
);
} else {
# During an MXP crosslinking operation, show a longer message so the user isn't
# left bewildered by a sudden disconnection message when the world specified a
# <QUIET> relocation
$self->writeText(
'Relocation to new server failed, unrecognised host \''
. $self->mxpRelocateHost . '\'',
$self->_objClass . '->connectionError',
);
}
# React to the disconnection. The TRUE flag means that we've already displayed a message
$self->reactDisconnect(TRUE);
lib/Games/Axmud/Session.pm view on Meta::CPAN
} elsif ($data >=10 && $data <= 12) {
# Room modes
push (@tagList, 'mxpm_' . $data); # e.g. 'mxpm_10'
} elsif ($data == 19) {
# Welcome text
push (@tagList, 'mxpm_19');
# ...which is not displayed during an MXP relocate operation
if ($self->mxpRelocateMode ne 'none') {
$self->ivPoke('mxpRelocateQuietLineFlag', TRUE);
}
} elsif ($data >= 20 && $data <= 99) {
# User-defined modes
push (@tagList, 'mxpm_' . $data); # e.g. 'mxpm_20'
}
lib/Games/Axmud/Session.pm view on Meta::CPAN
delete $tagHash{'dest'};
}
if ($axmud::CLIENT->shareMainWinFlag || ! $axmud::CLIENT->allowMxpInteriorFlag) {
%tagHash = $self->deleteMxpAttrib('frame', 'internal', %tagHash);
}
if (! $axmud::CLIENT->allowMxpCrosslinkFlag) {
delete $tagHash{'relocate'};
}
# Process the <SUPPORT> tag
if (! @argList) {
# Return a list of all supported tags
$msg = '<SUPPORTS';
foreach my $key (sort {$a cmp $b} (keys %tagHash)) {
lib/Games/Axmud/Session.pm view on Meta::CPAN
} until (! @argList);
# We'll let the hostname be anything, but the port should at least be a valid integer
# in the usual range
if (
! $ivHash{'hostname'}
|| ! defined $ivHash{'port'}
|| ! $axmud::CLIENT->floatCheck($ivHash{'port'}, 0, 65535)
) {
$self->mxpDebug($origToken, 'Invalid relocation hostname and/or port', 3511);
return @emptyList;
}
# Don't allow a crosslink operation if one is already in progress, or if a delayed
# quit has been set up
if ($self->mxpRelocateMode eq 'none' && ! defined $self->delayedQuitTime) {
# The crosslinking process will start on the next incoming data loop (allowing the
# server to send a <QUIET> tag right after this one
( run in 0.729 second using v1.01-cache-2.11-cpan-71847e10f99 )