Cathook on Arch

This commit is contained in:
TotallyNotElite 2018-07-15 14:19:40 +02:00
parent d1d0519e49
commit 3d7842033f
3 changed files with 9 additions and 19 deletions

View File

@ -5,11 +5,13 @@ rm ../install-all # remove install file
#
# Install base Dependencies
#
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
sudo apt update
sudo apt install build-essential git gcc-multilib g++-multilib software-properties-common gcc-snapshot g++-7-multilib gcc-7 g++-7 libssl-dev:i386 libboost-all-dev libc6-dev:i386 gdb libsdl2-dev libglew-dev:i386 libglew-dev libfreetype6-dev libfreetype6-dev:i386 cmake libpng-dev libssl-dev cmake gcc-multilib g++-multilib -y
if [ -f "/etc/arch-release" ]; then
sudo pacman -S --needed --noconfirm boost cmake make lib32-openssl lib32-libpng gcc gdb lib32-sdl2 lib32-glew freetype2
else
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
sudo apt update
sudo apt install build-essential git gcc-multilib g++-multilib software-properties-common gcc-snapshot g++-7-multilib gcc-7 g++-7 libssl-dev:i386 libboost-all-dev libc6-dev:i386 gdb libsdl2-dev libglew-dev:i386 libglew-dev libfreetype6-dev libfreetype6-dev:i386 cmake libpng-dev libssl-dev cmake gcc-multilib g++-multilib -y
fi
#
# Update cathook
#

View File

@ -22,7 +22,7 @@ static CatVar chat_filter(CV_STRING, "chat_censor", "", "Censor words",
"said, seperate with commas");
static CatVar chat_filter_enabled(CV_SWITCH, "chat_censor_enabled", "0",
"Enable censor", "Censor Words in chat");
std::string clear = "";
const std::string clear = "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n";
std::string lastfilter{};
std::string lastname{};
@ -177,12 +177,6 @@ DEFINE_HOOKED_METHOD(DispatchUserMessage, bool, void *this_, int type,
break;
if (boost::contains(message2, filter))
{
if (clear == "")
{
for (int i = 0; i < 120; i++)
clear += "\n";
}
*bSendPackets = true;
chat_stack::Say(". " + clear, true);
retrun = true;
@ -210,12 +204,6 @@ DEFINE_HOOKED_METHOD(DispatchUserMessage, bool, void *this_, int type,
break;
if (boost::contains(message2, filter))
{
if (clear == "")
{
clear = "";
for (int i = 0; i < 120; i++)
clear += "\n";
}
*bSendPackets = true;
chat_stack::Say(". " + clear, true);
retrun = true;

View File

@ -10,7 +10,7 @@
#include <glez/glez.hpp>
#include <glez/draw.hpp>
#include <GL/glew.h>
#include <SDL_video.h>
#include <SDL2/SDL_video.h>
#include <SDLHooks.hpp>
#if EXTERNAL_DRAWING
#include "xoverlay.h"