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: PowerAdminUrt 1.4.0+ for Urban Terror!  (Read 57618 times)

Offline xlr8or

  • [ www.xlrstats.com ]
  • Project Lead
  • Hero Member
  • *
  • Posts: 2057
    • The Art of Tactical Gaming
PowerAdminUrt 1.4.0+ for Urban Terror!
« on: July 29, 2008, 10:32:27 AM »

PowerAdmin plugin for Urban Terror 4.1 and 4.2
for v4.1: ioUrT version: 1.35urt minimum (check with /version) and B3 version 1.1.3+
for v4.2: B3 1.9+


Documentation

Download


« Last Edit: February 23, 2013, 05:49:26 PM by Courgette »

Offline Stefan1200

  • Jr. Member
  • **
  • Posts: 24
Re: PowerAdminUrt 1.4.0+ for Urban Terror!
« Reply #1 on: January 25, 2009, 02:59:28 PM »
I use PowerAdminUrt 1.4.0b14 (01:49 09/06/2008) with current B3 pre 1.1.4. Server is Urban Terror 4.1 on Debian Linux.
Almost all features from PowerAdminUrt I need works perfectly except for the speccheck.

Players get a warning every minutes after 5 minutes, thats how I set.
The problem: They never get kicked. They get warnings until the map is over. Next map they have again 5 minutes and again 5-8 warnings without a kick...every map.

My settings:
Code: [Select]
  <settings name="speccheck">
    <!-- sinterval sets checking intervals in minutes, 0 disables function -->
    <!-- it will warn 3 times before kick, so kick after: maxspectime + 3 * sinterval -->
    <set name="sinterval">1</set>
    <!-- how long a player may idle in spec in minutes -->
    <set name="maxspectime">5</set>
    <!-- with how many players do we consider the server full and start checking spectators -->
    <set name="maxplayers">15</set>
    <!-- maxlevel and above won't be handled so they may idle in spec -->
    <set name="maxlevel">10</set>
</settings>

Here a link to the b3.log, containing a part of 30 Minutes, where a player named "trefffastnix" was spectating on a full server:
http://server.german-fighters.com/mupload/17/b3_poweradminurt.log

Is there another setting controlling this? Or is another thing wrong? I am happy if someone have a hint for me :).

Offline flinkaflenkaflrsk

  • Sr. Member
  • ****
  • Posts: 238
Re: PowerAdminUrt 1.4.0+ for Urban Terror!
« Reply #2 on: January 25, 2009, 03:41:59 PM »
the search button is your friend :)

did you check
http://www.bigbrotherbot.com/forums/index.php?topic=251.0

Offline Stefan1200

  • Jr. Member
  • **
  • Posts: 24
Re: PowerAdminUrt 1.4.0+ for Urban Terror!
« Reply #3 on: January 25, 2009, 05:08:11 PM »
did you check
http://www.bigbrotherbot.com/forums/index.php?topic=251.0

Thank you, that could be the problem. It was set to 5m, now I changed it to 1h.

Offline xlr8or

  • [ www.xlrstats.com ]
  • Project Lead
  • Hero Member
  • *
  • Posts: 2057
    • The Art of Tactical Gaming
Re: PowerAdminUrt 1.4.0+ for Urban Terror!
« Reply #4 on: January 25, 2009, 09:11:20 PM »
It's also in the Readme of PowerAdminUrt

Offline Dr. Eck

  • Newbie
  • *
  • Posts: 6
Re: PowerAdminUrt 1.4.0+ for Urban Terror!
« Reply #5 on: February 22, 2009, 09:14:26 AM »
My Headshotcounter doesn't work, can anyone help me?  ???
And the Spree plugin shows wrong information, e.g. i've made 4 kills and the plugin says,
i've already  made 5. Then if i have changed the map with the !map command, the mapcycle isn't
active... After a map is over, the same map will start again.
« Last Edit: February 22, 2009, 09:20:24 AM by Dr. Eck »

Offline Bakes

  • B3 Contrib/Support
  • Hero Member
  • *
  • Posts: 1226
Re: PowerAdminUrt 1.4.0+ for Urban Terror!
« Reply #6 on: February 22, 2009, 09:18:28 AM »
do you have an older version of b3?

