bro im so dumb i swear😭
This commit is contained in:
⍚~Nex
2024-02-04 20:26:35 +01:00
parent 411edd7e7c
commit 0e9cd10bce
5 changed files with 9 additions and 11 deletions
@@ -124,7 +124,7 @@ class GitHub {
}
private static function isRedirect(status:Int):Bool {
switch (status) {
// 301: Moved Permanently, 302: Found (Moved Temporarily), 307: Temporary Redirect, 308: Permanent Redirect - Nex_isDumb
// 301: Moved Permanently, 302: Found (Moved Temporarily), 307: Temporary Redirect, 308: Permanent Redirect - Nex
case 301 | 302 | 307 | 308 :
trace("Redirected with status code: " + status);
return true;
@@ -197,7 +197,7 @@ class GitHub {
}
private static function isRedirect(status:Int):Bool {
switch (status) {
// 301: Moved Permanently, 302: Found (Moved Temporarily), 307: Temporary Redirect, 308: Permanent Redirect - Nex_isDumb
// 301: Moved Permanently, 302: Found (Moved Temporarily), 307: Temporary Redirect, 308: Permanent Redirect - Nex
case 301 | 302 | 307 | 308 :
trace("Redirected with status code: " + status);
return true;
+1 -1
View File
@@ -165,7 +165,7 @@ class CoolUtil
* @return String Result without any kind of IP
*/
public static inline function removeIP(msg:String):String {
return ~/\d+.\d+.\d+.\d+/.replace(msg, "[Your IP]"); // For now its just IPs but who knows in the future.. - Nex_isDumb
return ~/\d+.\d+.\d+.\d+/.replace(msg, "[Your IP]"); // For now its just IPs but who knows in the future.. - Nex
}
/**
@@ -32,9 +32,7 @@ class CreditsCodename extends funkin.options.OptionsScreen {
//Main.execAsync(function() {
var idk = GitHub.getContributors("FNF-CNE-Devs", "CodenameEngine", function(e) {
error = true;
var errMsg:String = ~/\d+.\d+.\d+.\d+/.replace(e.message, "[Your IP]"); // Removing sensitive stuff
errMsg = 'Error while trying to download contributors list:\n$errMsg';
var errMsg:String = 'Error while trying to download contributors list:\n${CoolUtil.removeIP(e.message)}';
Logs.traceColored([Logs.logText(errMsg.replace('\n', ' '), RED)], ERROR);
funkin.backend.utils.NativeAPI.showMessageBox("Codename Engine Warning", errMsg, MSG_WARNING);
});
+1 -1
View File
@@ -61,7 +61,7 @@ class CreditsMain extends TreeMenu {
}
var username = node.getAtt("user");
var user = { // Kind of forcing - Nex_isDumb
var user = { // Kind of forcing
login: username,
html_url: 'https://github.com/$username',
avatar_url: 'https://github.com/$username.png'
@@ -8,7 +8,7 @@ import flixel.util.FlxColor;
class GithubIconOption extends TextOption
{
public var user(default, null):Dynamic; // Can possibly be GitHubUser or GitHubContributor - Nex_isDumb
public var user(default, null):Dynamic; // Can possibly be GitHubUser or GitHubContributor
public var icon:GithubUserIcon = null;
public var usePortrait(default, set) = true;
@@ -43,7 +43,7 @@ class GithubUserIcon extends FlxSprite
}
final mutex = new sys.thread.Mutex();
override function drawComplex(camera:FlxCamera):Void { // Making the image downlaod only if the player actually sees it on the screeeeen - Nex_isDumb
override function drawComplex(camera:FlxCamera):Void { // Making the image downlaod only if the player actually sees it on the screeeeen - Nex
if(!loading) {
loading = true;
Main.execAsync(function() {
@@ -67,7 +67,7 @@ class GithubUserIcon extends FlxSprite
}
if(planB) {
if(unfLink) user = GitHub.getUser(user.login, function(e) Logs.traceColored([Logs.logText('Failed to download github user info for ${user.login}: ${CoolUtil.removeIP(e.message)}', RED)], ERROR)); // Api part - Nex_isDumb
if(unfLink) user = GitHub.getUser(user.login, function(e) Logs.traceColored([Logs.logText('Failed to download github user info for ${user.login}: ${CoolUtil.removeIP(e.message)}', RED)], ERROR)); // Api part - Nex
try bytes = GitHub.__requestBytesOnGitHubServers('${user.avatar_url}&size=$size')
catch(e) Logs.traceColored([Logs.logText('Failed to download github pfp for ${user.login}: ${CoolUtil.removeIP(e.message)}', RED)], ERROR);
@@ -75,7 +75,7 @@ class GithubUserIcon extends FlxSprite
}
if(bmap != null) try {
mutex.acquire(); // Avoiding critical section - Nex_isDumb
mutex.acquire(); // Avoiding critical section - Nex
var leGraphic:FlxGraphic = FlxG.bitmap.add(bmap, false, key);
leGraphic.persist = true;
updateDaFunni(leGraphic);