ETPower-Mod Read me

ETPower-Mod is a lua-mod, designed to be used as a substitute for external Perl scripts.  This mod does things vastly above and beyond what is capable of by these Perl scripts, and you do not need to have shell access to be able to use it.

 

ETPower-Mod is designed for the specific purposes.

  1. Ease of setup: ETPower-Mod uses a 5 level system for admin'ing, this is on top of the RCON, Referee, and Semiadmin settings you can use with a normal ETPro server.  The server administrator is able to add Power Users using the SetPU command, and list Power Users using the ListPU command. 

 

As of version 0.3, there is also a password option, which when used, can set password entry to that power user level.  The level 0 password is controlled by the rconpassword, while the other passwords are assigned using the p_puxpass variables.  To disable sign-in, just set the p_puxpass to an empty string.

 

  1. Ease of use:  ETPower-Mod uses chat to send/receive commands.  To use them simply chat, as you normally would, but the first word should be the command (such as !kick) then the parameter’s separated by spaces.  This makes admining a server easier, as you are not required to obstruct your view with the console to enter a command.

 

  1. More Control:  ETPower-Mod is able to give you more control over what is and isn’t allowed in your server.  You are able to change people’s names, kill people, power mute them (make it so they can’t /reconnect and be unmuted), and remove voting option from them.  In versions later then 0.4, there will be more things added, as they are found to be useful.

 

  1. Fun Play:  ETPower-Mod will be introducing a few other game types, as well as settings to prevent malicious behavior. 

 

I hope that you enjoy using ETPower-Mod.  If you think of things you would like to see included in it, you can join me on IRC://irc.freenode.net/#ETPower.  You can also connect to my forums at HTTP://ETPower.no-ip.org.


ETPower-Mod Setup

 

  1. You must be using ETPro 3.2.4 or higher.

 

2a. For ETPower-Mod versions 0.1 – 0.32 just put the “ETPowerMod.lua” file in your “etpro” directory.

 

2b. For ETPower-Mod version 0.4 and later just put the “ETPower.pk3” file in your “etpro"

 

  1. Optional*: Put your “rules.dat” file in your “etpro” directory.

 

  1. Optional*: With version 0.5 you can include a protected name database.  The file can be any name you wish, just specify it with p_NameProtectFile.

 

  1. Add any cfg’s you wish to add to your “server.cfg”.  Examples of all settings can be found in the included “example.cfg”.

 

  1. Add set lua_modules "ETPowerMod.lua" to your lua_modules cvar, as such:

set lua_modules "ETPowerMod.lua"

ETPower-Mod CVars

CVar

Type

Initial

ver

Description

p_pu1pass

String

0.3

Power User level 1 Password. “” to disable sign-in.

p_pu2pass

String

0.3

Power User level 2 Password. “” to disable sign-in.

p_pu3pass

String

0.3

Power User level 3 Password. “” to disable sign-in.

p_pu4pass

String

0.3

Power User level 4 Password. “” to disable sign-in.

p_puSALevel

Int

0.4

Semiadmin level used to prevent complaint system by users. 0 to disable. (0 default)

p_AdminLogFile

String

0.3

Power User Admin Power Use log file description.

p_MaxStreak

Int

0.4

Longest Winning Streak Before p_StreakBreaker is activated. If p_MapCountAction is activated before the streak is finished, the count restarts.

p_MapCount

Int

0.4

Longest Map Run between p_MapCountAction.  If p_StreakBreaker is activated before the map count is hit, the count restarts.

p_StreakBreaker

Int

0.4

 

Determines type of action when p_MaxStreak or p_MapCount is hit. 

0 = do nothing,

1 = ShuffleXP, 2 = Swap Teams,

3 = ShuffleXP and Swap Teams.

p_MapCountAction

Int

0.4

p_unlocktime

Float

0.5

Default = 0.

Time, in minutes, teams are locked after a shuffle is performed.  Callvotes and Power User shuffles are included, but ref shuffles are not. 

p_PlaySound

Int

0.5

