mirror of
https://codeberg.org/demostf/plugin.git
synced 2026-06-04 09:04:07 +02:00
Merge pull request #8 from TheBv/master
Fixed issues with the new DemoUploaded forwards
This commit is contained in:
commit
4b7754af67
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",
|
name = "demos.tf uploader",
|
||||||
author = "Icewind",
|
author = "Icewind",
|
||||||
description = "Auto-upload match stv to demos.tf",
|
description = "Auto-upload match stv to demos.tf",
|
||||||
version = "0.2",
|
version = "0.3",
|
||||||
url = "https://demos.tf"
|
url = "https://demos.tf"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -159,17 +159,18 @@ public ShowResponse()
|
||||||
|
|
||||||
new String:demoid[16];
|
new String:demoid[16];
|
||||||
new String:url[256];
|
new String:url[256];
|
||||||
new bool:success;
|
|
||||||
char url_parts[16][4];
|
char url_parts[4][16];
|
||||||
|
|
||||||
strcopy(url, sizeof(url), output);
|
strcopy(url, sizeof(url), output);
|
||||||
|
|
||||||
// Get the url part
|
// Get the url part
|
||||||
ReplaceString(url, sizeof(url), "STV available at: ", "");
|
ReplaceString(url, sizeof(url), "STV available at: ", "");
|
||||||
// Split the string on '/'
|
// 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
|
// 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], "")){
|
if (!StrEqual(url_parts[i], "")){
|
||||||
demoid = url_parts[i];
|
demoid = url_parts[i];
|
||||||
|
|
@ -177,7 +178,7 @@ public ShowResponse()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CallDemoUploaded(success, demoid, url);
|
CallDemoUploaded(true, demoid, url);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue