We can't break Logins entirely here; if they don't have a plugin at the start... just no.

This commit is contained in:
KyleSanderson
2014-02-06 18:54:37 -07:00
parent e662128de1
commit 3171e6fc5b
+9 -8
View File
@@ -60,16 +60,17 @@ void SteamWorksGSHooks::LogOnAnonymous(void)
RETURN_META(MRES_SUPERCEDE);
}
if (this->pFOTR->GetFunctionCount() == 0)
{
/* No plugin was loaded to handle this. Anon away; we can't break them. */
RETURN_META(MRES_IGNORED);
}
char pToken[256];
pToken[0] = '\0';
if (this->pFOTR->GetFunctionCount() != 0)
{
cell_t result = Pl_Continue;
this->pFOTR->PushStringEx(pToken, sizeof(pToken), SM_PARAM_STRING_UTF8 | SM_PARAM_STRING_COPY, SM_PARAM_COPYBACK);
this->pFOTR->PushCell(sizeof(pToken));
this->pFOTR->Execute(&result);
}
this->pFOTR->PushStringEx(pToken, sizeof(pToken), SM_PARAM_STRING_UTF8 | SM_PARAM_STRING_COPY, SM_PARAM_COPYBACK);
this->pFOTR->PushCell(sizeof(pToken));
this->pFOTR->Execute(NULL);
pGameServer->LogOn(pToken, pToken);
RETURN_META(MRES_SUPERCEDE);