Notice to all users

We are migrating towards a new forum system located at, as such this forum will become read-only on January 29, 2020

Results 1 to 4 of 4
  1. #1
    Join Date
    December 2015

    [Request] Automated Responding to Pokes

    Hi all, I just made an account so please excuse me for any mishaps or misunderstandings. If I am posting in the wrong forum please let me know and I'll promptly remove this.

    So just for reference, I am an admin for a specific gaming community. It is my duty to help the players and make sure they have a good experience. Part of my duty is to be on teamspeak and resolve any issues that may happen.

    MY PROBLEM: I am constantly annoyed, poked, messaged, and bothered by other players in the teamspeak when I am busy. I may be busy for various reasons, however these people will constantly pester me until I address them.

    I am looking for some sort of script/plugin that can automatically reply to people who poke me. Any thoughts or Ideas? I did some searching around here and found some old posts about people in a similar situation as mine.

    I already have the Lua Plugin installed,

    Here is some code that I found on the forums:

    local count = {} --To keep track of poke count.
    local haspoked = {} --To index individual users.
    local poketime = {} --To save poke times.
    local maxpokes = 3 --Max number of pokes.
    local maxtime = 180 --Interval in seconds in which the pokes will be accounted for.
    local doreply = "y"
    local recmsg = "Received your poke! Please don't poke me again, I'll respond whenever I can." --Message to be sent on poke receival.
    local kickmsg = "Don't abuse pokes!" --Message to be sent with kick.
    local function onClientPokeEvent(serverConnectionHandlerID, pokerID, pokerName, message, ffIgnored)
    	if (pokerID ~= haspoked[pokerID]) then --Checks if there's a "record" of the poker
    			haspoked[pokerID] = pokerID --Creates a record
    			count[pokerID] = 1 --Sets his poke count to one
    			poketime[pokerID] = os.time() --Records the time of first poke
    			if (doreply == "y") then
    				ts3.requestSendPrivateTextMsg(serverConnectionHandlerID, recmsg, pokerID) --Send message back.
    	elseif(pokerID == haspoked[pokerID])then --If there is a record already
    		  if (count[pokerID] >= maxpokes and os.difftime(poketime[pokerID],os.time()) <= maxtime) then --If the poker has poked over -maxpokes- times under maxtime interval.
    			  ts3.requestClientKickFromServer(serverConnectionHandlerID,pokerID, kickmsg) --Kick poker with message.
    			  poketime[pokerID] = os.time() --Reset timer.
    				if(os.difftime(poketime[pokerID],os.time()) > maxtime) then --If the interval between pokes is greater than maxtime.
    					poketime[pokerID] = os.time --Reset timer.
    				if (doreply == "y")then
    				  ts3.requestSendPrivateTextMsg(serverConnectionHandlerID, recmsg, pokerID) --Sends message.
    				count[pokerID] = count[pokerID]+1 --Increments poke count for the user.
    local registeredEvents = {
    	onClientPokeEvent = onClientPokeEvent
    ts3RegisterModule("AutoReply", registeredEvents)
    However, the person that posted this said that it was incomplete/obsolete. I thought this would work but after some testing, I got nothing.

  2. #2
    Join Date
    May 2011
    Hope this is what your looking for
    create folder in lua_plugins called "autopm", add files below

    require("ts3init")            -- Required for ts3RegisterModule
    local MODULE_NAME = "AutoPM"
    local registeredEvents = {
    	onClientPokeEvent  = pm_events.onClientPokeEvent,
    ts3RegisterModule(MODULE_NAME, registeredEvents)
    local function onClientPokeEvent(serverConnectionHandlerID, pokerID, pokerName, message, ffIgnored)
        apmPokeEvent(serverConnectionHandlerID, pokerID, pokerName, message)
        return 0
    pm_events = {
      onClientPokeEvent = onClientPokeEvent
    -- Message to respond back with
    -- %n = Poker Name
    local response = "Hello %n, I am currently busy and will be with you shortly"
    -- 0 = pm, 1 = poke
    local type = 1
    ------------          IGNORE BELOW                             ----------------
    function apmPokeEvent(serverConnectionHandlerID, pokerID, pokerName, message)
      if string.find(response, "%%n") then
        response = response:gsub("%%n", pokerName)
      if type == 0 then
        ts3.requestSendPrivateTextMsg(serverConnectionHandlerID, response, pokerID)
      elseif type >= 1 then
        ts3.requestClientPoke(serverConnectionHandlerID, pokerID, response)

  3. #3
    Join Date
    January 2010
    Phoenix, AZ
    Look ar pmwatch.

    You could remove the ability of users to poke you and just let them pm you.

    pmwatch plays a different sound to let you know it's a pm instead of a message in the current channel.

    I made it because I had many people pm'ing me and they would scroll off the side where I couldn't see them.

    It also consolidates the poke messages into a single text tab.

  4. #4
    Join Date
    January 2016


    How can i sed automaticaly one message to anyone who send me a poke?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 65
    Last Post: November 26th, 2017, 12:39 PM
  2. already possible: Feature Request: Save pokes to client log
    By MoleMan in forum Suggestions and Feedback
    Replies: 4
    Last Post: November 16th, 2013, 08:53 PM
  3. [request] Scripts, that kicks an user, when he pokes me
    By Creativeee in forum Client Plugins / Lua Scripts
    Replies: 3
    Last Post: March 17th, 2011, 06:07 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts