tgstation / tgstation13.org Goto Github PK
View Code? Open in Web Editor NEWWebsite for tgstation13
License: GNU General Public License v2.0
Website for tgstation13
License: GNU General Public License v2.0
I'd like to pitch my design before committing to coding it.
Please do let me know of things that need changing! (or if you're against this as a whole)
Notes:
I made a Makeshift Cable Layer and there was no sprite but it was there. I picked it up and put it in my bag and it was still spriteless.
so noscript users can't see the status of any server
It couldn't hurt to have a bit of a visual update to the website, because (IMO) it's kind of boring.
that is all.
It's a minor gripe, but I'm pretty sure the server buttons on the site aren't intended to display "IGN 1.457457457457457..." as a raw number.
Notes were merged into the messages table, so those lines need to be updated:
https://github.com/tgstation/tgstation13.org/blob/master/tgdb/notes.php#L34 should be 'targetckey LIKE' instead of 'ckey LIKE'
https://github.com/tgstation/tgstation13.org/blob/master/tgdb/notes.php#L40 should be 'text LIKE' instead of 'notetext LIKE'
https://github.com/tgstation/tgstation13.org/blob/master/tgdb/notes.php#L53 should become
$sqlwhere = " WHERE type LIKE 'note' AND ".join(" ".$sqlwheresep." ", $sqlwherea);
to atleast get the notes, although this could be expanded to also get watchlist/messages/idk i guess
https://github.com/tgstation/tgstation13.org/blob/master/tgdb/notes.php#L58
$res = $mysqli->query("SELECT id, targetckey, timestamp, text, adminckey, server FROM ".fmttable("notes").$sqlwhere." ORDER BY timestamp DESC LIMIT ".$limit.";");
(although server doesn't work and i am not too sure why)
https://github.com/tgstation/tgstation13.org/blob/master/tgdb/notes.php#L63
should be $row['targetckey']
https://github.com/tgstation/tgstation13.org/blob/master/tgdb/notes.php#L67
should be $row['text']
server field doesn't appear,that's the only weird thing i've noticed, rest seems to work
But you can respond to it if you click on it from any other board
Joride changed the way IPs are formated in the new schema, so I don't think it's able to read them correctly and denies access.
When trying to open a players detail page like: https://tgstation13.org/tgdb/playerdetails.php?ckey=Booktower a blank page is returned. Inspecting the response via the developer console shows that the request fails with a 500 Internal Server Error response code. The response is empty, firefox shows a blank page instead of an error message.
If adminobservers have insufficient permissions an error message indicating that should be returned. Additonally, a 500 internal server error response should display an error page, I'm guessing browsers use their own if none is supplied? Currently it responds the full response header followed by a few newlines.
Active permabans show up as expired for me on the general ban log.
https://tgstation13.org/tgdb/bans.php has the issue.
https://tgstation13.org/tgdb/bans.php?adminckey=booktower does not have the issue, curiously enough.
Code in question: https://github.com/tgstation/tgstation13.org/blob/master/tgdb/bans.php#L75
Chrome, Version 64.0.3282.119 (Official Build) (64-bit), using ublock origin.
Scrolled down the pol 2018 thread page 5, scrolled up a little, my avatar was appearing on XSI's. Mine is a gif, XSI's is a jaypeg. It was similar to Z layer fighting though slow. My gif swaps frame at 100ms, I'm assuming it was flickering between mine and XSI's close to that speed. When I scrolled up more to get a better look, the fighting stopped. It didn't displace XSI's details nor extend the page, but it was being drawn over the web page. I didn't watch it for long enough to make sure it was being drawn over the top of XSI's avatar or to see if it animated like mine. I did see it long enough for me to hope I'm not insane.
Hello,
i found an issue when i was Building a BSA room with the APC behind armory . (room added to plan normaly & power conduit with power).
By using the borg circuit fabricator i builded a basic battery for an APC But it just won't load.
After getting a human to change the battery for a blue space one (fabricated version from science)
it began to function normaly.
That is all if you need futher information please contact me. I'm trying to see if the error will repeat itself.
I was messing around with a port I did for this code ages ago and realized that it was terribly unoptimized, so I took a shot at trying to see if I could make it better. I haven't tested the below code at all, but figured I'd throw it here in case someone wanted to update it at some point.
<?php
if (php_sapi_name() != "cli") {
return;
}
$error = false;
include("serverinfo.php");
function export($addr, $port, $str)
{
$error = false;
if ($str{0} !== '?') {
$str = ('?' . $str);
}
$query = "\x00\x83" . pack('n', strlen($str) + 6) . "\x00\x00\x00\x00\x00" . $str . "\x00";
$server = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
stream_set_timeout($server, 2);
socket_set_option($server, SOL_SOCKET, SO_RCVTIMEO, ['sec' => 2, 'usec' => 0]);
socket_set_option($server, SOL_SOCKET, SO_SNDTIMEO, ['sec' => 2, 'usec' => 0]);
if (!socket_connect($server, $addr, $port)) {
$error = true;
return "ERROR";
}
$bytestosend = strlen($query);
$bytessent = 0;
while ($bytessent < $bytestosend) {
$result = socket_write($server, substr($query, $bytessent), $bytestosend - $bytessent);
if ($result === FALSE) {
die(socket_strerror(socket_last_error()));
}
$bytessent += $result;
}
$result = socket_read($server, 10000, PHP_BINARY_READ);
socket_close($server);
if ($result !== "") {
if ($result{0} === "\x00" || $result{1} === "\x83") {
$sizebytes = unpack('n', $result{2} . $result{3});
$size = $sizebytes[1] - 1;
if ($result{4} === "\x2a") {
$unpackint = unpack('f', $result{5} . $result{6} . $result{7} . $result{8});
return $unpackint[1];
} elseif ($result{4} === "\x06") {
$unpackstr = "";
$index = 5;
while ($size > 0) {
$size--;
$unpackstr .= $result{$index};
$index++;
}
return $unpackstr;
}
}
}
$error = true;
return "ERROR";
}
// Create arrays for sockets and servers
$sockets = array();
$addresses = array();
foreach ($servers as $server) {
$address = $server['address'];
$port = $server['port'];
$key = "$address:$port";
$addresses[$key] = $address;
$sockets[$key] = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);
socket_set_nonblock($sockets[$key]);
socket_connect($sockets[$key], $address, $port);
}
// Set timeout for socket_select
$timeout = array('sec' => 0, 'usec' => 1000);
// Create an array to hold the serverinfo data
$serverinfo = array();
// Check if cache file exists and load data if it does
if (file_exists('serverinfo.json')) {
$cache = json_decode(file_get_contents('serverinfo.json'), true);
}
// Loop through the sockets and get all the data we can
foreach ($sockets as $key => $socket) {
$address = $addresses[$key];
$port = explode(':', $key)[1];
$lastinfo = (is_array($cache) && count($cache) > $n ? $cache[$n] : array());
$data = export($address, $port, '?status');
if (is_string($data)) {
$data = str_replace("\x00", "", $data);
}
$variable_value_array = array();
if ((!$data || strpos($data, 'ERROR') !== false) && (array_key_exists('restarting', $lastinfo))) {
$variable_value_array['restarting'] = $lastinfo['restarting'] + 1;
}
$data_array = explode('&', $data);
foreach ($data_array as $row) {
$parts = explode('=', $row);
if (isset($parts[1])) {
$variable_value_array[$parts[0]] = $parts[1];
} else {
$variable_value_array[$parts[0]] = null;
}
}
$variable_value_array['cachetime'] = time();
if (array_key_exists('gamestate', $variable_value_array)) {
if ($variable_value_array['gamestate'] == 4) {
$variable_value_array['restarting'] = 1;
}
}
$serverinfo[] = $variable_value_array;
}
$jsonserverinfo = json_encode($serverinfo);
file_put_contents('serverinfo.json', $jsonserverinfo);
// Close sockets
foreach ($sockets as $socket) {
socket_close($socket);
}
I only thought to come back to this code as I was working on optimizing Civ13's bot code for retrieving players, and remembered that I originally developed it using this repository as an example. https://github.com/VZGCoders/Civilizationbot/blob/c2c37167020c468ba6f15b280413fc9359ddbe27/civ13.php#L803
While fireman carrying a body, I jumped on a janicart to move a bit faster. After getting off of it, I was unable to interact with the medbay fridge with my offhand, with it saying the fridge refuses to accept the offhand.
As per my ahelp reply
'Namely, you may want to note that /obj/item/riding_offhand wasn't removed when you left your janicart.'
Should probably just take you to the connection db, as player panel is mainly about the ckey.
Mine has one
I think if an admin deletes your post for whatever reason like say "off topic" or "irrelevant" or "shitposts go in the hut in 2020" you should be able to see what your orginal message was so you know what to not trigger forum mod abusers to delete your post for. thanks mso not really
Deadminned myself and it reflects in the database and on the admins page http://ss13.moe/index.php/admins but the rapsheet frontend claims i'm still host and allows me access.
[Round ID]: Literally any round you trontobringus
I remember now why I hate making issue reports
I should also note that you can't put food in the food cart either, making almost all of my food-based RP extremely difficult
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.