Skip to content

Commit 6e60830

Browse files
authored
Merge pull request #11 from vadrozh/dev
Fastfix
2 parents 71501cb + 831010a commit 6e60830

File tree

9 files changed

+11
-609
lines changed

9 files changed

+11
-609
lines changed

plugins/WarnSystem.smx

-20 Bytes
Binary file not shown.

plugins/disabled/WS_Sourcebans.smx

-389 Bytes
Binary file not shown.

scripting/WS_Sourcebans.sp

Lines changed: 8 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,7 @@ ConVar g_cSbType;
99

1010
public Plugin myinfo =
1111
{
12-
<<<<<<< HEAD
13-
name = "[WS] Sourcebans Support",
14-
=======
1512
name = "[WarnSystem] Sourcebans support (all version)",
16-
>>>>>>> release
1713
author = "vadrozh, Rabb1t",
1814
description = "Module adds support of sb (all)",
1915
version = "1.1",
@@ -39,51 +35,35 @@ public void OnCvarChanged(ConVar hCvar, const char[] szOV, const char[] szNV) {
3935
}
4036
}
4137

42-
public void OnLibraryAdded(const char[] sName) {SetPluginDetection(sName);}
38+
/*public void OnLibraryAdded(const char[] sName) {SetPluginDetection(sName);}
4339
4440
public void OnLibraryRemoved(const char[] sName){SetPluginDetection(sName);}
4541
4642
void SetPluginDetection(const char[] sName) {
47-
<<<<<<< HEAD
48-
if (!StrEqual(sName, "sourcebans") || !StrEqual(sName, "materialadmin"))
49-
=======
50-
if (!StrEqual(sName, "sourcebans") || !StrEqual(sName, "materialadmin"))
51-
>>>>>>> release
52-
SetFailState("Can't find MaterialAdmin or SourceBans++ or SourceBans(Old).");
53-
}
43+
if (!StrEqual(sName, "sourcebans"))
44+
SetFailState("Can't find SourceBans++ or SourceBans(Old).");
45+
else if(!StrEqual(sName, "materialadmin"))
46+
SetFailState("Can't find MaterialAdmin.");
47+
}*/
5448

