Skip to content

Commit

Permalink
goddam
Browse files Browse the repository at this point in the history
bro im so dumb i swear😭
  • Loading branch information
NexIsDumb committed Feb 4, 2024
1 parent 411edd7 commit 0e9cd10
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 11 deletions.
4 changes: 2 additions & 2 deletions source/funkin/backend/system/github/GitHub.hx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion source/funkin/backend/utils/CoolUtil.hx
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

/**
Expand Down
4 changes: 1 addition & 3 deletions source/funkin/menus/credits/CreditsCodename.hx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
Expand Down
2 changes: 1 addition & 1 deletion source/funkin/menus/credits/CreditsMain.hx
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
8 changes: 4 additions & 4 deletions source/funkin/options/type/GithubIconOption.hx
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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() {
Expand All @@ -67,15 +67,15 @@ 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);

if(bytes != null) bmap = BitmapData.fromBytes(bytes);
}

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);
Expand Down

0 comments on commit 0e9cd10

Please sign in to comment.