Determines rather to play the optional sounds with ETPowerMod Actions.  Power User actions are unaffected by this cvar.

0 = off, 1 = on

p_BalanceTime

Int

0.5

Default = 30.

Time in seconds, in which, if teams are out of balance (number of players), p_BalanceAction is called.

p_BalanceAction

Int

0.5

Determines the action to take when teams go out of balance for more then p_BalnaceTime.

0= post a message, 1=shuffle,

2=random swap (swap a random player)

p_NameProtectAction

Int

0.5

Determines the action to take, if the user doesn’t have the correct Password for the clan tag and/or the protected name.

0=rename, 1=kick (no time)

2=rename then kick(no-time), 3=2min kick

p_ClanProtectTag

String

0.5

The structure of the clan tag.  Uses et color style so be precise.

p_ClanProtectPos

Int

0.5

The position of the clan tag.

0 = beginning, 1 = end.

p_ClanProtectPas

String

0.5

The password for the clan tag.  The user must have clanpwd setu’ed to match this.

(the client must do /setu clanpwd password)

p_NameProtectFile

String

0.5

The password for the name.  The user must have nickpwd setu’ed to match this. 

(the client must do /setu nickpwd password)


ETPower-Mod Commands

 

To interface with ETPower-Mod, the following commands have been added to the list of server console commands.

Server Console Commands

Command

Ver.

Description

load

0.1

use:  load

Loads the power user list for the server (backup, this is automatically done on map init)

setpu

0.1

use:  setpu <pid> <level>

Sets the user in slot pid to the specified level.

listpu

0.1

use:  listpu

Lists all power users loaded in the server.  Associates a list number with the power user ip and power user guid.

removepuip

0.1

use:  removepuip <puiplineno>

Removes the ip that was in the position of puiplineno from the power user ip list.

removepuguid

0.1

use:  removepuguid <puguidlineno>

Removes the guid that was in the position of puguidlineno from the power user guid list.

setpuip

0.3

use:  setpuip <ip> <level>

If the power user is offline, you can still add them using this command.

setpuguid

0.3

use:  setpuguid <guid> <level>

Removes the ip that was in the position of puipline from the power user ip list.

playsound

0.5

use:  playsound <target> <sound path>

Plays the wav file described in the sound path, to target.  If target is -1, then it activates the playsound_env option.

playsound_env

0.5

use:  playsound_env -1 <sound path>

or

use:  playsound_env <sound path>

This plays the sound over the entire map, the first usage is used to be compatible with other lua scripts.

sayas

0.5

use:  SayAs <Name> <Text>

This can be used to send a message to the server and let the server know who is sending them.  It is a simple formatted cpm.

ircas

0.5

use:  SayAs <Name> <Text>

This can be used to send a message to the server and let the server know who is sending them, and that you are on an IRC network.  It is a simple formatted cpm.

 


ETPower-Mod Commands Ctd.

 

For more interesting information, I have included the following client commands for users to be able to use.  Use either messagemode1 or /say to send these commands or type them into the console without a preceding / or \.

Client Commands

Command

Ver.

Description

!admintest

0.1

use:  !admintest

Reports your current Admin Level

!rules

0.1

use:  !rules

Lists the server rules, which are defined in the “rules.dat” file.

!date

0.2

use:  !date

Returns your current date and time.

!find

0.2

use:  !find <string>

Returns the pid and name of everyone that has <string> in their names.

!help

0.2

use:  !help

Returns a list of commands you can perform.  Changes for logged in power users.

!modinfo

0.2

use:  !modinfo

Returns info on the mod.  Including version, creator information, and website info.

!time

0.2

use:  !time

Returns your current time.

!adminlist

0.3

use:  !adminlist

Returns all level 1, 2, 3, and 4 admins currently playing on the server.

!login

0.3

use:  !login <password>

Logs you into power user level with the specified password that matches the one you entered.

!pass

0.3

use:  !pass <password>

Logs you into power user level with the specified password that matches the one you entered.

!password

0.3

use:  !password <password>

Logs you into power user level with the specified password that matches the one you entered.

