Init parts of several hacks in their respective init functions
Also don't push console commands but issue their init functions directly
This commit is contained in:
parent
6ca2300875
commit
c27027f937
@ -348,8 +348,6 @@ free(logname);*/
|
||||
auto extra_exec = std::getenv("CH_EXEC");
|
||||
if (extra_exec)
|
||||
hack::command_stack().push(extra_exec);
|
||||
hack::command_stack().push("cat_killsay_reload");
|
||||
hack::command_stack().push("cat_spam_reload");
|
||||
|
||||
hack::initialized = true;
|
||||
for (int i = 0; i < 12; i++)
|
||||
|
@ -167,6 +167,7 @@ static CatCommand reload_command("killsay_reload", "Reload killsays", []() { rel
|
||||
|
||||
void init()
|
||||
{
|
||||
reload();
|
||||
g_IEventManager2->AddListener(&listener, (const char *) "player_death", false);
|
||||
}
|
||||
|
||||
|
@ -234,12 +234,6 @@ bool FormatSpamMessage(std::string &message)
|
||||
return SubstituteQueries(message);
|
||||
}
|
||||
|
||||
void init()
|
||||
{
|
||||
spam_source.installChangeCallback([](settings::VariableBase<int> &var, int after) { file.Load(*filename); });
|
||||
filename.installChangeCallback([](settings::VariableBase<std::string> &var, std::string after) { file.TryLoad(after); });
|
||||
}
|
||||
|
||||
void createMove()
|
||||
{
|
||||
IF_GAME(IsTF2())
|
||||
@ -377,6 +371,13 @@ bool isActive()
|
||||
return bool(spam_source);
|
||||
}
|
||||
|
||||
void init()
|
||||
{
|
||||
spam_source.installChangeCallback([](settings::VariableBase<int> &var, int after) { file.Load(*filename); });
|
||||
filename.installChangeCallback([](settings::VariableBase<std::string> &var, std::string after) { file.TryLoad(after); });
|
||||
reloadSpamFile();
|
||||
}
|
||||
|
||||
const std::vector<std::string> builtin_default = { "Cathook - more fun than a ball of yarn!", "GNU/Linux is the best OS!", "Visit https://github.com/nullworks/cathook for more information!", "Cathook - Free and Open-Source tf2 cheat!", "Cathook - ca(n)t stop me meow!" };
|
||||
const std::vector<std::string> builtin_lennyfaces = { "( ͡° ͜ʖ ͡°)", "( ͡°( ͡° ͜ʖ( ͡° ͜ʖ ͡°)ʖ ͡°) ͡°)", "ʕ•ᴥ•ʔ", "(▀̿Ĺ̯▀̿ ̿)", "( ͡°╭͜ʖ╮͡° )", "(ง'̀-'́)ง", "(◕‿◕✿)", "༼ つ ͡° ͜ʖ ͡° ༽つ" };
|
||||
const std::vector<std::string> builtin_blanks = { ". \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n " };
|
||||
|
Reference in New Issue
Block a user