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: PowerAdminCoD7  (Read 15127 times)

Offline Freelander

  • XLRstats dev.
  • Dev. Team
  • Hero Member
  • *
  • Posts: 1000
PowerAdminCoD7
« on: April 19, 2011, 02:00:19 PM »
Description

This plugin adds some extra functionality to B3 in both ranked and unranked CoD:Blackops servers.

Commands

Ranked servers only:
 !pasetmap <mapname> - Set the next map in rotation

Ranked/Unranked servers:
 !paplaylist - Display current playlist
 !pagetplaylists - Display available playlists
 !pasetplaylist <playlist_number> - Set a playlist
 !paexcludemaps <maps> - Excludes entered maps from rotation. Example: !paexludemaps mp_villa mp_nuked mp_array
 !paversion - Identifies PowerAdminCoD7 version and creator
 !paident [<playername>] - Show the ip and guid of a player
 !paset <cvar> <value> - Set a server cvar to a certain value
 !paget <cvar> - Returns the value of a server cvar
 !pasetdlc <dlc number> <on | off> - Turn given DLC mappack on or off. Example: !pasetdlc 1 off.
 !palistcfg - List available server config files in b3 conf folder
 !paload <configfile.cfg> - Load a server configfile.


Unranked servers only:
 !pafastrestart - Restart current map without reloading it
 !pamaprestart - Restart current map
 !pagametype <gametype> - Change gametype. Example: !gametype tdm

Changelog

- 19.04.2011 - v1.0
    - Initial release
- 02.06.2011 - v1.1
    - DLC2 maps added
- 09.06.2011 - v1.2
    - !pasetmap (!setmap) command now works both with console map names and easy map names as well as console map name without "mp_" at the beginning. (as printed out by !maps command)
    - Added new commands !pasetdlc, !palistcfg and !paload
- 28.07.2011 - v1.3
    - DLC3 maps added

Notes
-----
If you're loading a config file using !paload command, it may take a while to load the complete file depending on the file size. Note that, during the loading process, other B3 commands issued will be queued but they may timeout. Hence it is NOT recommended to load config files in peak server times.

Download
« Last Edit: February 18, 2012, 11:42:04 AM by Freelander »

Offline [DAD]GrimReaper

  • Full Member
  • ***
  • Posts: 128
Re: PowerAdminCoD7
« Reply #1 on: April 19, 2011, 04:24:38 PM »
Thanks, this is now running on the [DAD] Servers, we will test it tonight

Offline Drummer611

  • Full Member
  • ***
  • Posts: 62
Re: PowerAdminCoD7
« Reply #2 on: April 19, 2011, 07:33:46 PM »
Good job Freelander!  I'll be testing that in my Ranked server.

Offline Platanos

  • Sr. Member
  • ****
  • Posts: 296
    • The Last Unit
Re: PowerAdminCoD7
« Reply #3 on: April 26, 2011, 08:44:03 PM »
Hi
i test this on my ranked server but i got an error mp_nuketown is not a stock CoD7 map ??

110426 20:39:38   CONSOLE   140:51 say;9309652;1;[ACF]Silencer;!setmap nuketown
110426 20:39:38   VERBOSE   Queueing event Say !setmap nuketown
110426 20:39:38   VERBOSE   Parsing Event: Say: AdminPlugin
110426 20:39:38   DEBUG   AdminPlugin: OnSay handle 5:"!setmap nuketown"
110426 20:39:38   DEBUG   AdminPlugin: Handle command !setmap nuketown
110426 20:39:38   DEBUG   Poweradmincod7Plugin: Requested map for next round is mp_nuketown
110426 20:39:38   VERBOSE   RCON sending (195.122.135.110:3244) 'tell 1 ^0(^2ACF^0)^7: ^3[pm]^7 mp_nuketown is not a stock CoD7 map, please check your spelling and try again!'

Offline Spruehwurstheinz

  • Sr. Member
  • ****
  • Posts: 234
Re: PowerAdminCoD7
« Reply #4 on: April 26, 2011, 09:00:27 PM »
yeah, well, mp_nuketown is not a map, it tells you the truth.

mp_nuked is the name of the map.

Offline Platanos

  • Sr. Member
  • ****
  • Posts: 296
    • The Last Unit
Re: PowerAdminCoD7
« Reply #5 on: April 26, 2011, 09:38:51 PM »
Only the half maps works z.b Radiation, Crisis, Array and Cracked others not
WDM is translate to mp_wdm usw.

