This commit is contained in:
Niklas 2020-09-04 21:34:07 +02:00
parent 8fad6195b7
commit 595946a4a2
2 changed files with 7 additions and 4 deletions

2
.gitignore vendored
View File

@ -1,3 +1,5 @@
/_obj
*.o
*.a
*.so
tsgo_export.h

View File

@ -1,6 +1,7 @@
package main
// #cgo CFLAGS: -I../../ts3client-pluginsdk/include -I../c
// #cgo LDFLAGS: -Wl,-unresolved-symbols=ignore-all
// #include <stdlib.h>
// #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
}