/mail doesn't send "You've got mail!" message.
When receiving a /mail while ingame it should say "You've got mail!" but instead just puts a blank line into the player's chat.
Comments (9)
-
reporter -
-
assigned issue to
Tagging @bastetfurry because IIRC this was his perl code.
-
assigned issue to
-
It isn't related to the
execconfig.pm
file, rather, it appears that it is a line wrapping problem. The message is being sent in two lines:[REMOTE] [localhost:39645] Data: sendmsgtoplayer techkid6 You've got mail! Use /mail to read it. [SERVER] 2017-04-26 01:12:17 [INFO] [exec] Message to player techkid6 succesfully sent. [SERVER] 2017-04-26 01:12:17 [INFO] Unknown command. Try /help for a list of commands
-
The relevant code is
my $execreturn = `/home/minecraft/remoteclient01a.py "sendmsgtoplayer $recipient You've got mail! Use /mail to read it."`;
in exec_privatemail.pl.
The problem appears to be that $recipient is given a newline at the end.
Looking at more of the code, the
sanitizeandfindrecipient
function that generates that value looks in firstjoin files to try to match a player and everything, it's a bit of a mess and not very futureproof with uuids coming in, etc. Whole thing needs to be rewritten really. -
reporter Looking at the
sanitizeandfindrecipient
function...#We let the shell solve this puzzle. And as soon as riot sees #this line he will have at least 10 ideas in how to solve this faster ;)
-
reporter could just use
get_correctname.sh
? -
you could, but it might help to have a clue in using perl to modify this without introducing potential code execution vulnerabilities from player messages... which I personally lack, so cannot advise on
-
$recipientname
is already sanitized in line 1068, only letters and numbers come trough that regex. Ifget_correctname.sh
returns a correct name on a single output line then simply delete 1080 and change 1084 tomy $recipient = `/home/minecraft/get_correctname.sh "$recipientname"`;
and call it a day.
That whole script would need a rewrite anyway, the parcel thing isn't supporting NBT items for one thing. And i still dislike the idea of using the filesystem as a database. :)
-
reporter - changed status to resolved
use correctname, resolves
#372→ <<cset d83229b44d30>>
- Log in to comment
Probably related, a message from a different pearl script:
Can't locate execconfig.pm in @INC (you may need to install the execconfig module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.24.1 /usr/local/share/perl/5.24.1 /usr/lib/x86_64-linux-gnu/perl5/5.24 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.24 /usr/share/perl/5.24 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at ./exec_speakas.pl line 12. BEGIN failed--compilation aborted at ./exec_speakas.pl line 12.
Seems a file called execconfig.pm is missing somewhere