Removed the chat trigger detection, it causes a shit ton of errors in console. And updated compilers.

This commit is contained in:
Andrew 2011-06-17 20:09:56 -07:00
parent 11ef05f995
commit 5c3a6b16cc
9 changed files with 4 additions and 109 deletions

View File

@ -3,7 +3,7 @@
SOURCEDIR=src
SMINCLUDES=env/include
BUILDDIR=build
SPCOMP=env/linux/bin/spcomp-1.3.4
SPCOMP=env/linux/bin/spcomp-1.4.0-3218
VERSIONDUMP=./updateversion.sh
vpath %.sp $(SOURCEDIR)

View File

@ -3,7 +3,7 @@
set SOURCEDIR=src
set SMINCLUDES=env\include
set BUILDDIR=build
set SPCOMP=env\win32\bin\spcomp-1.3.4.exe
set SPCOMP=env\win32\bin\spcomp-1.4.0-3218.exe
set VERSIONDUMP=updateversion.bat
:: Dump version and revision information first.

Binary file not shown.

BIN
env/linux/bin/spcomp-1.4.0-3218 vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
env/win32/bin/spcomp-1.4.0-3218.exe vendored Normal file

Binary file not shown.

View File

@ -80,13 +80,6 @@ ZMenuMain(client)
// Create menu handle.
new Handle:menu_main = CreateMenu(ZMenuMainHandle);
decl String:publictrigger[4];
decl String:silenttrigger[4];
// Get public/silent chat triggers.
SayHooksGetPublicChatTrigger(publictrigger, sizeof(publictrigger));
SayHooksGetSilentChatTrigger(silenttrigger, sizeof(silenttrigger));
SetGlobalTransTarget(client);
// Initialize menu lines.
@ -100,7 +93,7 @@ ZMenuMain(client)
decl String:zmarket[MENU_LINE_HUGE_LENGTH];
// Translate each line into client's language.
Format(title, sizeof(title), "%t\n ", "Menu main title", publictrigger, silenttrigger);
Format(title, sizeof(title), "%t\n ", "Menu main title", SAYHOOKS_CHAT_PUBLIC_DEFAULT, SAYHOOKS_CHAT_SILENT_DEFAULT);
Format(zadmin, sizeof(zadmin), "%t", "Menu main zadmin");
Format(zclass, sizeof(zclass), "%t", "Menu main zclass");
Format(zcookies, sizeof(zcookies), "%t", "Menu main zcookies");

View File

@ -43,18 +43,8 @@ RoundStartOnClientSpawn(client)
return;
}
// Get public chat trigger prefix.
decl String:publictrigger[4];
SayHooksGetPublicChatTrigger(publictrigger, sizeof(publictrigger));
// If public chat trigger is disabled, then don't print message.
if (StrEqual(publictrigger, "N/A", false))
{
return;
}
// Print to client, how to access ZMenu.
TranslationPrintToChat(client, "General zmenu reminder", publictrigger, SAYHOOKS_KEYWORD_ZMENU);
TranslationPrintToChat(client, "General zmenu reminder", SAYHOOKS_CHAT_PUBLIC_DEFAULT, SAYHOOKS_KEYWORD_ZMENU);
}
/**

View File

@ -28,8 +28,6 @@
/**
* @section SM core config info.
*/
#define SAYHOOKS_CORE_KVNAME "Core"
#define SAYHOOKS_CORE_KVPATH "configs/core.cfg"
#define SAYHOOKS_CHAT_PUBLIC_DEFAULT "!"
#define SAYHOOKS_CHAT_SILENT_DEFAULT "/"
/**
@ -55,89 +53,3 @@
/**
* @endsection
*/
/**
* Hack function to get the public chat trigger value.
*
* @param trigger The string to store value in.
* @param maxlen The maximum length of the string.
*/
SayHooksGetPublicChatTrigger(String:trigger[], maxlen)
{
// Create kv handle.
new Handle:kvCore = CreateKeyValues(SAYHOOKS_CORE_KVNAME);
// Build path to file.
decl String:filepath[PLATFORM_MAX_PATH];
BuildPath(Path_SM, filepath, PLATFORM_MAX_PATH, SAYHOOKS_CORE_KVPATH);
// Load kv into memory.
new bool:success = FileToKeyValues(kvCore, filepath);
// If the file couldn't be loaded, then return the default value.
if (!success)
{
strcopy(trigger, maxlen, SAYHOOKS_CHAT_PUBLIC_DEFAULT);
// Close the handle.
CloseHandle(kvCore);
return;
}
// Rewind and find value.
KvRewind(kvCore);
KvGetString(kvCore, "PublicChatTrigger", trigger, maxlen, SAYHOOKS_CHAT_PUBLIC_DEFAULT);
// If trigger is disabled, then display as "N/A".
if (!trigger[0])
{
strcopy(trigger, maxlen, "N/A");
}
// Close the handle.
CloseHandle(kvCore);
}
/**
* Hack function to get the silent chat trigger value.
*
* @param trigger The string to store value in.
* @param maxlen The maximum length of the string.
*/
SayHooksGetSilentChatTrigger(String:trigger[], maxlen)
{
// Create kv handle.
new Handle:kvCore = CreateKeyValues(SAYHOOKS_CORE_KVNAME);
// Build path to file.
decl String:filepath[PLATFORM_MAX_PATH];
BuildPath(Path_SM, filepath, PLATFORM_MAX_PATH, SAYHOOKS_CORE_KVPATH);
// Load kv into memory.
new bool:success = FileToKeyValues(kvCore, filepath);
// If the file couldn't be loaded, then return the default value.
if (!success)
{
strcopy(trigger, maxlen, SAYHOOKS_CHAT_SILENT_DEFAULT);
// Close the handle.
CloseHandle(kvCore);
return;
}
// Rewind and find value.
KvRewind(kvCore);
KvGetString(kvCore, "SilentChatTrigger", trigger, maxlen, SAYHOOKS_CHAT_SILENT_DEFAULT);
// If trigger is disabled, then display as "N/A".
if (!trigger[0])
{
strcopy(trigger, maxlen, "N/A");
}
// Close the handle.
CloseHandle(kvCore);
}