1. Wulf

    Wulf Community Admin

    Already aware, but thanks. ;) I have to fix one more thing before I push the update I mentioned in my last post.
     
  2. Hey Wulf, Does this plugin still work or is it not working until your update?
     
  3. Wulf

    Wulf Community Admin

    Wulf updated Country Block with a new update entry:

    Fixed known bugs and added chat command

     
  4. Doesn´t work corectly at this time. The Messages where Displayed but no Block or Kick and i have a big error:
    Code:
    11:04 AM [Error] countryblock: Array index is out of range.
      at NLua.MetaFunctions.GetMethodInternal (LuaState luaState) [0x00000] in <filename unknown>:0
      at NLua.MetaFunctions.GetMethod (LuaState luaState) [0x00000] in <filename unknown>:0
      at (wrapper native-to-managed) NLua.MetaFunctions:GetMethod (KeraLua.LuaState)
      at (wrapper managed-to-native) KeraLua.NativeMethods:LuaNetPCall (intptr,int,int,int)
      at KeraLua.Lua.LuaNetPCall (IntPtr luaState, Int32 nArgs, Int32 nResults, Int32 errfunc) [0x00000] in <filename unknown>:0
      at NLua.LuaLib.LuaPCall (LuaState luaState, Int32 nArgs, Int32 nResults, Int32 errfunc) [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
    I Have edit in the Config DE and AT and Whitelist, s0 only this country can connect but fail.
     
  5. Wulf

    Wulf Community Admin

    I wasn't able to reproduce the error, but I think I see the issue. Update incoming.
     
  6. Wulf

    Wulf Community Admin

  7. Noch changes here the settings:
    Code:
    {
      "Settings": {
        "ChatName": "SERVER",
        "AuthLevel": 2,
        "AdminExcluded": "true",
        "ChatNameHelp": "HELP",
        "ListType": "whitelist",
        "Broadcast": "true",
        "ConsoleCommand": "country.block",
        "ChatCommand": "country",
        "CountryList": [
          "DE",
          "AT",
        ]
      },
    And here is the Log:

    6:28 PM [Info] [Country Block] ErRoR connected from DE
    6:28 PM [Info] [Country Block] ErRoR was kicked as their country (DE) is blocked!
     
  8. If i work with "Whitelist" and have "DE" in the list players from "DE" will be blocked !?!
     
  9. Wulf

    Wulf Community Admin

    Try 0.1.4.
     
  10. i have used 0.1.4.
    where can i find a list with all country codes if i search the code for eg. Swiss, Austria .....
     
  11. Wulf

    Wulf Community Admin

    http://countrycode.org/ - 2 character ones only.
     
  12. Man you have problem in this code:

    Code:
    local blacklisted, whitelisted = false, false
            for _, value in pairs(self.Config.Settings.CountryList) do
                if string.lower(self.Config.Settings.ListType) == "blacklist" then if country == value then blacklisted = true end end
                if string.lower(self.Config.Settings.ListType) == "whitelist" then if country == value then whitelisted = true end end
            end
            if blacklisted or not whitelisted then self:Deport(connection, country) end
    
    Whitelist work fine. But Blacklist dont work.

    If you see, when you use Blacklist and my country is ES and I have blocked RU, CH, blacklisted and whitelisted are false all time.

    Code:
    if blacklisted(false) or not whitelisted(true) then self:Deport(connection, country) end 
    ---> kicked

    try it. in 0.13 work fine but not in 0.14

    I have some solutions but is your code :p
     
  13. Wulf

    Wulf Community Admin

    Ah yes, I see my silly mistake, thanks. :p
     
  14. after each usage of the plugin i become this error :
    Code:
    12:13 PM [Info] [Country Block] JackTheRipper connected from DE
    12:14 PM [Error] Failed to run a timer. (TargetException: Object does not match target type.)
    12:14 PM [Debug]   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
      at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [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 
     
  15. Wulf

    Wulf Community Admin

    This plugin doesn't have any timers, so that's coming from another plugin you are running. This plugin is working fine, as you can see from the first line in your log snippet.
     
  16. Wulf

    Wulf Community Admin

  17. Wulf

    Wulf Community Admin

  18. CHR

    CHR

    I could need this plugin soon... I know that it didn't work last night. Could u check it pls?
     
  19. Wulf

    Wulf Community Admin

    Works fine here, can't really help without errors.
     
  20. CHR

    CHR

    Can't reproduce Cuz server is updated. ; ( but I give it a try
    [DOUBLEPOST=1423590051,1423520271][/DOUBLEPOST]Spams a lot of Errors :/
    Code:
    [Oxide] 6:38 PM [Error] countryblock: IndexOutOfRangeException while calling cmdCountryBlock: Array index is out of range.
      at NLua.MetaFunctions.GetMethodInternal (LuaState luaState) [0x00000] in <filename unknown>:0
      at NLua.MetaFunctions.GetMethod (LuaState luaState) [0x00000] in <filename unknown>:0
      at (wrapper native-to-managed) NLua.MetaFunctions:GetMethod (KeraLua.LuaState)
      at (wrapper managed-to-native) KeraLua.NativeMethods:LuaNetPCall (intptr,int,int,int)
      at KeraLua.Lua.LuaNetPCall (IntPtr luaState, Int32 nArgs, Int32 nResults, Int32 errfunc) [0x00000] in <filename unknown>:0
      at NLua.LuaLib.LuaPCall (LuaState luaState, Int32 nArgs, Int32 nResults, Int32 errfunc) [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
    [Oxide] 6:38 PM [Error] countryblock: IndexOutOfRangeException while calling cmdCountryBlock: Array index is out of range.
      at NLua.MetaFunctions.GetMethodInternal (LuaState luaState) [0x00000] in <filename unknown>:0
      at NLua.MetaFunctions.GetMethod (LuaState luaState) [0x00000] in <filename unknown>:0
      at (wrapper native-to-managed) NLua.MetaFunctions:GetMethod (KeraLua.LuaState)
      at (wrapper managed-to-native) KeraLua.NativeMethods:LuaNetPCall (intptr,int,int,int)
      at KeraLua.Lua.LuaNetPCall (IntPtr luaState, Int32 nArgs, Int32 nResults, Int32 errfunc) [0x00000] in <filename unknown>:0
      at NLua.LuaLib.LuaPCall (LuaState luaState, Int32 nArgs, Int32 nResults, Int32 errfunc) [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
    [Oxide] 6:39 PM [Error] countryblock: IndexOutOfRangeException while calling cmdCountryBlock: Array index is out of range.
      at NLua.MetaFunctions.GetMethodInternal (LuaState luaState) [0x00000] in <filename unknown>:0
      at NLua.MetaFunctions.GetMethod (LuaState luaState) [0x00000] in <filename unknown>:0
      at (wrapper native-to-managed) NLua.MetaFunctions:GetMethod (KeraLua.LuaState)
      at (wrapper managed-to-native) KeraLua.NativeMethods:LuaNetPCall (intptr,int,int,int)
      at KeraLua.Lua.LuaNetPCall (IntPtr luaState, Int32 nArgs, Int32 nRes
     
    Last edited by a moderator: Apr 3, 2015