AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [ANY] Map Reporter (https://forums.alliedmods.net/showthread.php?t=179112)

ecca 02-25-2012 15:58

[ANY] Map Reporter
 
5 Attachment(s)
Map Reporter

A plugin that allows users to say !reportmap "reason" to report bugs on map to the server operators.

You can switch between MySQL or use a txt file

Installation:
  • Copy the mapreporter.smx to your plugins directory
Screenshots:
http://ffac.eu/SourceMod/log.png



http://ffac.eu/SourceMod/mysql.png

Cvars:
  • sm_mapreporter_advert //Allows you to change if it should advert to users on round start
Setup:
Quote:

Databases.cfg:
"mapreporter"
{
"driver" "mysql"
"host" "YourHost"
"database" "YourDatabase"
"user" "YourUser"
"pass" "YourPassword"
//"timeout" "0"
//"port" "0"
}

MySQL Table:

CREATE TABLE IF NOT EXISTS `map_reports` (
`map` varchar(100) NOT NULL,
`player` varchar(100) NOT NULL,
`steamid` varchar(100) NOT NULL,
`comment` varchar(100) NOT NULL,
`date` varchar(100) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

Webinterface:
Just download it, edit the mysql connection and upload it into your webhost.

ToDo:
Quote:

- Nothing
Plugin Changelog:
Quote:

Map Reporter 1.4
- See for changes: https://forums.alliedmods.net/showpo...5&postcount=14
Map Reporter 1.3
- Fixed so it checks automaticlly if you have setup a database ready to use for the plugin
- Fixed possible mysql injection
- Fixed GetCmdArgString instead so it pickup whole string
- Fixed threaded query
Map Reporter 1.2
- Fixed the autoexec so the ConVars should be right now. Thanks Impact
- Renamed autoexec file to small leters. Thanks Impact
Map Reporter 1.1
- Fixed client 0 is invalid
- Changed to PrintToChatAll instead of printing to each client
Map Reporter 1.0
- Initial release

WebbInterface Changelog:
Quote:

Webinterface 1.0
- Initial release


McFlurry 02-25-2012 17:14

Re: [ANY] Map Reporter
 
The heading at the top should say "Map Reporter" shouldn't it?

ecca 02-25-2012 17:15

Re: [ANY] Map Reporter
 
Haha yes it should, i did it fast from my other plugin i submitted today, fixed thanks

Drixevel 02-25-2012 17:40

Re: [ANY] Map Reporter
 
Why is it every plugin idea I start thinking of you do in A second. lol, no problem though.

Good plugin though, thank you.

ecca 02-25-2012 20:27

Re: [ANY] Map Reporter
 
Updated version 1.1, Fixed error that client 0 is invalid, also using printtochatall instead of print to each client.

Impact123 02-26-2012 00:19

Re: [ANY] Map Reporter
 
PHP Code:

AutoExecConfig(true"sm_MapReporter"); 

Should come before you check if some cvar is xyz.
Also i suggest that you write configfiles in small letters.

Yours sincerely
Impact

ecca 02-26-2012 02:55

Re: [ANY] Map Reporter
 
Thanks impact, updated 1.2

NagarD 03-01-2012 08:53

Re: [ANY] Map Reporter
 
correct url for Webinterface - http://ffac.eu/projekt/SourceMod/map_reports.zip.

ecca 03-01-2012 10:14

Re: [ANY] Map Reporter
 
Sorry forgot to update it, fixed thanks

DarthNinja 03-01-2012 19:00

Re: [ANY] Map Reporter
 
A few things I noticed after a quick look:
  • You escape the players name, but not their input? :nono:
  • FastQuery is not threaded, you should probably use TQuery.
  • You should use SQL_CheckConfig before trying to connect.
  • Ideally you could also remove the sql/text cvar and always use SQL. Then fall back to text if SQL_CheckConfig returns false.
  • You could use GetCmdArgString to get the comment, then players would not have to use quotes.
  • It looks like you have a typo (" ms") on line 94.
  • Instead of (GetConVarInt(MySQL_Usage) == 1) you should use (GetConVarBool(MySQL_Usage))


It might also be useful to save the players location when they use the command.
Then it would also be possible to load the reports from the database, stick them in a menu, and allow admins to view, teleport to, and delete reports.




All times are GMT -4. The time now is 10:20.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.