1. Wulf

    Wulf Community Admin

    Wulf submitted a new resource:

    Natives - Allows only players from the server's country to join

    Read more about this resource...
     
  2. Awesome...glad to see webrequest example...thanks Wulf!
     
  3. Wulf

    Wulf Community Admin

    No problem, I did have a little bit of help though! :p

    Lots more on the way too!
     
  4. I have to resurrect my private profile blocker, etc...and I need to send my log data to webservices, etc...so this is really helpful. I saw the webrequest in the hooks update on github...thanks again.[DOUBLEPOST=1414114807][/DOUBLEPOST]
    Have you guys ever thought about integrating the Oxide core to this:

    http://signalr.net
     
  5. Hi,

    Don't work for me
    Code:
        7:27 PM [Info] Loaded plugin Natives (v0.1.0) by Luke Spragg / Wulf
        7:27 PM [Error] Failed to initialise plugin natives ([string "natives.lua"]:15: attempt to index global 'webrequests' (a nil value))
        7:27 PM [Debug]   at NLua.Lua.ThrowExceptionFromError (Int32 oldTop) [0x00000] in <filename unknown>:0
          at NLua.Lua.CallFunction (System.Object function, System.Object[] args, System.Type[] returnTypes) [0x00000] in <filename unknown>:0
          at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception&)
          at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
    Server v164, oxide build 21 (20142110)
     
  6. Wulf

    Wulf Community Admin

    Your server is using an outdated version of Oxide that doesn't have webrequests in it. Get the newest from https://github.com/github.com/OxideMod/Snapshots. The snapshots were moved to the main repo, so the build numbering is slightly off.
     
  7. Oops, sorry

    It is possible to manually set several countries in the white list for the next version?
    if country ~= homeland or whitelist then
     
    Last edited by a moderator: Oct 25, 2014
  8. Wulf

    Wulf Community Admin

  9. very nice Wulf!
     
  10. If there was a way to use this to block certain countries, that would be even more amazing. Say... block Russia and China.
     
  11. Wulf

    Wulf Community Admin

    I'm making a separate one to block specific countries. This one is meant to be drop-in without any required configuration.
     
  12. Gotcha. Hopefully people pay attention if their server is located in Montreal, and they live in USA. :p
     
  13. Wulf

    Wulf Community Admin

    Well, hopefully they know where it's from, especially since it shows it in the server log.
     
  14. So I just tested this, and I get this:
    Code:
    5:01 AM [Info] [Natives] Getting country for server failed!
    5:02 AM [Info] [Natives] sendjes connected from DK
    5:02 AM [Info] [Natives] sendjes kicked for not being from the homeland, DK!
    
     
  15. Wulf

    Wulf Community Admin

    What version are you using?
     
  16. Wulf

    Wulf Community Admin

    Could you set debug to true in the .lua file, and then see what the shows for "Server's IP" in the log please?
     
  17. First error I got I was running on my server, and now I tried running server and client on the same machine, result with debug true:
    Code:
    5:57 AM [Info] [Natives] Server's IP: 0.0.0.0
    5:57 AM [Info] [Natives] Getting country for server failed!
    5:58 AM [Info] [Natives] Player's IP: 127.0.0.1
    5:58 AM [Info] [Natives] Checking country failed for sendjes!
    
     
  18. Wulf

    Wulf Community Admin

    I can't seem to reproduce it. Are you setting server.ip in your command-line?
     
  19. Nope, my commandline is:
    Code:
    Start RustDedicated.exe -batchmode -load +server.hostname "NAME" +server.port 28015 +server.identity "NAME" +server.seed 6738 +server.maxplayers 20 +rcon.port 28016 +rcon.password "PASSWORD" -logfile rust.log