print msg in chat when poked
This commit is contained in:
parent
50753f8b44
commit
3947cfcce2
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user