if you have a version of b3 older than 1.1.3 (eg if you have the egg version)
the headshot counter will not work.

Offline Dr. Eck

  • Newbie
  • *
  • Posts: 6
Re: PowerAdminUrt 1.4.0+ for Urban Terror!
« Reply #7 on: February 22, 2009, 09:21:19 AM »
My folder name is b3-1.1.2d-r103

Ah, ok, i've not  v1.1.3

where i can get it?
« Last Edit: February 22, 2009, 09:31:18 AM by Dr. Eck »

Offline Bakes

  • B3 Contrib/Support
  • Hero Member
  • *
  • Posts: 1226
Re: PowerAdminUrt 1.4.0+ for Urban Terror!
« Reply #8 on: February 22, 2009, 09:33:42 AM »
get it from the github site, here:
http://www.bigbrotherbot.com/forums/index.php?topic=621

that's where you should get b3 from now on.

Offline Dr. Eck

  • Newbie
  • *
  • Posts: 6
Re: PowerAdminUrt 1.4.0+ for Urban Terror!
« Reply #9 on: February 22, 2009, 09:36:58 AM »
Thanks, i hope, this was the error for the other errors, too.

Offline FSK405|Fear

  • Newbie
  • *
  • Posts: 4
Re: PowerAdminUrt 1.4.0+ for Urban Terror!
« Reply #10 on: March 16, 2009, 01:22:39 AM »
I made some additions to poweradmin 1.4.0b3 for FSK405 so I figured id share with the rest of the wonderful people here.

- Added more rcon functions.
!waverespawns - Turn waverespawns on or off
!bluewave - Modify the blue wave respawn time
!redwave - Modify the red wave respawn time
!setnextmap - Set the next map after current map is over
!respawngod - Set the respawn protection
!respawndelay - Set the respawn delay
!caplimit - Sets the cap limit
!timelimit - Sets the timelimit
!fraglimit - Sets the fraglimit
!hotpotato - Set the flag explode time

You need to add these xml lines to your poweradminurt.xml

Code: [Select]
<set name="pahotpotato-hotpotato">60</set>
      <set name="patimelimit-timelimit">60</set>
      <set name="pafraglimit-fraglimit">60</set>
      <set name="pacaplimit-caplimit">60</set>
      <set name="parespawndelay-respawndelay">60</set>
      <set name="parespawngod-respawngod">60</set>
      <set name="paredwave-redwave">60</set>
      <set name="pabluewave-bluewave">60</set>
      <set name="pasetnextmap-setnextmap">60</set>
      <set name="pawaverespawns-waverespawns">60</set>

And heres the poweradminurt.py file http://imanasshat.com/b3/poweradminurt.rar

Offline naixn

  • Jr. Member
  • **
  • Posts: 10
Re: PowerAdminUrt 1.4.0+ for Urban Terror!
« Reply #11 on: August 06, 2009, 05:33:56 AM »
Hi there!

We, at Sexy's CTF, found a bug in PowerAdminUrt, in the latest git version :).
We found that the "lock" parameter to the !force command was not working.

So I decided to go through the source coude, added some debug information, and found the following:
Code: python [Select]

    elif event.type == b3.events.EVT_CLIENT_TEAM_CHANGE:
      if self._tinterval > 0:
        self.onTeamChange(event.data, event.client)

The issue is that _tinterval is the value for TeamBalance. Using 0 means team balance is OFF. However, what if we want to turn team balance OFF, and still be able to !force and lock people in one team (which is our case)?

Also, this check seems obsolete, since the current used variable to balance team with the TEAM_CHANGE event is _team_change_force_balance_enable, and not _tinterval, used to determine how often the bot should balance teams outside on TEAM_CHANGE events.

A simple fix is to simply delete the if check like that:
Code: python [Select]

    elif event.type == b3.events.EVT_CLIENT_TEAM_CHANGE:
      self.onTeamChange(event.data, event.client)


Other than that, thanks a lot for the great plugin! We all love it :D
« Last Edit: August 06, 2009, 11:27:46 AM by naixn »

Offline naixn

  • Jr. Member
  • **
  • Posts: 10
Re: PowerAdminUrt 1.4.0+ for Urban Terror!
« Reply #12 on: August 06, 2009, 07:15:20 AM »
Hi again!

