added forward for the connect message so stoat can log it to livechat
This commit is contained in:
parent
921ae4e136
commit
b527ce5473
@ -17,6 +17,8 @@ Database g_hDatabase;
|
||||
Handle g_hCustomMessageFile;
|
||||
Handle g_hCustomMessageFile2;
|
||||
|
||||
static Handle g_hForwardConnectMessage;
|
||||
|
||||
bool g_bHideCsays[MAXPLAYERS + 1] = { false, ... };
|
||||
Handle g_hCookieHideCsays = null;
|
||||
|
||||
@ -72,6 +74,17 @@ public void OnDatabaseConnect(Database db, const char[] error, any data)
|
||||
g_hDatabase = db;
|
||||
}
|
||||
|
||||
public APLRes AskPluginLoad2(Handle myself, bool late, char [] error, int err_max)
|
||||
{
|
||||
g_hForwardConnectMessage = CreateGlobalForward("GetPlayerConnectMessage", ET_Ignore, Param_String);
|
||||
return APLRes_Success;
|
||||
}
|
||||
|
||||
public void OnPluginEnd()
|
||||
{
|
||||
CloseHandle(g_hForwardConnectMessage);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
@ -176,6 +189,7 @@ public int MenuHandler_MainMenu(Menu menu, MenuAction action, int client, int se
|
||||
delete menu;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
@ -390,6 +404,9 @@ public void GetPlayerTier(int client, int tier)
|
||||
if (!CheckCommandAccess(client, "sm_joinmsg", ADMFLAG_CUSTOM1))
|
||||
{
|
||||
CPrintToChatAll(sRawMsg);
|
||||
Call_StartForward(g_hForwardConnectMessage);
|
||||
Call_PushString(sRawMsg);
|
||||
Call_Finish();
|
||||
return;
|
||||
}
|
||||
|
||||
@ -416,6 +433,10 @@ public void GetPlayerTier(int client, int tier)
|
||||
if(StrEqual(sCustomMessage, "reset") || StrEqual(sBanned, "true"))
|
||||
{
|
||||
CPrintToChatAll(sRawMsg);
|
||||
Call_StartForward(g_hForwardConnectMessage);
|
||||
Call_PushString(sRawMsg);
|
||||
Call_Finish();
|
||||
|
||||
for(int i = 1; i <= MaxClients; i++)
|
||||
{
|
||||
if(IsClientInGame(i))
|
||||
@ -431,6 +452,10 @@ public void GetPlayerTier(int client, int tier)
|
||||
{
|
||||
Format(sFinalMessage, sizeof(sFinalMessage), "%s %s", sRawMsg, sCustomMessage);
|
||||
CPrintToChatAll(sFinalMessage);
|
||||
Call_StartForward(g_hForwardConnectMessage);
|
||||
Call_PushString(sRawMsg);
|
||||
Call_Finish();
|
||||
|
||||
for(int i = 1; i <= MaxClients; i++)
|
||||
{
|
||||
if(IsClientInGame(i))
|
||||
@ -447,6 +472,9 @@ public void GetPlayerTier(int client, int tier)
|
||||
else
|
||||
{
|
||||
CPrintToChatAll(sRawMsg);
|
||||
Call_StartForward(g_hForwardConnectMessage);
|
||||
Call_PushString(sRawMsg);
|
||||
Call_Finish();
|
||||
for(int i = 1; i <= MaxClients; i++)
|
||||
{
|
||||
if(IsClientInGame(i))
|
||||
|
||||
6
ConnectAnnounce/scripting/include/connect_announce.inc
Normal file
6
ConnectAnnounce/scripting/include/connect_announce.inc
Normal file
@ -0,0 +1,6 @@
|
||||
#if defined _connect_announce_included_
|
||||
#endinput
|
||||
#endif
|
||||
#define _connect_announce_included_
|
||||
|
||||
forward void GetPlayerConnectMessage(char[] message);
|
||||
Loading…
Reference in New Issue
Block a user