I noticed some issues with my custom chat aliases, specifically ones beginning with .t like:
Code:
"ChatAliases"
{
".test" "sm_ready"
}
That alias is being overwritten by the ".t" alias because you are checking for IsPrefix() on alias matching and ".t" and the other default aliases come before the custom ones.
Therefore, I changed pugsetup.sp accordingly:
Spoiler
Code:
static bool CheckChatAlias(const char[] alias, const char[] command, const char[] chatCommand, const char[] chatArgs, int client) {
if (StrEqual(chatCommand, alias, false)) {
FakeClientCommand(client, "%s %s", command, chatArgs);
return true;
}
return false;
}
public void OnClientSayCommand_Post(int client, const char[] command, const char[] sArgs) {
static char chatCommand[COMMAND_LENGTH];
static char chatArgs[255]; chatArgs[0] = '\0';
int index = SplitString(sArgs, " ", chatCommand, sizeof(chatCommand));
if (index == -1) {
strcopy(chatCommand, sizeof(chatCommand), sArgs);
} else if (index + 1 < strlen(sArgs)) {
strcopy(chatArgs, sizeof(chatArgs), sArgs[index + 1]);
}
if (chatCommand[0]) {
char alias[ALIAS_LENGTH];
char cmd[COMMAND_LENGTH];
for (int i = 0; i < GetArraySize(g_ChatAliases); i++) {
GetArrayString(g_ChatAliases, i, alias, sizeof(alias));
GetArrayString(g_ChatAliasesCommands, i, cmd, sizeof(cmd));
if (CheckChatAlias(alias, cmd, chatCommand, chatArgs, client)) {
break;
}
}
}
// ... .help stuff below
}
Another issue I'm having is with workshop maps being used.
I set the cvar to a collection ID that I'm putting together and it's not pulling down the data.
I tested the API call manually and it does yield results:
Is there anything else required to set up the workshop collection other than that cvar?
Just to make sure it is sending a request, I modified steamapi.sp for debugging:
Spoiler
Code:
stock void UpdateWorkshopCache(int collectionID) {
// Build URL
char request[MAX_URL_LEN];
char data[MAX_POST_LEN];
Format(request, MAX_URL_LEN, "%s",
"http://api.steampowered.com/ISteamRemoteStorage/GetCollectionDetails/v1/");
Format(data, MAX_POST_LEN, "collectioncount=1&publishedfileids%%5B0%%5D=%d&format=vdf", collectionID);
LogMessage("Grabbing workshop collection %d", collectionID);
LogMessage("Request: %s", request);
LogMessage("Data: %s", data);
LogMessage("User-agent: %s", WAPI_USERAGENT);
LogMessage("System2 Available: %s", SYSTEM2_AVAILABLE() ? "yes" : "no");
if (SYSTEM2_AVAILABLE()) {
System2_GetPage(OnGetPageComplete, request, data, WAPI_USERAGENT, collectionID);
} else {
LogError("You must have the system2 extension installed to use workshop collections.");
}
}
And it yielded successful results in terms of it attempting to call. But I don't see anything in the server console about it being successful grabbing the collection or not.
Here's my server's SourceMod information:
__________________