!alarm*

0.4

use: !alarm <time>

Sets an alarm.  Time is in minutes.

!cvar

0.5

use: !cvar <server cvar>

Returns the setting of the called server cvar.

 



ETPower-Mod Commands Ctd.

 

To use these commands, you must be using the proper ETPower-Mod version or newer corresponding to the command, and must be logged in as a Power User with appropriate permissions.  Use either messagemode1 or /say to send these commands or type them into the console without a preceding / or \.

Power User Commands

Command

Ver.

Level

Description

!announce

0.1

4

use: !announce <pos> <announcement>

This command sends an announcement to every user on the server.  It contains all text in announcement, and is displayed in the pos you select.  The pos can be: 1 = Center Print, 2 = Announcement Area and Console, 3 = Scores Print

!announceme

0.1

4

use: !announceme

This announces to the server that you have logged in as administrator.  It is automatically used when a level 2, 3, or 4 admin connects to the server.

!cancelvote

0.1

4

use: !cancelvote

This cancels the current vote in process.

!cantvote*

0.1

2

use: !cantvote <pid>

This makes it so the player in slot <pid> cannot vote.

!canvote

0.1

2

use: !canvote <pid>

This returns the ability for the player in slot <pid> to vote.

!demute

0.1

4

use: !demute <pid>

This removes the locks on the player, he can now be voted unmute by the server.

!info

0.1

3

use: !info <pid>

This returns info about the player.  This info includes his name, ip, guid, PlayerID, and PBID, as well as his power user level.

!kill

0.1

2

use: !kill <pid>

This is used to kill a player; they are instantly put into the limbo menu.

!kick

0.1

4

use: !kick <pid>

This kicks the player for 2 minutes

!kick

0.1

2

use: !kick <pid> <time>

This kicks the player for <time> seconds.

!mute*

0.1

4

use: !mute <pid>

This mutes the player, and based on your power user level, does extra protections.  For Power Users level 1-2, a cantvote is added to the player, for Power Users level 3 and 4, a persistent mute is only added (to protect against them /reconnecting to remove the mute).

!passvote

0.1

4

use: !passvote

This passes the current vote in process.

!putspec

0.1

4

use: !putspec <pid>

Removes the player from the team they are on and puts them into spectator mode.


ETPower-Mod Commands Ctd.

 

Power User Commands ctd.

Command

Ver.

Level

Description

!ref

0.1

3

use: !ref <pid>

Use this to ref yourself, or anyone else playing on the server.  You will not have the ref protection, but will have access to the ref menu.

!rename

0.1

3

use: !rename <pid> <new name>

Changes the name of the player.

!shufflexp

0.1

3

use: !shufflexp

Performs a standard shuffle teams based on xp, and restarts the map.

!shufflexpnr

0.1

4

use: !shufflexpnr

Performs a shuffleteams based on xp without a restart

!unmute

0.1

4

use: !unmute <pid>

Removes the persistent mute from the player and if he is cantvoted, removes that as well.

!warn

0.1

4

use: !warn <pid> <warning>

Sends a warning to the player.

!#

0.2

0

use: !# <cmd/cvar>

Sends the rcon command to the server.  Just use !# g_gravity 100 to change gravity to 100.

!baduser

0.3

4

use: !baduser <pid> <reason>

Adds a player to the bad user list, and adds the reason to the list as well.

!config

0.3

3

use: !config <config name>

Runs the specified config file.

!exec

0.3

3

use: !exec <cfg name>

Executes the specified cfg file.

!listbadusers

0.3

4

use: !listbadusers

Lists all bad users currently playing on the server

!nextmap

0.3

3

use: !nextmap

Loads the next map in the campaign or cycle. 

!putteam

0.3

4

use: !putteam <pid> <team>

Places the player onto the specified team.  Team can be defined as: axis, red, or r for axis, and allies, blue, or b for allies.

!lockspec

0.4

3

use: !lockspec <pid>

Locks the person in the slot you specify into the spectator mode.  They are unable to join a team until you remove the lock

