Jump to content

interesting insane limits isue with custom lists using || or && in the code.


iamadeadpixel

Recommended Posts

Server type: Venice unleashed (Custom BF3 framework)

Procon: V1.5.4.0
Insanelimits: V0.9.17.0
Acounts to test with it: 4

ok, this is the case.

i made a nice small snippit that logs the player GUID, date/time country and playername to a logfile on join event (for testing i set it to on spawn)
This is the code i use (part 1 of 2)

```
if ((!plugin.isInList(player.Name, "vu_list_vu01"))) {
        plugin.Log("Plugins/IL_logfiles/insanelimits-datacollector.log", plugin.R("GUID:[player.PBGuid] [%date% %time%] Country:[%k_cn%] IP:[%k_ip%] Player name: player.Name"));
    }
    return false;
```

vu_list_vu01 contains all player who i NOT wish to log (trusted players) value1, value2, etc, etc.
This list can grow very huge, so i tried to split in 2 parts, but it works as it should be with one list active.

so i tweaked the code like this

```
if ((!plugin.isInList(player.Name, "vu_list_vu01")) || (!plugin.isInList(player.Name, "vu_list_vu02"))) {
        plugin.Log("Plugins/IL_logfiles/insanelimits-datacollector.log", plugin.R("GUID:[player.PBGuid] [%date% %time%] Country:[%k_cn%] IP:[%k_ip%] Player name: player.Name"));
    }
    return false;
```

in basic, The limit with || says do not log players if they are in list1 OR are in list2 ( || = OR, && = AND)
tested it with 1 name in list1 and a other name in list 2 (i logged in with the name in list2)

It didnt work, the playername still got logged,i tried several combination,

Even this tweak
```
if ((!plugin.isInList(player.Name, "vu_list_vu01 || vu_list_vu02"))) {
        plugin.Log("Plugins/IL_logfiles/insanelimits-datacollector.log", plugin.R("GUID:[player.PBGuid] [%date% %time%] Country:[%k_cn%] IP:[%k_ip%] Player name: player.Name"));
    }
    return false;
```

is also not working, and with the && nothing, it still logs the player while it should NOT log it.
So, i am a bit stuck here, any sugestions?

And yes, i even created multiple lists with the name vu_list_vu01 and used the first limit code.

 

Link to comment
57 minutes ago, iamadeadpixel said:

Server type: Venice unleashed (Custom BF3 framework)

Procon: V1.5.4.0
Insanelimits: V0.9.17.0
Acounts to test with it: 4

ok, this is the case.

i made a nice small snippit that logs the player GUID, date/time country and playername to a logfile on join event (for testing i set it to on spawn)
This is the code i use (part 1 of 2)

```
if ((!plugin.isInList(player.Name, "vu_list_vu01"))) {
        plugin.Log("Plugins/IL_logfiles/insanelimits-datacollector.log", plugin.R("GUID:[player.PBGuid] [%date% %time%] Country:[%k_cn%] IP:[%k_ip%] Player name: player.Name"));
    }
    return false;
```

vu_list_vu01 contains all player who i NOT wish to log (trusted players) value1, value2, etc, etc.
This list can grow very huge, so i tried to split in 2 parts, but it works as it should be with one list active.

so i tweaked the code like this

```
if ((!plugin.isInList(player.Name, "vu_list_vu01")) || (!plugin.isInList(player.Name, "vu_list_vu02"))) {
        plugin.Log("Plugins/IL_logfiles/insanelimits-datacollector.log", plugin.R("GUID:[player.PBGuid] [%date% %time%] Country:[%k_cn%] IP:[%k_ip%] Player name: player.Name"));
    }
    return false;
```

in basic, The limit with || says do not log players if they are in list1 OR are in list2 ( || = OR, && = AND)
tested it with 1 name in list1 and a other name in list 2 (i logged in with the name in list2)

It didnt work, the playername still got logged,i tried several combination,

Even this tweak
```
if ((!plugin.isInList(player.Name, "vu_list_vu01 || vu_list_vu02"))) {
        plugin.Log("Plugins/IL_logfiles/insanelimits-datacollector.log", plugin.R("GUID:[player.PBGuid] [%date% %time%] Country:[%k_cn%] IP:[%k_ip%] Player name: player.Name"));
    }
    return false;
```

is also not working, and with the && nothing, it still logs the player while it should NOT log it.
So, i am a bit stuck here, any sugestions?

And yes, i even created multiple lists with the name vu_list_vu01 and used the first limit code.

 

If(!inlist(name, "list1") && !inlist(name, "list2"))

 

Is what you want...

 

What you did here is:

If player is not in list 1 or is not in list then log.

 

Which means that all players that are not mentioned in both lists get logged...

 

 

Need new plugin features? I can change: Adkats, AdKatsLRT, LanguageEnforcer, InsaneLimits, xVotemap for you. Also working on new plugins. Have an idea? Share it and I might include it in my repos. Github.com/hedius

 

Check out E4GLAdKats for an advancded and maintained AdKats version.

Link to comment
1 minute ago, iamadeadpixel said:

Hmm, 

The name inlist does not exist in current context

 

 

What i wrote was pseudo code. To only show the required logic condition you have to use.  You will have to adapt this to the names you used above

Need new plugin features? I can change: Adkats, AdKatsLRT, LanguageEnforcer, InsaneLimits, xVotemap for you. Also working on new plugins. Have an idea? Share it and I might include it in my repos. Github.com/hedius

 

Check out E4GLAdKats for an advancded and maintained AdKats version.

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

Please review our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.