thankyou
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: Poweradmin BF3  (Read 33373 times)

Offline Courgette

  • Senior Dev.
  • Hero Member
  • *
  • Posts: 4882
    • Github repository
Poweradmin BF3
« on: October 31, 2011, 03:19:40 AM »
Here we go. I also started the development of the poweradmin plugin for BF3.

For those new to B3, each game B3 supports have a poweradmin plugin which adds game specific admin commands to the default B3 admin commands.

Current features :
  • 0.1 : !kill <player> [<reason>]
  • 0.2 : !roundrestart and !roundnext
  • 0.3 : !changeteam and !swap
  • 0.4 : !changeteam, !swap won't allow to act on an admin of higher level
  • 0.5 : !punkbuster and !setnextmap. Fix bug in 0.4
  • 0.6 : !loadconfig
  • 0.7 : add the swap_no_level_check config variable to allow one to !swap players without any level restriction. Upgrading users : config file structure changed for the config directory used by the !loadconfig command.
  • 0.8 :

  - renamed 'swap_no_level_check' to 'no_level_check_level'
  - 'no_level_check_level' applies to both !swap and !changeteam commands
  - add a scrambling mechanism and commands !scramble, !scramblemode, !autoscramble
  - !changeteam can be used on player of equal level
  • 0.9 : !listconfig and !loadconfig can find config by partial name
  • 0.10 : add a config manager which can load a server config given current gamemode and/or map
  • 0.11 : fix provided configmanager examples files. Names for those files must use lowercase characters.
  • 0.12 : add command !unlockmode
  • 0.13 : fixes issue with team scrambler config, fixes #22, improves configmanager (thanks to Freelander)
  • 0.14 : add command !vehicles <on|off>
  • 0.15 : add a teambalancer (thanks to Bravo17)
  • 0.16.1 - fix command !endround
  • 0.16.2 - fix !changeteam for SquadDeathMatch0
  • 0.16.3 - Only start autobalancing when teams are out of balance by team_swap_threshold or more
  • 0.17 - add command !idle (Mario)
  • 0.18 - add command !serverreboot and improve command !endround (Ozon)
  • 0.18.1 - Correct autobalance not restarting after 0.16.3 change
  • 0.19 - add commands !yell !yellplayer !yellteam !yellsquad (requires B3 1.8.1+)
  • 0.20 - add command !nuke
  • 1.0 - fixes !yell
  • 1.1 - fixes !yell after B3 1.8.0 changes
  • 1.2 - add config option scramber\gamemodes_blacklist to have the auto scrambler ignoring some gamemodes. requires B3 1.8.2dev1+
  • 1.3 - Refactor autobalance logic flow, and add setting option team_swap_threshold_prop
  • 1.3.1 - Fixes broken command !setnextmap since B3 1.8.2
  • 1.4 - Adds commands !viplist, !vips, !vipadd, !vipremove, !vipclear, !vipload, !vipsave
  • 1.5 - command !map can optionally specify the gamemode and number of rounds
Detailed changelog

Download

requires B3 1.8.3dev1+


« Last Edit: November 21, 2012, 11:31:09 PM by Courgette »

Offline Mariodu62

  • Sr. Member
  • ****
  • Posts: 466
Re: Poweradmin BF3
« Reply #1 on: October 31, 2011, 09:57:19 AM »
hi courgette,

Maybe a mistake in the .xml

Plugin name poweradminmoh

Offline Courgette

  • Senior Dev.
  • Hero Member
  • *
  • Posts: 4882
    • Github repository
Re: Poweradmin BF3
« Reply #2 on: October 31, 2011, 11:30:40 AM »
thank you for the report Mario. The plugin works nevertheless.

Also I'd like some feedback regarding the sections gamemode_preset_* that you can find in the config file and the !setmode command.
The intent is to have a command which can apply the predefined settings from the config file.

I'm not sure about the naming the command !setmode and of the sections gamemode_preset_*
I'd like suggestions for other names.

Offline Mariodu62

  • Sr. Member
  • ****
  • Posts: 466
Re: Poweradmin BF3
« Reply #3 on: October 31, 2011, 12:07:36 PM »
thank you for the report Mario. The plugin works nevertheless.

