2019-05-27 15:46 CEST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0004365Spring engineGeneralpublic2019-03-06 22:55
ReporterJools 
Assigned To 
PrioritynormalSeverityfeatureReproducibilityalways
StatusnewResolutionopen 
Product Version96.0.1+git 
Target VersionFixed in Version 
Summary0004365: AddChatAction misses a playerID field
DescriptionI have a gadget in xta that allows people to vote if they want to draw the game. It uses a widget for getting user input (they can start the vote with the "/draw" command), and it gets handled by TextCommand function. That function then calls a gadget function which listens to "/luarules votefordraw", which is activated through "gadgetHandler:AddChatAction" function. The problem is that the gadget has no information about called the vote. I want to be able to not allow spectators to call the vote.

To my knowledge, this is not possible with gadgetHandler:AddChatAction. I would like an additional parameter, e.g. playerID, to make this possible.
Steps To ReproduceN/A
Additional InformationIt needs to be in a gadget because it calls the Spring.GameOver function ultimately.I attack a picture of what the vote window looks like for information.
TagsNo tags attached.
Checked infolog.txt for lua Errors
Attached Files

-Relationships
+Relationships

-Notes

~0019779

sprung (reporter)

No change required? The function you pass to AddChatAction as the 2nd argument receives playerID as its own 4th argument.


function handleVoteForDraw(cmd, msg, words, playerID)
   if isSpec(playerID) then return end
   ...
end

gadgetHandler:AddChatAction("votefordraw", handleVoteForDraw, "help string")

~0019781

Google_Frog (reporter)

It would be nice if gadgets could receive chat actions with a playerID that is not easy to spoof with a widget.

~0019800

Jools (reporter)

You realise this report is 5 years old? It's for spring 96.0
+Notes

-Issue History
Date Modified Username Field Change
2014-04-19 06:12 Jools New Issue
2014-04-19 06:12 Jools File Added: screen00346.png
2019-02-26 20:45 sprung Note Added: 0019779
2019-02-27 06:18 Google_Frog Note Added: 0019781
2019-03-06 22:55 Jools Note Added: 0019800
+Issue History