Donate to the B3 fund!

"even a small donation helps!"
Donate with PayPal!
Most of the plugins here are made by B3 users and the authors may not visit frequently. If you need support for plugins or if questions remain unanswered, you will have to contact the author directly. Read the full Support Disclaimer here

NOTE: Do not attach plugins to your forumtopics! Attachements are periodically removed by maintenance tasks. Upload your plugins to our Downloads section instead!

Author Topic: PrivateServer Plugin  (Read 12927 times)

Offline Gavin1100

  • Newbie
  • *
  • Posts: 8
Re: PrivateServer Plugin
« Reply #15 on: July 02, 2011, 04:55:27 PM »
Its still not running.

http://www.pastie.org/private/8ra3wckpxhrpywex5mpj2a

Just got the full log up. pastie.org didnt get the whole thing on my last post. just edited it.

Offline xlr8or

  • [ www.xlrstats.com ]
  • Project Lead
  • Hero Member
  • *
  • Posts: 2057
    • The Art of Tactical Gaming
Re: PrivateServer Plugin
« Reply #16 on: July 03, 2011, 12:10:10 PM »
Okay, thanks for debugging this for me.
I got this one fixed also, can you download and retry?

Offline Gavin1100

  • Newbie
  • *
  • Posts: 8
Re: PrivateServer Plugin
« Reply #17 on: July 03, 2011, 04:33:58 PM »
Okay, thanks for debugging this for me.
I got this one fixed also, can you download and retry?

No problem.   :)
Downloading now. Will update you asap.


Offline Gavin1100

  • Newbie
  • *
  • Posts: 8
Re: PrivateServer Plugin
« Reply #18 on: July 05, 2011, 07:31:55 AM »
I have ran the plugin with B3, all good. Will put it into use with live players. Will notify, if any errors.

Offline LuxXx

  • Jr. Member
  • **
  • Posts: 23
Re: PrivateServer Plugin
« Reply #19 on: August 10, 2011, 01:14:29 PM »
Its like the Whitelist in Minecraft?

Offline MordyT

  • Support Hero
  • Hero Member
  • *
  • Posts: 3644
  • Over $300 Donated to B3!
    • MordyT
Re: PrivateServer Plugin
« Reply #20 on: August 10, 2011, 02:45:10 PM »
I have no idea how that works, but yes it can be used to only allow certain player play on a server.
Help will be given to those with a b3.log

If drop off the map it is due to RL becoming busy :)

System: Python 2.7.3 - Deb 7 - B3 Source Code - 128MB RAM box (rented at $5 a year) - remote MySQL - Remote Web Services

Offline Ski

  • Full Member
  • ***
  • Posts: 123
Re: PrivateServer Plugin
« Reply #21 on: April 28, 2012, 01:20:31 AM »
can not seem to get this running.

Here are my settings. Not sure why its not working.

Quote
<configuration plugin="privateserver">
   <settings name="settings">

      <!-- This plugin checks if either of the four conditions below is met, one is enough -->

      <!-- At what level is a player allowed to connect (0 disables levelchecking) -->
      <set name="allowedlevel">60</set>
      <!-- Guidsfile and Ipsfile as mentioned below MUST exist! -->
      <!-- Path and name of the file containing the allowable guids - 1 guid per line -->
      <set name="guidsfile">@b3/extplugins/conf/guids.txt</set>
      <!-- Path and name of the file containing the allowable ips - 1 ip per line -->
      <set name="ipsfile">@b3/extplugins/conf/ips.txt</set>
      <!-- Minimum XLRstats Skill for a player allowed to connect (0 disables skillchecking) -->
      <set name="minskill">0</set>

      <!-- Message to send to players who will be kicked -->
      <set name="kickmessage">$player, Your GUID must be entered to play on TCC servers, prepare to leave.</set>

      <!-- How many seconds to wait between the message and the kick -->
      <set name="kickdelay">5</set>

   </settings>
</configuration>

This is the end of the log, does not even seem to check the person.

http://pastebin.com/eus420iZ

