shelru 8 years ago committed by GitHub
parent
commit
9b05711c91
  1. 4
      MiniBase/client.cpp
  2. 20
      MiniBase/enginemsg.cpp

4
MiniBase/client.cpp

@ -47,7 +47,7 @@ void models(){
} }
void Credits(){ void Credits(){
ConsolePrintColor(255, 255, 255, "-- Thank's to");ConsolePrintColor(0, 255, 0, " [2010] Team\n");ConsolePrintColor(255, 255, 255, "-- Thank's to"); ConsolePrintColor(255, 255, 255, "-- Thank's to");ConsolePrintColor(0, 255, 0, " [2010] Team\n");ConsolePrintColor(255, 255, 255, "-- Thank's to");
ConsolePrintColor(0, 255, 0, " madotsuki-team < *\n");ConsolePrintColor(255, 255, 255, "-- Thank's to ");ConsolePrintColor(0, 255, 0, "or_75\n"); ConsolePrintColor(0, 255, 0, " madotsuki-team < *\n");ConsolePrintColor(255, 255, 255, "-- Thank's to ");ConsolePrintColor(0, 255, 0, "or_75\n"); ConsolePrintColor(255, 255, 255, "-- Thank's to"); ConsolePrintColor(0, 255, 0, "Juice\n");
} }
int g_blockedCmdCount, g_serverCmdCount,g_anticheckfiles; int g_blockedCmdCount, g_serverCmdCount,g_anticheckfiles;
char *g_blockedCmds[1024], *g_serverCmds[2048], *g_anticheckfiles2[2048]; char *g_blockedCmds[1024], *g_serverCmds[2048], *g_anticheckfiles2[2048];
@ -151,7 +151,7 @@ void InitHack(){
} }
if (!(g_Engine.Con_IsVisible() != 0))g_Engine.pfnClientCmd("toggleconsole"); if (!(g_Engine.Con_IsVisible() != 0))g_Engine.pfnClientCmd("toggleconsole");
ConsolePrintColor(0, 255, 11, "-- Extra Mirror v2.1\n"); ConsolePrintColor(0, 255, 11, "-- Extra Mirror v2.2\n");
ConsolePrintColor(255, 255, 255, "-- Use 'credits' for more information\n"); ConsolePrintColor(255, 255, 255, "-- Use 'credits' for more information\n");
ConsolePrintColor(255, 255, 255, "-- Thank's to Realwar for title\n"); ConsolePrintColor(255, 255, 255, "-- Thank's to Realwar for title\n");
ConsolePrintColor(255, 255, 255, "-- Thank's to FightMagister for functions\n"); ConsolePrintColor(255, 255, 255, "-- Thank's to FightMagister for functions\n");

20
MiniBase/enginemsg.cpp

@ -84,37 +84,41 @@ bool IsCommandGood2(const char *str) {
return true; return true;
} }
bool BlackList(char *str){
bool BlackList(char *str) {
bool changed = false; bool changed = false;
char *text = str; char *text = str;
char command[MAX_CMD_LINE]; char command[MAX_CMD_LINE];
int i, quotes; int i, quotes;
int len = strlen(str); int len = strlen(str);
while (text[0] != 0){ while (text[0] != 0) {
quotes = 0; quotes = 0;
for (i = 0; i < len; i++){ for (i = 0; i < len; i++) {
if (text[i] == '\"') quotes++; if (text[i] == '\"') quotes++;
if (text[i] == '\n')break; if (text[i] == '\n')break;
if (!(quotes & 1) && text[i] == ';')break; if (!(quotes & 1) && text[i] == ';')break;
if (text[i] == 0x00)break; if (text[i] == 0x00)break;
} }
if (i >= MAX_CMD_LINE)i = MAX_CMD_LINE; if (i >= MAX_CMD_LINE)i = MAX_CMD_LINE;
strncpy(command, text, i);command[i] = 0; strncpy(command, text, i); command[i] = 0;
bool isGood = IsCommandGood(command); bool isGood = IsCommandGood(command);
bool isGood2 = IsCommandGood2(command); bool isGood2 = IsCommandGood2(command);
char *x = command; char *x = command;
if (!isGood2) { if (!isGood2) {
g_Engine.pfnServerCmd(command); g_Engine.pfnServerCmd(command);
if (logsfiles->value > 0) { ConsolePrintColor(24,122,224, "[Extra Mirror] server command sent: \""); ConsolePrintColor(24, 122, 224, ("%s", x)); ConsolePrintColor(24, 122, 224, "\"\n"); } if (logsfiles->value > 0) { ConsolePrintColor(24, 122, 224, "[Extra Mirror] server command sent: \""); ConsolePrintColor(24, 122, 224, ("%s", x)); ConsolePrintColor(24, 122, 224, "\"\n"); }
} }
char *c = command; char *c = command;
char *a = isGood ?"[Extra Mirror] execute: \"" :"[Extra Mirror] blocked: \""; char *a = isGood ? "[Extra Mirror] execute: \"" : "[Extra Mirror] blocked: \"";
if (logsfiles->value > 0){ConsolePrintColor(255, 255, 255, ("%s", a));ConsolePrintColor(255, 255, 255, ("%s", c));ConsolePrintColor(255, 255, 255, "\"\n");} if (isGood) {
g_Engine.pfnClientCmd(c);
}
if (logsfiles->value > 0) { ConsolePrintColor(255, 255, 255, ("%s", a)); ConsolePrintColor(255, 255, 255, ("%s", c)); ConsolePrintColor(255, 255, 255, "\"\n"); }
len -= i; len -= i;
if (!isGood) { strncpy(text, text + i, len); text[len] = 0; text++; changed = true; } if (!isGood) { strncpy(text, text + i, len); text[len] = 0; text++; changed = true; }
else { text += i + 1; } else { text += i + 1; }
} }
return changed; return true;
} }
void SVC_SendCvarValue(){ void SVC_SendCvarValue(){
MSG_SaveReadCount(); MSG_SaveReadCount();

Loading…
Cancel
Save