Heres simple example:
When i'm typing /testget or/and /testpost it works just fine and return "TEST GET CODE 200!" for example.Code:// Reference: Oxide.Ext.Rust using Oxide.Core; using Oxide.Core.Plugins; using Oxide.Core.Libraries;namespace Oxide.Plugins { [Info("Test Get", "AlexALX", "0.0.1")] public class TestGet : RustPlugin { private WebRequests webrequests = Interface.Oxide.GetLibrary<WebRequests>("WebRequests"); [ChatCommand("testget")] void cmdTest(BasePlayer player, string command, string[] args) { webrequests.EnqueueGet("http://rustoxide.com/", (code, response) => player.ChatMessage("TEST GET CODE "+code.ToString()+"!") , this); } [ChatCommand("testpost")] void cmdTestPost(BasePlayer player, string command, string[] args) { webrequests.EnqueuePost("http://rustoxide.com/", "", (code, response) => player.ChatMessage("TEST POST CODE "+code.ToString()+"!") , this); } } }
When i'm unload or reload plugin after i typed /testget it repeat webrequest again and write again "TEST GET CODE 200!". If i was used /testget and /testpost - it writting both messages on unload. If i used this command multiple times - on unload they all repeats in same way (5 times for example).
So whats wrong? Is this my code wrong or something with webrequests itself?
Fixed WebRequest repeat all requests on unload
Discussion in 'Rust Discussion' started by AlexALX_[rus-ua], Apr 18, 2015.
-
same problem here
thx for noticing
[DOUBLEPOST=1429362068][/DOUBLEPOST]Actually .. it's just the message that shows again
because on RUSTDB if the player is already banned it tells you.
So only the response is shown again, the webrequest isnt sent again:
-
Wulf Community Admin
It's fixed in a PR, just waiting for Travis to stop acting up.
-
Ok thank you, sadly that i should apply commits manually, because of http://oxidemod.org/threads/server-identity-not-being-detected-on-wine-for-linux.7802/