Once I managed to make the lock work, I noticed that a forced player will receive 4 B3 PM when he tries to change team.
Let's say a user has been forced in red.
When he tried to go back to blue, the following events happen:
- User changes team:
--- TEAM_CHANGE with team = -1 (b3.TEAM_UNKNOWN)
--- TEAM_CHANGE with team = 3 (b3.TEAM_BLUE)
- B3 forces the user back to red:
--- TEAM_CHANGE with team = -1 (b3.TEAM_UNKNOWN)
--- TEAM_CHANGE with team = 2 (b3.TEAM_RED)

PowerAdminUrt is notified for each of these events, and thus enters this block of code, 4 times:
Code: python [Select]

    if not self._matchmode and client.isvar(self, 'paforced')
      team = client.var(self, 'paforced').value
      self.console.write('forceteam %s %s' % (client.cid, team))
      client.message('^1You are LOCKED! You are NOT allowed to switch!')
      self.verbose('%s was locked and forced back to %s' %(client.name, team))
      # Break out of this function, nothing more to do here                                                                                                                                                                               
      return None


To make sure the user is only notified once, I changed the code to the following:
Code: python [Select]

    if not self._matchmode and client.isvar(self, 'paforced'):
      forcedTeam = client.var(self, 'paforced').value
      if team != b3.TEAM_UNKNOWN and team != self.console.getTeam(forcedTeam):
        self.console.write('forceteam %s %s' % (client.cid, forcedTeam))
        client.message('^1You are LOCKED! You are NOT allowed to switch!')
        self.verbose('%s was locked and forced back to %s' %(client.name, forcedTeam))
        # Break out of this function, nothing more to do here
      return None


Also, because it does not really make sense to force a player permanently, I wanted to add the following in the disconnect event, to unlock a player when he disconnects from the server:
Code: python [Select]

    if event.type == b3.events.EVT_CLIENT_DISCONNECT:
      [...]
      if (event.client.isvar(self, 'paforced')):
        event.client.delvar(self, 'paforced')


But it does not work, because there is no "event.client" variable.
I wanted to do that because the main issue, currently, with lock, is that if there is no admin to unlock the player, well, the player is locked in a team forever. And it kinda sucks :). My solution would not have been perfect either, because the player could disconnect and come back to choose his team, but I think it would be more annoying for them after 2-3 map loads :p.

I guess the best thing would be to have TempLocks, just like the way we have TempBans, like: lock a player in a team for 10 minutes, etc.

What do you guys think?
« Last Edit: August 06, 2009, 09:59:50 AM by Courgette »

Offline Courgette

  • Senior Dev.
  • Hero Member
  • *
  • Posts: 4883
    • Github repository
Re: PowerAdminUrt 1.4.0+ for Urban Terror!
« Reply #13 on: August 06, 2009, 10:16:19 AM »
Hi Naixn,

Thanks for your work. It's nice to see people giving back  ;)

Are you comfortable enough with git and github to fork git://github.com/xlr8or/big-brother-bot.git and make "pull request" from your own branch ?

Also, because it does not really make sense to force a player permanently, I wanted to add the following in the disconnect event, to unlock a player when he disconnects from the server:
Code: python [Select]

    if event.type == b3.events.EVT_CLIENT_DISCONNECT:
      [...]
      if (event.client.isvar(self, 'paforced')):
        event.client.delvar(self, 'paforced')


This is weird. I though paforced was cleared upon reconnect. If you look at the setvar method in client.py, you will see that there is nothing saved to database.
Can you make extra sure that the paforce value remains after a client reconnects ?
« Last Edit: August 06, 2009, 01:44:16 PM by Courgette »

Offline xlr8or

  • [ www.xlrstats.com ]
  • Project Lead
  • Hero Member
  • *
  • Posts: 2057
    • The Art of Tactical Gaming
Re: PowerAdminUrt 1.4.0+ for Urban Terror!
« Reply #14 on: August 10, 2009, 02:24:30 PM »
Thanks indeed for thinking with us and improving the plugin! And yes, I have a few answers.

The client object is destroyed after disconnect, and with it all variables. On reconnect a force is no longer active.

Perhaps all locks should be removed on initRound or initGame... could be configurable in config. (lock_permanent = True/False)

 


Rate this page +1 at Google Search

anything