Quote
120427 18:01:43   DEBUG   "Client Connected: [Empire_7] Empire_7 - EA_4FE069143E88A93D6A0B65B40E086FC3 ({'squadId': '0', 'name': 'Empire_7', 'kills': '0', 'deaths': '0', 'teamId': '0', 'score': '0', 'guid': 'EA_4FE069143E88A93D6A0B65B40E086FC3'})"
120427 18:01:43   DEBUG   'Storage: getClient Client<Empire_7>'
120427 18:01:43   BOT       'Client found in storage 4, welcome back Empire_7'
120427 18:01:43   DEBUG   u'Storage: getClientIpAddress IpAlias(id=0, ip="87.113.235.189", clientId=4, numUsed=1)'
120427 18:01:43   DEBUG   u'Storage: setClientIpAddresse IpAlias(id=0, ip="87.113.235.189", clientId=4, numUsed=1)'
120427 18:01:43   DEBUG   "Storage: setClientIpAddresse data {'num_used': 1, 'ip': u'87.113.235.189', 'time_add': 1335567703, 'time_edit': 1335567703, 'client_id': 4}"
120427 18:01:43   BOT       u'New alias for 4: 87.113.235.189'
120427 18:01:43   DEBUG   'Storage: setClient Client<Empire_7>'
120427 18:01:43   DEBUG   "Storage: setClient data {'time_add': 1335567556, 'time_edit': 1335567703, 'name': 'Empire_7', 'group_bits': 0, 'ip': '', 'auto_login': 1, 'greeting': u'', 'pbid': u'efef70a0c4e061657827fe31cdd8bd75', 'connections': 2, 'mask_level': 0, 'guid': 'EA_4FE069143E88A93D6A0B65B40E086FC3', 'id': 4}"
120427 18:01:43   DEBUG   'Client Authorized: [Empire_7] Empire_7 - EA_4FE069143E88A93D6A0B65B40E086FC3'
120427 18:01:43   VERBOSE   'Queueing event Client Authenticated Client<Empire_7>'
120427 18:01:43   DEBUG   'Storage: setClient Client<Empire_7>'
120427 18:01:43   VERBOSE   'Parsing Event: Client Authenticated: Poweradminbf3Plugin'
120427 18:01:43   DEBUG   "Storage: setClient data {'time_add': 1335567556, 'time_edit': 1335567703, 'name': 'Empire_7', 'group_bits': 0, 'ip': '87.113.235.189', 'auto_login': 1, 'greeting': u'', 'pbid': u'efef70a0c4e061657827fe31cdd8bd75', 'connections': 2, 'mask_level': 0, 'guid': 'EA_4FE069143E88A93D6A0B65B40E086FC3', 'id': 4}"
120427 18:01:43   DEBUG   'OnPBNewConnection: client updated with PunkBuster Server: New Connection (slot #2) 87.113.235.189:3659 [?] "Empire_7" (seq 10110157)\n'
120427 18:01:43   DEBUG   'Storage: setClient Client<Empire_7>'
120427 18:01:43   DEBUG   "Storage: setClient data {'time_add': 1335567556, 'time_edit': 1335567703, 'name': 'Empire_7', 'group_bits': 0, 'ip': '87.113.235.189', 'auto_login': 1, 'greeting': u'', 'pbid': 'efef70a0c4e061657827fe31cdd8bd75', 'connections': 2, 'mask_level': 0, 'guid': 'EA_4FE069143E88A93D6A0B65B40E086FC3', 'id': 4}"
120427 18:01:55   CONSOLE   "['player.onChat', 'wcSki', '!regtest', 'all']"
120427 18:01:55   VERBOSE   'Queueing event Say !regtest'
120427 18:01:55   VERBOSE   'Parsing Event: Say: AdminPlugin'
120427 18:01:55   DEBUG   'AdminPlugin: OnSay handle 5:"!regtest"'
120427 18:01:55   DEBUG   'AdminPlugin: Handle command !regtest'
120427 18:01:55   DEBUG   'formatting time with timezone [CST], tzOffset : -21600'
120427 18:01:55   DEBUG   "getCommand: ('admin.say', u'(]R[): [pm] wcSki [@2] is a Super Admin [100] since 08:20PM CST 04/26/12', 'squad', '1', '1')"
120427 18:01:55   VERBOSE   u"RCON :\t ('admin.say', u'(]R[): [pm] wcSki [@2] is a Super Admin [100] since 08:20PM CST 04/26/12', 'squad', '1', '1')"
120427 18:01:56   CONSOLE   "['player.onChat', 'Server', '(]R[): [pm] wcSki [@2] is a Super Admin [100] since 08:20PM CST 04/26/12', 'squad', '1', '1']"
120427 18:01:56   VERBOSE   u'RCON response:\t []'
120427 18:01:59   CONSOLE   "['player.onTeamChange', 'Empire_7', '1', '0']"
120427 18:01:59   CONSOLE   "['player.onSquadChange', 'Empire_7', '1', '1']"
120427 18:02:00   VERBOSE   u"RCON :\t ('admin.listPlayers', 'all')"
120427 18:02:00   VERBOSE   u"RCON response:\t ['7', 'name', 'guid', 'teamId', 'squadId', 'kills', 'deaths', 'score', '2', 'wcSki', 'EA_56282D682E34EA9E8B92640459088621', '1', '1', '0', '2', '0', 'Empire_7', 'EA_4FE069143E88A93D6A0B65B40E086FC3', '1', '1', '0', '0', '0']"
120427 18:02:00   VERBOSE   'StatusPlugin: Building XML status'
120427 18:02:00   DEBUG   'StatusPlugin: Writing XML status to C:\\BF3_B3\\status.xml'
120427 18:02:00   CONSOLE   "['player.onSpawn', 'wcSki', '1']"
120427 18:02:04   CONSOLE   "['player.onSpawn', 'Empire_7', '1']"
120427 18:02:39   CONSOLE   "['player.onKill', '', 'wcSki', 'RoadKill', 'false']"
120427 18:02:55   CONSOLE   "['player.onSpawn', 'wcSki', '1']"
120427 18:03:00   VERBOSE   u"RCON :\t ('admin.listPlayers', 'all')"
120427 18:03:00   VERBOSE   u"RCON response:\t ['7', 'name', 'guid', 'teamId', 'squadId', 'kills', 'deaths', 'score', '2', 'wcSki', 'EA_56282D682E34EA9E8B92640459088621', '1', '1', '0', '3', '0', 'Empire_7', 'EA_4FE069143E88A93D6A0B65B40E086FC3', '1', '1', '0', '0', '0']"
120427 18:03:00   VERBOSE   'StatusPlugin: Building XML status'
120427 18:03:00   DEBUG   'StatusPlugin: Writing XML status to C:\\BF3_B3\\status.xml'
120427 18:03:04   CONSOLE   "['player.onLeave', 'wcSki', '7', 'name', 'guid', 'teamId', 'squadId', 'kills', 'deaths', 'score', '1', 'wcSki', '', '1', '1', '0', '3', '0']"
120427 18:03:04   CONSOLE   "['player.onSquadChange', 'wcSki', '1', '0']"
120427 18:03:04   CONSOLE   "['punkBuster.onMessage', 'PunkBuster Server: Lost Connection (slot #1) 65.28.59.174:3659 82c8b497eb55b3a13bd14470ad20954c(-) wcSki\\n']"
120427 18:03:04   VERBOSE   'Queueing event Client Disconnect wcSki'
120427 18:03:04   VERBOSE   "PB lost connection: {'slot': '1', 'ip': '65.28.59.174', 'port': '3659', 'name': 'wcSki', 'pbuid': '82c8b497eb55b3a13bd14470ad20954c'}"
120427 18:03:04   VERBOSE   'Parsing Event: Client Disconnect: Poweradminbf3Plugin'
120427 18:03:11   CONSOLE   "['player.onLeave', 'Empire_7', '7', 'name', 'guid', 'teamId', 'squadId', 'kills', 'deaths', 'score', '1', 'Empire_7', 'EA_4FE069143E88A93D6A0B65B40E086FC3', '1', '1', '0', '0', '0']"
120427 18:03:11   CONSOLE   "['player.onSquadChange', 'Empire_7', '1', '0']"
120427 18:03:11   CONSOLE   "['punkBuster.onMessage', 'PunkBuster Server: Lost Connection (slot #2) 87.113.235.189:3659 efef70a0c4e061657827fe31cdd8bd75(-) Empire_7\\n']"
120427 18:03:11   VERBOSE   'Queueing event Client Disconnect Empire_7'
120427 18:03:11   VERBOSE   'Parsing Event: Client Disconnect: Poweradminbf3Plugin'
120427 18:03:11   VERBOSE   "PB lost connection: {'slot': '2', 'ip': '87.113.235.189', 'port': '3659', 'name': 'Empire_7', 'pbuid': 'efef70a0c4e061657827fe31cdd8bd75'}"

Offline 82ndAB.Bravo17

  • Dev. Team
  • Hero Member
  • *
  • Posts: 2617
Re: PrivateServer Plugin
« Reply #22 on: April 28, 2012, 04:08:47 AM »
Try commenting out or deleting line 62

return False

or running xlrstats

Offline Ski

  • Full Member
  • ***
  • Posts: 123
Re: PrivateServer Plugin
« Reply #23 on: April 28, 2012, 03:12:05 PM »
What line?


I really do not want to run xlrstats on these servers and the config says 0 disables the xlrstats checking.

Do you think it is shutting off the plugin?

I think the same thing was happening with the B3 level checks, I set that to 0 as well and it was not working. I only want to check GUID and/or IP

Ski

Offline 82ndAB.Bravo17

  • Dev. Team
  • Hero Member
  • *
  • Posts: 2617
Re: PrivateServer Plugin
« Reply #24 on: April 28, 2012, 04:50:25 PM »
line 62 in privateserver.py

Tried to upload edited file but upload folder is full.

TCC forums don't allow attachments, so PM'd it to you at our website
« Last Edit: April 28, 2012, 05:12:33 PM by 82ndAB.Bravo17 »

Offline Ski

  • Full Member
  • ***
  • Posts: 123
Re: PrivateServer Plugin
« Reply #25 on: April 28, 2012, 05:10:13 PM »
Ahh the privateserver.py file.

So you think changing that to true will work?

I would like to just remove all the XLRstat skill level checking from the plugin all together. I tried to delete those checks in the py file, but I have no idea what I am doing and the plugin would not even load when I did that.

Code master I am not I guess. :)


« Last Edit: April 28, 2012, 05:22:50 PM by Ski »

Offline 82ndAB.Bravo17

  • Dev. Team
  • Hero Member
  • *
  • Posts: 2617
Re: PrivateServer Plugin
« Reply #26 on: April 28, 2012, 05:13:27 PM »
Edited my message above  ;D

Offline Ski

  • Full Member
  • ***
  • Posts: 123
Re: PrivateServer Plugin
« Reply #27 on: April 28, 2012, 05:39:13 PM »
Well I am now on your TS looking for you.... your not their. :)

Getting some where. Now it seems like the plugin is at least starting.... but I see the following error in the log file now.

Quote
120428 10:41:50   VERBOSE   'Parsing Event: Client Authenticated: PrivateserverPlugin'
120428 10:41:50   ERROR   'handler PrivateserverPlugin could not handle event Client Authenticated: AttributeError: PrivateserverPlugin instance has no attribute \'verbose2\' [(\'C:\\\\BF3_TCC1\\\\b3\\\\parser.py\', 1002, \'handleEvents\', \'hfunc.parseEvent(event)\'), (\'C:\\\\BF3_TCC1\\\\b3\\\\plugin.py\', 158, \'parseEvent\', \'self.onEvent(event)\'), (\'C:\\\\BF3_TCC1\\\\b3\\\\extplugins\\\\privateserver.py\', 159, \'onEvent\', \'self.checkPlayer(event.client)\'), (\'C:\\\\BF3_TCC1\\\\b3\\\\extplugins\\\\privateserver.py\', 180, \'checkPlayer\', "self.verbose2(\'Level %s (%s) allowed\' %(client.name, client.maxLevel) )")]'
120428 10:42:07   CONSOLE   "['player.onTeamChange', 'wcSki', '1', '0']"
120428 10:42:07   CONSOLE   "['player.onSquadChange', 'wcSki', '1', '1']"

Update*

Even with the error above, it does appear to be working. It kicked someone and when I added the EA_GUID they did not get kicked.

Ski
« Last Edit: April 28, 2012, 08:44:17 PM by Ski »

Offline 82ndAB.Bravo17

  • Dev. Team
  • Hero Member
  • *
  • Posts: 2617
Re: PrivateServer Plugin
« Reply #28 on: April 28, 2012, 11:31:05 PM »
New version PM'd I actually tested it this time, and it seems to work,

I would suggest that you use the levels function rather than the guids, that way you can set up Echelon and allow/deny people using their names, rather than the guid. It would still use the guid to allow/deny, just easier for you to maintain.

Offline Ski

  • Full Member
  • ***
  • Posts: 123
Re: PrivateServer Plugin
« Reply #29 on: February 12, 2013, 05:39:22 PM »
I am now using this plugin to create a "Whitelist" server on one of our Arma2 servers running the wasteland mod. I have it setup to only allow players if they have a group level of 2 or greater. As far as keeping players off the server that are not authorized, it is working great.

The problem I seem to be having is with the kick delay and the message. That does not seem to be working right. When I am on the server 9 out of 10 times the player is kicked right away and then the kick message is displayed after the time frame I have in the file. I think I have like 20 seconds in the file.

So it appears to be working backwards. I would like the message to be displayed to the player, then a wait time of 20 seconds and then they are kicked. This hopefully would give them time to read the message BEFORE just being kicked.

Not sure if this is just because I am running it on ARMA2, but its working backwards for me. Can someone look into this and let me know?

Thanks,
Ski

 


Rate this page +1 at Google Search

anything