ezrep

Easy menu-driven reporting for TF2Center lobbies. Type !r to start

version 1.05 by naknak

Download Plugin: ezrep.smx
Download Source: ezrep.sp

Description

This plugin corrects common mistakes and omissions when reporting players in a TF2Center lobby. Unambiguous reports are corrected and sent right away. Incomplete reports trigger menus to extract the missing information.

The plugin deactivates when no lobby is running (indicated by match-start and match-end announcements from TF2Center; you may also tie actions and announcements to these events).

Use

You can make reports like you always have, and let the plugin correct typos for you. You can say RED or BLU instead of our and their. You can abbreviate reports to a ridiculous degree. Any unambiguous abbreviation will work! Ambiguous abbreviations will also work (with menus)!

Regular use that is not so different from what you are used to

Abbreviated use that will save you precious keystrokes

Lazy use that will show you a menu or two

Insane Extreme Abbreviation

The plugin switches to 6v6 reporting style (!rep our roamer) automatically, using either the lobby announcement from TF2Center or the count of connected players.

Installation

Just drop ezrep.smx into your plugins folder (typically tf/addons/sourcemod/plugins). Activate by restarting your server, or with rcon sm plugins load ezrep.

If you'd prefer to compile it yourself, get the source. You can compile it with spcomp (in the scripting directory of the SourceMod distribution), or with SourceMod's online compiler.

Ezrep was developed and tested with SourceMod version 1.5.3. Limited testing with v.1.5.2 found no problems. You should not use a version older than 1.5.2 because of bad stats.

Configuration

No configuration is necessary. These cvars are available:

Event Hooks: On Lobby Launch

^1 for normal, ^3 for light green, ^4 for lime, ^5 for olive, ^6 for black

Event Hooks: On Lobby Close

Debugging

Everything Else: Troubleshooting, Limitations, To Do, Build Notes

If something doesn't work like you expect, please set convar ezrep_debug 1 and send me the relevant parts of your server log.

It is not possible to include player names in the menus (accurately). TF2Center limits access to the lobby webpage when it launches, so this information is just not available to anyone except the players. Sorry. For the same reason, things like rep myself or rep last_guy_disconnected can't work. If TF2C ever exposes an API, I will include player names in the menus.

Some have suggested getting player names from in-game class roles: this will never happen. One team's composition is not supposed to be visible to the other team, and UGC has strict rules about what happens when a plugin affects gameplay (home team forfeits). Because I don't want accidental use of the plugin to cause problems for a server owner, the plugin will never make use of secret information.

Ditto reps (!r" or !r') to repeat the last rep would be nice.

The scanner is a large regular expression generated by Perl embedded in the .sp source. If you want to modify (or steal!) the grammar, read the comments in the source to see how to regenerate it.

Changelog

version 1.05 2014-06-07

version 1.04 2014-06-06

version 1.03 2014-06-05

version 1.02 2014-05-27

version 1.01 2014-05-26

version 1.0 2014-05-25

initial release