mirror of
https://codeberg.org/demostf/plugin.git
synced 2026-06-04 00:54:08 +02:00
Fixed issues with the demo id being incorrect
Fixed success param for the DemoUpload forward not being set correctly
This commit is contained in:
parent
7d3730511a
commit
1e2bb28b42
2 changed files with 7 additions and 6 deletions
BIN
demostf.smx
BIN
demostf.smx
Binary file not shown.
13
demostf.sp
13
demostf.sp
|
|
@ -7,7 +7,7 @@ public Plugin:myinfo =
|
|||
name = "demos.tf uploader",
|
||||
author = "Icewind",
|
||||
description = "Auto-upload match stv to demos.tf",
|
||||
version = "0.2",
|
||||
version = "0.3",
|
||||
url = "https://demos.tf"
|
||||
};
|
||||
|
||||
|
|
@ -159,17 +159,18 @@ public ShowResponse()
|
|||
|
||||
new String:demoid[16];
|
||||
new String:url[256];
|
||||
new bool:success;
|
||||
char url_parts[16][4];
|
||||
|
||||
char url_parts[4][16];
|
||||
|
||||
strcopy(url, sizeof(url), output);
|
||||
|
||||
// Get the url part
|
||||
ReplaceString(url, sizeof(url), "STV available at: ", "");
|
||||
// Split the string on '/'
|
||||
ExplodeString(url, "/", url_parts, sizeof(url_parts[]), sizeof(url_parts));
|
||||
ExplodeString(url, "/", url_parts, sizeof(url_parts), sizeof(url_parts[]));
|
||||
|
||||
// Find the last part of the url
|
||||
for (int i = sizeof(url_parts[]) - 1; i >= 0; i--)
|
||||
for (int i = sizeof(url_parts) -1; i >= 0; i--)
|
||||
{
|
||||
if (!StrEqual(url_parts[i], "")){
|
||||
demoid = url_parts[i];
|
||||
|
|
@ -177,7 +178,7 @@ public ShowResponse()
|
|||
}
|
||||
}
|
||||
|
||||
CallDemoUploaded(success, demoid, url);
|
||||
CallDemoUploaded(true, demoid, url);
|
||||
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue