View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0004365 | Spring engine | General | public | 2014-04-19 06:12 | 2019-03-06 22:55 | ||||||||
Reporter | Jools | ||||||||||||
Assigned To | |||||||||||||
Priority | normal | Severity | feature | Reproducibility | always | ||||||||
Status | new | Resolution | open | ||||||||||
Product Version | 96.0.1+git | ||||||||||||
Target Version | Fixed in Version | ||||||||||||
Summary | 0004365: AddChatAction misses a playerID field | ||||||||||||
Description | I 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 Reproduce | N/A | ||||||||||||
Additional Information | It 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. | ||||||||||||
Tags | No tags attached. | ||||||||||||
Checked infolog.txt for Errors | |||||||||||||
Attached Files |
|
![]() |
|
sprung (reporter) 2019-02-26 20:45 |
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") |
Google_Frog (reporter) 2019-02-27 06:18 |
It would be nice if gadgets could receive chat actions with a playerID that is not easy to spoof with a widget. |
Jools (reporter) 2019-03-06 22:55 |
You realise this report is 5 years old? It's for spring 96.0 |
![]() |
|||
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 |