Also I'd like some feedback regarding the sections gamemode_preset_* that you can find in the config file and the !setmode command.
The intent is to have a command which can apply the predefined settings from the config file.

I'm not sure about the naming the command !setmode and of the sections gamemode_preset_*
I'd like suggestions for other names.

I think the name of the command is Ok.

maybe Changeteam is a too long name, what other feedback do you need, (if i can help you)


Just a question is it normal to load for example 13 plugins and only 12 run ??? with that revison ?? (so do cod game)
« Last Edit: October 31, 2011, 12:14:22 PM by Mariodu62 »

Offline Courgette

  • Senior Dev.
  • Hero Member
  • *
  • Posts: 4882
    • Github repository
Re: Poweradmin BF3
« Reply #4 on: October 31, 2011, 08:40:38 PM »
poweradmin BF3 0.3 released


Just a question is it normal to load for example 13 plugins and only 12 run ??? with that revison ?? (so do cod game)
Depends. Make a support topic with you config and b3.log and we'll have a look

Offline Sars

  • Full Member
  • ***
  • Posts: 72
Re: Poweradmin BF3
« Reply #5 on: October 31, 2011, 10:25:49 PM »
Courgette can you implement a !eventeams that would be amazing!!!



Offline Courgette

  • Senior Dev.
  • Hero Member
  • *
  • Posts: 4882
    • Github repository
Re: Poweradmin BF3
« Reply #6 on: November 01, 2011, 12:27:51 AM »
0.4 released

future plan is to have the !team and !scramble commands as for the poweradmin plugin of MoH

Offline wipi

  • Jr. Member
  • **
  • Posts: 39
Re: Poweradmin BF3
« Reply #7 on: November 01, 2011, 07:55:17 AM »
Hi Courgette, thanks for this plugin,