class Poweradmincod7Plugin(b3.plugin.Plugin):
    _adminPlugin = None
    _isranked = None
    _issetmap = False
    _isplaylist_enabled = True
    _admin_excluded_maps = None
    _cod7maps = {
                  'mp_array' : 'Array',
                  'mp_cracked' : 'Cracked',
                  'mp_crisis' : 'Crisis',
                  'mp_firingrange' : 'Firing Range',
                  'mp_duga' : 'Grid',
                  'mp_hanoi' : 'Hanoi',
                  'mp_cairo' : 'Havana',
                  'mp_havoc' : 'Jungle',
                  'mp_cosmodrome' : 'Launch',
                  'mp_nuked' : 'Nuketown',
                  'mp_radiation' : 'Radiation',
                  'mp_mountain' : 'Summit',
                  'mp_villa' : 'Villa',
                  'mp_russianbase' : 'WMD',
                  'mp_berlinwall2' : 'Berlin Wall',
                  'mp_discovery' : 'Discovery',
                  'mp_kowloon' : 'Kowloon',
                  'mp_stadium' : 'Stadium'
« Last Edit: April 26, 2011, 09:42:02 PM by Platanos »

Offline Spruehwurstheinz

  • Sr. Member
  • ****
  • Posts: 234
Re: PowerAdminCoD7
« Reply #6 on: April 26, 2011, 09:54:59 PM »
It seems to work with the original names, the translation is only used after the nextmap is set for the ingame message.

Try "nuked" as nextmap, but should be possible to modify this function :)

Offline Freelander

  • XLRstats dev.
  • Dev. Team
  • Hero Member
  • *
  • Posts: 1000
Re: PowerAdminCoD7
« Reply #7 on: April 29, 2011, 01:11:08 PM »
You must use console names for map names, otherwise it won't work.

Offline Freelander

  • XLRstats dev.
  • Dev. Team
  • Hero Member
  • *
  • Posts: 1000
Re: PowerAdminCoD7
« Reply #8 on: June 02, 2011, 10:09:49 PM »
v1.1 released. It includes DLC 2 maps. See first post for download link.

Offline Sars

  • Full Member
  • ***
  • Posts: 72
Re: PowerAdminCoD7
« Reply #9 on: June 06, 2011, 01:00:11 AM »
Code: [Select]
    def cmd_pasetmap(self, data, client, cmd=None):
        '''\
        <mapname> - Set the next map in rotation
        (You can safely use the command without the 'pa' at the beginning)
        '''
        if not self._isranked:
            client.message('This command is not functional in unranked servers. You can use ^2!map ^7or ^2!maprotate ^7 commands instead.')
            return False

        if not data:
            client.message('missing parameter, try !help pasetmap')
            return False
        else:
            data = data.split(' ')
            mapname = data[0].lower()
            if mapname.startswith('mp_'):
                mapname = mapname
            else:
                mapname = ('mp_%s' % mapname)

Is there any way to have this look at both map name and real map name? so that i can type !pasetmap Hanoi ?

thanks Freelander



Offline Prez

  • Beta Testers
  • Full Member
  • *
  • Posts: 118
    • cgs-clan.com
Re: PowerAdminCoD7
« Reply #10 on: June 06, 2011, 09:57:10 AM »
This is really a great plugin, especially for unranked servers when playing matches.

If i could wish for an additional feature it would be !paexec. I'd like to be able to store some cfg's in the B3 directory containing a handful of cvars. For example one cfg for competitive mode with cvars according to the esl ruleset, g_password "xxxxx" etc and another cfg for public mode with g_password "", g_gameytpe "gungame", sv_mapRotation "" and others. That would be really great.


Offline Freelander

  • XLRstats dev.
  • Dev. Team
  • Hero Member
  • *
  • Posts: 1000
Re: PowerAdminCoD7
« Reply #12 on: June 07, 2011, 05:00:12 PM »
This is really a great plugin, especially for unranked servers when playing matches.

If i could wish for an additional feature it would be !paexec. I'd like to be able to store some cfg's in the B3 directory containing a handful of cvars. For example one cfg for competitive mode with cvars according to the esl ruleset, g_password "xxxxx" etc and another cfg for public mode with g_password "", g_gameytpe "gungame", sv_mapRotation "" and others. That would be really great.

Thanks Prez for the kind words.

Regarding your request, I don't think it's possible to execute a remote file (remote to gameserver) using rcon exec or am I wrong?

Offline Prez

  • Beta Testers
  • Full Member
  • *
  • Posts: 118
    • cgs-clan.com
Re: PowerAdminCoD7
« Reply #13 on: June 07, 2011, 06:01:31 PM »
I can't answer you that Freelander, my knowledge about these things is way too limited.

I was just assuming that it's somehow possible as the official rcon tool and other 3rd party rcon tools let you save and load/execute cfg files. The poweradmin plugin for UrT has the paexec command which allows me to execute cfg's that are stored in the servers root folder. Wouldn't it be possible to let the plugin scan for configs in other folders than the gameservers directory?

Anyway, my fortune does not depend on this feature and there is probably not much demand for something like this by other people than me. Just thought i'd ask and maybe someone would say "sure no biggie".  ;)

Offline Freelander

  • XLRstats dev.
  • Dev. Team
  • Hero Member
  • *
  • Posts: 1000
Re: PowerAdminCoD7
« Reply #14 on: June 07, 2011, 07:45:27 PM »
official rcon tool and other 3rd party rcon tools let you save and load/execute cfg files.

Then it should be doable. I'll check that. Thanks!

 


Rate this page +1 at Google Search