|
1 | 1 | #pragma semicolon 1
|
2 | 2 |
|
3 | 3 | #define PLUGIN_AUTHOR "RumbleFrog, SourceBans++ Dev Team"
|
4 |
| -#define PLUGIN_VERSION "1.0.2" |
| 4 | +#define PLUGIN_VERSION "1.0.3" |
5 | 5 |
|
6 | 6 | #include <sourcemod>
|
7 | 7 | #include <sourcebanspp>
|
@@ -37,17 +37,17 @@ public void OnPluginStart()
|
37 | 37 | Convars[Ban] = CreateConVar("sbpp_discord_banhook", "", "Discord web hook endpoint for ban forward", FCVAR_PROTECTED);
|
38 | 38 | Convars[Report] = CreateConVar("sbpp_discord_reporthook", "", "Discord web hook endpoint for report forward. If left empty, the ban endpoint will be used instead", FCVAR_PROTECTED);
|
39 | 39 |
|
40 |
| - FindConVar("hostname").GetString(sHostname, sizeof sHostname); |
41 |
| - |
42 |
| - int iIPB = FindConVar("hostip").IntValue; |
43 |
| - Format(sHost, sizeof sHost, "%d.%d.%d.%d:%d", iIPB >> 24 & 0x000000FF, iIPB >> 16 & 0x000000FF, iIPB >> 8 & 0x000000FF, iIPB & 0x000000FF, FindConVar("hostport").IntValue); |
44 |
| - |
45 | 40 | Convars[Ban].AddChangeHook(OnConvarChanged);
|
46 | 41 | Convars[Report].AddChangeHook(OnConvarChanged);
|
47 | 42 | }
|
48 | 43 |
|
49 | 44 | public void OnConfigsExecuted()
|
50 | 45 | {
|
| 46 | + FindConVar("hostname").GetString(sHostname, sizeof sHostname); |
| 47 | + |
| 48 | + int iIPB = FindConVar("hostip").IntValue; |
| 49 | + Format(sHost, sizeof sHost, "%d.%d.%d.%d:%d", iIPB >> 24 & 0x000000FF, iIPB >> 16 & 0x000000FF, iIPB >> 8 & 0x000000FF, iIPB & 0x000000FF, FindConVar("hostport").IntValue); |
| 50 | + |
51 | 51 | Convars[Ban].GetString(sEndpoints[Ban], sizeof sEndpoints[]);
|
52 | 52 | Convars[Report].GetString(sEndpoints[Report], sizeof sEndpoints[]);
|
53 | 53 | }
|
|
0 commit comments