diff --git a/.gitignore b/.gitignore index 6a5ccf0..22fa04f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ /_obj *.o +*.a +*.so tsgo_export.h \ No newline at end of file diff --git a/src/go/tsgo_export.go b/src/go/tsgo_export.go index b3788d4..988507a 100644 --- a/src/go/tsgo_export.go +++ b/src/go/tsgo_export.go @@ -1,6 +1,7 @@ package main // #cgo CFLAGS: -I../../ts3client-pluginsdk/include -I../c +// #cgo LDFLAGS: -Wl,-unresolved-symbols=ignore-all // #include // #include "teamspeak/public_errors.h" // #include "teamspeak/public_errors_rare.h" @@ -8,7 +9,7 @@ package main // #include "teamspeak/public_rare_definitions.h" // #include "teamspeak/clientlib_publicdefinitions.h" // #include "plugin_definitions.h" -// #include "ts3FunctionsWrapper.h" +// extern void Ts3FncPrintMessage(uint64 serverConnectionHandlerID, const char* message, enum PluginMessageTarget messageTarget); import "C" import ( tsgo "./tsgo" @@ -60,7 +61,7 @@ func GoTs3pluginShutdown() { */ //export GoTs3onClientPokeEvent -func GoTs3onClientPokeEvent(serverConnectionHandlerID uint64, fromClientID C.anyID, pokerName *C.char, pokerUniqueIdentity *C.char, message *C.char, ffIgnored int) int { - C.Ts3FncPrintMessage(serverConnectionHandlerID, C.CString(""), C.PLUGIN_SERVER) - return 0 +func GoTs3onClientPokeEvent(serverConnectionHandlerID C.uint64, fromClientID C.anyID, pokerName *C.char, pokerUniqueIdentity *C.char, message *C.char, ffIgnored int) C.int { + C.Ts3FncPrintMessage(serverConnectionHandlerID, C.CString("Ayyyy"), C.PLUGIN_SERVER) + return 1 }