diff --git a/src/go/tsgo/tsgo.go b/src/go/tsgo/tsgo.go index 252c65b..c324f2a 100644 --- a/src/go/tsgo/tsgo.go +++ b/src/go/tsgo/tsgo.go @@ -1,5 +1,10 @@ package tsgo +import ( + "fmt" + "time" +) + type AnyId uint16 type PluginMessageTarget int @@ -39,6 +44,16 @@ func Ts3pluginShutdown() { // Ts3onClientPokeEvent event func Ts3onClientPokeEvent(serverConnectionHandlerID uint64, fromClientID AnyId, pokerName string, pokerUniqueIdentity string, message string, ffIgnored int) int { - Ts3Functions.PrintMessage(serverConnectionHandlerID, "Ayy", PLUGIN_MESSAGE_TARGET_SERVER) + + // TODO add correct color and icon + msg := fmt.Sprintf("[color=blue]<%s> [URL=client://%d/%s]\"%s\"[/URL] pokes you", time.Now().Format("15:04:05"), fromClientID, pokerUniqueIdentity, pokerName) + + if message != "" { + msg += ": " + message + } + + msg += "[/color]" + + Ts3Functions.PrintMessage(serverConnectionHandlerID, msg, PLUGIN_MESSAGE_TARGET_SERVER) return 1 }