!unlockspec

0.4

4

use: !unlockspec <pid>

Unlocks the person from the lock spec.

!unlocspecall

0.4

4

use: !unlockspecall

Removes all locked specs stored on your server.

 


ETPower-Mod Change Log

0.4

pk3 file distribution – This eases the installation, and storage of previous versions.  Also provides support for future versions with sound support.  The file stored in the pk3, overrides the one on the server. 

 

Auto shuffle Support – Controlled by four variables

·         p_MaxStreak This controls the longest winning streak before p_StreakBreaker is activated.

·         p_MapCount – This controls the longest map run before p_MapCountAction is activated

·         p_MapCountAction – This controls what happens when p_MapCount is activated.  The options are 0 to do nothing, 1 to shuffle XP, 2 to swap teams, 3 to shuffle XP then swap teams.

·         p_StreakBreaker  – This controls what happens when p_MaxStreak is activated.  The options are 0 to do nothing, 1 to shuffle XP, 2 to swap teams, 3 to shuffle XP then swap teams.

 

p_puSALevel – Controls the semiadmin level that all power users are automatically logged onto.  The reason for this is to protect power users from complaints, as well as to optionally give the power users access to additional commands.

 

Power User Say Commands

!lockspec use: !lockspec <pid> – locks the person in the slot you specify into the spectator mode.  They are unable to join a team until you remove the lock

 

!unlockspecuse: !unlockspec <pid> – unlocks the person from the lock spec.

 

!unlocspecalluse: !unlockspecall – removes all locked specs stored on your server.

 

Client User Say Commands

!alarm use: !alarm <time> - sets an alarm.  Time is in minutes.

 

New Commands

/say_admin – say to admins only

/say_admin sends the text you enter to all admins currently logged on the server, it even lets you know how many admins it is sent to.  If you are admin, it does not count you.

 

Say Command Extended Support

Say commands, for server console, including rcon, level 0 and level 1 power users, are available via commands.  All commands maintain original design, however just include a / before them and enter them as you would any command.  eg. /!kill <pid> into your console.

 

Command Manipulation

/m – private messaging use: /m <slot/string> <text>

The /m now works with slot number, if no one is in the specified slot; it then redefaults to standard settings (partial name matching).


ETPower-Mod Change Log Ctd.

0.5

Built in Sounds – The first implementation of the sound setup for ETPower-Mod.  Everything is included in the pk3, the file is downloaded by the client, so make sure you have it in your http redirect if you are using one, all optional sounds are controlled by the p_PlaySound cvar, however the Power User commands are always followed by a sound.

 

Shuffle Lock – Teams (including spectators) are locked for the amount of time defined in the cvar p_unlocktime, which is translated to minutes.

 

Autobalance – Team balance is monitored using 2 new and 1 old cvar. 

·         g_balancedteams If this is set to 1, autobalance is activated.

·         p_BalanceTime – This controls the amount of time, in seconds, before p_BalanceAction is activated.  The default is 30 seconds.

·         p_BalanceAction – This controls what happens when p_BalanceTime is hit, 0 = print a message, 1 = shuffle teams w/o a restart, 2 = random swap (individual team members are swapped to the other team, to balance the team.

 

Name and Clan-tag protection – Fairly strict enforcement of names and clan tags can be enforced using the following cvars/files.

ProtectedName\ProtectionType\[IP]\[GUID]\[Password]\

·         ProtectedName, ProtectionType, and one of the following are required, IP, GUID, or Password.

·         You must have 5 slashes per line

·         ProtectedName should, but does not need ET color coding.

·         ProtectionType is an integer value, 1 or 2

o        1 = Exact match

o        2 = Color code are removed for matching.

 

Cross map settings fixed – Alarm, mute and cantvote now work across maps, in version 0.1 through 0.4x they reset at the end of a map.

 

Server CVAR checking – Clients now can check the settings of certain server cvars.  All password cvars are excluded from checking.

 

Console saying as users – SayAs and IRCAs have been added to accommodate external interfaces to allow user names to be used for external communication..