5549
public Action WarnSystem_WarnPunishment(int iAdmin, int iClient, int iBanLenght, char sReason[129])
5650
{
57-
<<<<<<< HEAD
58-
switch(g_iSbType){
59-
=======
6051
switch(g_iSbType){
61-
>>>>>>> release
6252
case 1: MABanPlayer(iAdmin, iClient, MA_BAN_STEAM, iBanLenght, sReason);
6353
case 2: SourceBans_BanPlayer(iAdmin, iClient, iBanLenght, sReason);
6454
case 3: SBBanPlayer(iAdmin, iClient, iBanLenght, sReason);
6555
}
66-
<<<<<<< HEAD
56+
6757
return Plugin_Handled;
68-
=======
69-
return Plugin_Handled;
70-
>>>>>>> release
7158
}
7259

7360
public Action WarnSystem_WarnMaxPunishment(int iAdmin, int iClient, int iBanLenght, char sReason[129])
7461
{
75-
<<<<<<< HEAD
76-
switch(g_iSbType){
77-
=======
7862
switch(g_iSbType){
79-
>>>>>>> release
8063
case 1: MABanPlayer(iAdmin, iClient, MA_BAN_STEAM, iBanLenght, sReason);
8164
case 2: SourceBans_BanPlayer(iAdmin, iClient, iBanLenght, sReason);
8265
case 3: SBBanPlayer(iAdmin, iClient, iBanLenght, sReason);
8366
}
84-
<<<<<<< HEAD
67+
8568
return Plugin_Handled;
86-
=======
87-
return Plugin_Handled;
88-
>>>>>>> release
8969
}

scripting/WarnSystem.sp

Lines changed: 0 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,9 @@
11
//---------------------------------DEFINES--------------------------------
22
#pragma semicolon 1
33

4-
<<<<<<< HEAD
54
#define PLUGIN_NAME "[WarnSystem] Core"
65
#define PLUGIN_AUTHOR "vadrozh, Rabb1t"
76
#define PLUGIN_VERSION "1.4"
8-
=======
9-
#define PLUGIN_NAME "WarnSystem"
10-
#define PLUGIN_AUTHOR "vadrozh, Rabb1t"
11-
#define PLUGIN_VERSION "1.3"
12-
>>>>>>> release
137
#define PLUGIN_DESCRIPTION "Warn players when they're doing something wrong"
148
#define PLUGIN_URL "hlmod.ru/threads/warnsystem.42835/"
159

@@ -24,34 +18,10 @@
2418
#undef REQUIRE_PLUGIN
2519
#undef REQUIRE_EXTENSIONS
2620
#tryinclude <adminmenu>
27-
<<<<<<< HEAD
2821
#tryinclude <SteamWorks>
2922
#define REQUIRE_PLUGINS
3023
#define REQUIRE_EXTENSIONS
3124

32-
=======
33-
#define REQUIRE_PLUGINS
34-
#define REQUIRE_EXTENSIONS
35-
36-
/*#tryinclude "WarnSystem/stats.sp"
37-
#ifdef __stats_included
38-
#undef REQUIRE_PLUGIN
39-
#undef REQUIRE_EXTENSIONS
40-
#tryinclude <SteamWorks>
41-
#tryinclude <socket>
42-
#tryinclude <cURL>
43-
#define REQUIRE_PLUGINS
44-
#define REQUIRE_EXTENSIONS
45-
46-
#define APIKEY "ddbfc98bf3d2f66a639ca538f75a2de6"
47-
#define PLUGIN_STATS_REQURL "http://stats.scriptplugs.info/add_server.php"
48-
#define PLUGIN_STATS_DOMAIN "stats.scriptplugs.info"
49-
#define PLUGIN_STATS_SCRIPT "add_server.php"
50-
#endif */
51-
52-
#pragma newdecls required
53-
#define LogWarnings(%0) LogToFileEx(g_sLogPath, %0)
54-
>>>>>>> release
5525
//----------------------------------------------------------------------------
5626

5727
char g_sPathWarnReasons[PLATFORM_MAX_PATH], g_sPathUnwarnReasons[PLATFORM_MAX_PATH],
@@ -66,7 +36,6 @@ int g_iWarnings[MAXPLAYERS+1], g_iPrintToAdminsOverride, g_iUserID[MAXPLAYERS+1]
6636
#define LogWarnings(%0) LogToFileEx(g_sLogPath, %0)
6737
#define LogQuery(%0) LogToFileEx(g_szQueryPath, %0)
6838

69-
<<<<<<< HEAD
7039
#if defined _SteamWorks_Included
7140
#include "WarnSystem/stats.sp"
7241
#endif
@@ -75,8 +44,6 @@ int g_iWarnings[MAXPLAYERS+1], g_iPrintToAdminsOverride, g_iUserID[MAXPLAYERS+1]
7544

7645

7746

78-
=======
79-
>>>>>>> release
8047
#include "WarnSystem/convars.sp"
8148
#include "WarnSystem/api.sp"
8249
#include "WarnSystem/database.sp"
@@ -116,17 +83,11 @@ public void OnPluginStart()
11683
InitializeDatabase();
11784
InitializeCommands();
11885

119-
<<<<<<< HEAD
12086
#if defined _SteamWorks_Included
12187
// Stats work
12288
if (LibraryExists("SteamWorks"))
12389
SteamWorks_SteamServersConnected();
12490
#endif
125-
=======
126-
/*#ifdef __stats_included
127-
InitializeStats();
128-
#endif */
129-
>>>>>>> release
13091

13192
if (LibraryExists("adminmenu"))
13293
{
@@ -151,43 +112,23 @@ public void OnLibraryAdded(const char[] sName)
151112
if (StrEqual(sName, "adminmenu"))
152113
if ((hAdminMenu = GetAdminTopMenu()))
153114
InitializeMenu(hAdminMenu);
154-
<<<<<<< HEAD
155-
=======
156-
/*#ifdef __stats_included
157-
STATS_OnLibraryAdded(sName);
158-
#endif*/
159-
>>>>>>> release
160115
}
161116

162117
public void OnLibraryRemoved(const char[] sName)
163118
{
164119
if (StrEqual(sName, "adminmenu"))
165120
g_hAdminMenu = INVALID_HANDLE;
166-
<<<<<<< HEAD
167-
=======
168-
/*#ifdef __stats_included
169-
STATS_OnLibraryRemoved(sName);
170-
#endif*/
171-
>>>>>>> release
172121
}
173122

174123
public void OnMapStart()
175124
{
176-
<<<<<<< HEAD
177125
#if defined _SteamWorks_Included
178126
// Stats work
179127
if (LibraryExists("SteamWorks"))
180128
SteamWorks_SteamServersConnected();
181129
#endif
182130
/*for(int iClient = 1; iClient <= MaxClients; ++iClient)
183131
LoadPlayerData(iClient);*/
184-
=======
185-
/*#ifdef __stats_included
186-
STATS_AddServer(APIKEY, PLUGIN_VERSION);
187-
#endif*/
188-
for(int iClient = 1; iClient <= MaxClients; ++iClient)
189-
LoadPlayerData(iClient);
190-
>>>>>>> release
191132
if(g_bWarnSound)
192133
{
193134
char sBuffer[PLATFORM_MAX_PATH];
@@ -212,20 +153,12 @@ public void OnAdminMenuReady(Handle hTopMenu) {InitializeMenu(hTopMenu);}
212153

213154
public void OnClientAuthorized(int iClient) {
214155
IsClientInGame(iClient) &&
215-
<<<<<<< HEAD
216156
LoadPlayerData(iClient);
217-
=======
218-
LoadPlayerData(iClient);
219-
>>>>>>> release
220157
}
221158

222159
public void OnClientPutInServer(int iClient) {
223160
IsClientAuthorized(iClient) &&
224-
<<<<<<< HEAD
225161
LoadPlayerData(iClient);
226-
=======
227-
LoadPlayerData(iClient);
228-
>>>>>>> release
229162
}
230163

231164
//---------------------------------------------------SOME FEATURES-------------------------------------------------
@@ -288,11 +221,7 @@ public void PunishPlayer(int iAdmin, int iClient, char sReason[129])
288221
ForcePlayerSuicide(iClient);
289222
CPrintToChat(iClient, " %t %t", "WS_ColoredPrefix", "WS_Message");
290223
}
291-
<<<<<<< HEAD
292224
case 4:
293-
=======
294-
case 4:
295-
>>>>>>> release
296225
PunishmentSix(iClient, iAdmin, sReason);
297226
case 5:
298227
{

0 commit comments

Comments
 (0)