but i have a problem. B3 have a critical error and i cant find the mistake :-(

b3.log
Code: [Select]
111101 00:51:33	BOT    	'Loading Plugin #9 poweradminbf3 [C:\\UserFiles\\wypior\\B3BF3\\b3\\extplugins\\conf\\plugin_poweradminbf3.xml]'
111101 00:51:33 INFO 'Could not load built in plugin poweradminbf3 (No module named poweradminbf3)'
111101 00:51:33 INFO 'trying external plugin directory : C:\\UserFiles\\wypior\\B3BF3\\b3\\extplugins'
111101 00:51:33 BOT    'Poweradminbf3Plugin: Loading config C:\\UserFiles\\wypior\\B3BF3\\b3\\extplugins\\conf\\plugin_poweradminbf3.xml for Poweradminbf3Plugin'
111101 00:51:33 CRITICAL 'Error loading plugin: format requires a mapping'
Traceback (most recent call last):
  File "C:\UserFiles\wypior\B3BF3\b3\parser.py", line 608, in loadPlugins
    self._plugins[plugins[s]['name']] = getattr(pluginModule, '%sPlugin' % plugins[s]['name'].title())(self, plugins[s]['conf'])
  File "C:\UserFiles\wypior\B3BF3\b3\extplugins\poweradminbf3.py", line 41, in __init__
    Plugin.__init__(self, console, config)
  File "C:\UserFiles\wypior\B3BF3\b3\plugin.py", line 56, in __init__
    self.loadConfig(config)
  File "C:\UserFiles\wypior\B3BF3\b3\plugin.py", line 115, in loadConfig
    self.onLoadConfig()
  File "C:\UserFiles\wypior\B3BF3\b3\extplugins\poweradminbf3.py", line 59, in onLoadConfig
    self.getMessage('operation_denied_level')
  File "C:\UserFiles\wypior\B3BF3\b3\plugin.py", line 87, in getMessage
    return msg % args
TypeError: format requires a mapping

and the b3 config

Code: [Select]
	</settings>
<settings name="plugins">
<set name="external_dir">@b3/extplugins</set>
</settings>
<plugins>
<!-- plugin order is important. Plugins that add new in-game commands all depend on the admin plugin. Make sure to have the admin plugin before them. -->

<plugin config="@conf/plugin_censor.xml" name="censor" /> <!-- kicks for bad words and names -->
<plugin config="@b3/conf/plugin_spamcontrol.xml" name="spamcontrol" /> <!-- helps keep player spamming down -->
<plugin config="@conf/plugin_admin.xml" name="admin" /> <!-- contains admin levels, commands, etc. MUST BE ENABLED -->
<plugin config="@conf/plugin_pingwatch.xml" name="pingwatch" /> <!-- warns (not kicks) for high ping players -->
<plugin config="@conf/plugin_adv.xml" name="adv" /> <!-- Contains the spams used and RSS feed -->
<!-- <plugin config="@conf/plugin_status.xml" name="status" /> Please do not enable unless you configure the plugin first -->
<plugin config="@conf/plugin_welcome.xml" name="welcome" /> <!-- Welcomes players bassed on connections -->
<plugin name="host" /> <!-- Please leave this in. Open a support ticket if you have any questions -->
<plugin name="makeroom" config="@b3/extplugins/conf/plugin_makeroom.xml"/>
<plugin name="poweradminbf3" config="@b3/extplugins/conf/plugin_poweradminbf3.xml"/>
<!-- You can add new/custom plugins to this list using the same form as above. -->
</plugins>
</configuration>

i hope you can help me

Offline Mariodu62

  • Sr. Member
  • ****
  • Posts: 466
Re: Poweradmin BF3
« Reply #8 on: November 01, 2011, 10:47:19 AM »
hi the issue is in the poweradminbf3.xml

in the denied message...

I use the old version of .xml at the moment and it works.
« Last Edit: November 01, 2011, 11:13:04 AM by Mariodu62 »

Offline Mariodu62

  • Sr. Member
  • ****
  • Posts: 466
Re: Poweradmin BF3
« Reply #9 on: November 01, 2011, 11:45:49 AM »
It works fine,

But i'm superadmin and i can't change team... sniif

Is it possible to disable the "anti admin change" ???

like admin switch >yes or no< in the xml. of course in the future...

Offline Courgette

  • Senior Dev.
  • Hero Member
  • *
  • Posts: 4882
    • Github repository
Re: Poweradmin BF3
« Reply #10 on: November 01, 2011, 11:51:53 AM »
@wipi : could you post your poweradminbf3.xml file please

@Mario : please provide a b3.log

Offline wipi

  • Jr. Member
  • **
  • Posts: 39
Re: Poweradmin BF3
« Reply #11 on: November 01, 2011, 04:00:51 PM »
@wipi : could you post your poweradminbf3.xml file please

Code: [Select]
<configuration plugin="poweradminbf3">
  <settings name="commands">
    <!-- This section defines the level required to use the commands
    0 : guest
    1 : user
    2 : regular
    20 : moderator
    40 : admin
    60 : fulladmin
    80 : senioradmin
    100 : superadmin
-->
<!-- Also, you can define command aliases by adding it after the
command name, separating them with '-' -->

    <set name="setmode-mode">60</set>

    <set name="roundnext-rnext">40</set>
    <set name="roundrestart-rrestart">40</set>
    <set name="kill">40</set>

    <set name="changeteam">20</set>
    <set name="swap">20</set>
    <set name="setnextmap-snmap">20</set>
  </settings>
  <settings name="messages">
    <set name="operation_denied">Operation denied</set>
    <set name="operation_denied_level">Operation denied because %(name)s is in the %(group)s group</set>
  </settings>
  <!--
    Define below gamemode presets to be used by the !setmode command.

    each preset name must start with 'gamemode_preset_' followed by the
    identifier of the preset which will be used as an argument of the
    !setmode command.
  -->
  <settings name="gamemode_preset_quickmatch">
    <set name="roundStartPlayerCount">8</set>
    <set name="roundRestartPlayerCount">4</set>
  </settings>
  <settings name="gamemode_preset_normal">
    <set name="autoBalance">true</set>
    <set name="friendlyFire">false</set>
    <set name="killCam">true</set>
    <set name="miniMap">true</set>
    <set name="hud">true</set>
    <set name="crossHair">true</set>
    <set name="3dSpotting">true</set>
    <set name="miniMapSpotting">true</set>
    <set name="nameTag">true</set>
    <set name="3pCam">true</set>
    <set name="regenerateHealth">true</set>
    <set name="vehicleSpawnAllowed">true</set>
    <set name="vehicleSpawnDelay">100</set>
    <set name="soldierHealth">100</set>
    <set name="playerRespawnTime">100</set>
    <set name="playerManDownTime">100</set>
    <set name="bulletDamage">100</set>
    <set name="onlySquadLeaderSpawn">false</set>
  </settings>
  <settings name="gamemode_preset_hardcore">
    <set name="autoBalance">true</set>
    <set name="friendlyFire">true</set>
    <set name="killCam">false</set>
    <set name="miniMap">true</set>
    <set name="hud">false</set>
    <set name="3dSpotting">false</set>
    <set name="miniMapSpotting">true</set>
    <set name="nameTag">false</set>
    <set name="3pCam">false</set>
    <set name="regenerateHealth">false</set>
    <set name="vehicleSpawnAllowed">true</set>
    <set name="vehicleSpawnDelay">60</set>
    <set name="soldierHealth">100</set>
    <set name="playerRespawnTime">100</set>
    <set name="playerManDownTime">100</set>
    <set name="bulletDamage">100</set>
    <set name="onlySquadLeaderSpawn">true</set>
  </settings>
  <settings name="gamemode_preset_infantry">
    <set name="autoBalance">true</set>
    <set name="friendlyFire">false</set>
    <set name="killCam">true</set>
    <set name="miniMap">true</set>
    <set name="hud">true</set>
    <set name="crossHair">true</set>
    <set name="3dSpotting">true</set>
    <set name="miniMapSpotting">true</set>
    <set name="nameTag">true</set>
    <set name="3pCam">false</set>
    <set name="regenerateHealth">true</set>
    <set name="vehicleSpawnAllowed">false</set>
    <set name="vehicleSpawnDelay">100</set>
    <set name="soldierHealth">100</set>
    <set name="playerRespawnTime">100</set>
    <set name="playerManDownTime">100</set>
    <set name="bulletDamage">100</set>
    <set name="onlySquadLeaderSpawn">false</set>
  </settings>
</configuration>

Offline Courgette

  • Senior Dev.
  • Hero Member
  • *
  • Posts: 4882
    • Github repository
Re: Poweradmin BF3
« Reply #12 on: November 01, 2011, 04:15:44 PM »
Thanks Wipi. I've created issue #12 based on your report.

Offline Platanos

  • Sr. Member
  • ****
  • Posts: 296
    • The Last Unit
Re: Poweradmin BF3
« Reply #13 on: November 01, 2011, 04:55:03 PM »
same Problem

Code: [Select]
111101 16:53:16	BOT    	'Poweradminbf3Plugin: Loading config /home/bigbrother/b3/extplugins/conf/plugin_poweradminbf3.xml for Poweradminbf3Plugin'
111101 16:53:16 CRITICAL 'Error loading plugin: format requires a mapping'
Traceback (most recent call last):
  File "/home/bigbrother/b3/parser.py", line 608, in loadPlugins
    self._plugins[plugins[s]['name']] = getattr(pluginModule, '%sPlugin' % plugins[s]['name'].title())(self, plugins[s]['conf'])
  File "/home/bigbrother/b3/extplugins/poweradminbf3.py", line 41, in __init__
    Plugin.__init__(self, console, config)
  File "/home/bigbrother/b3/plugin.py", line 56, in __init__
    self.loadConfig(config)
  File "/home/bigbrother/b3/plugin.py", line 115, in loadConfig
    self.onLoadConfig()
  File "/home/bigbrother/b3/extplugins/poweradminbf3.py", line 59, in onLoadConfig
    self.getMessage('operation_denied_level')
  File "/home/bigbrother/b3/plugin.py", line 87, in getMessage
    return msg % args
TypeError: format requires a mapping

Offline wipi

  • Jr. Member
  • **
  • Posts: 39
Re: Poweradmin BF3
« Reply #14 on: November 01, 2011, 05:27:52 PM »
Thanks Wipi. I've created issue #12 based on your report.

No Problem! I hope you can fix the problem ;-)

 


Rate this page +1 at Google Search

anything