[Release] Report player command

02/05/2010 12:10 pro4never#1
Ok so this is a messy release that I'm sure no one will use but I figured I'd throw it out there for people who want it.


What it is is a command to report a player and it will store who used the command, who was reported and the reason in a handy little database for gm's to use later.

Personally I plan to use it (or a cleaned up version) to allow moderators to report problems or hackers for when a gm is not online. It's not perfect as it is but it works.

Note: this version is CoEmu but really... it's not hard at all to convert.

Handlers>Chat.cs


Notice you will have some undefined strings. Go up to the top of the file and see string[] Command = Message.Substring(1).Split(' ');

Place these two under that

string Command1 = Message.Substring(1);
string Result = "";

That's just what I used for clearing out the initial part of the msg so that you could write more than 1 word reasons for reporting a player. Simple but somewhat messy fix.


Now Database>Database.cs

PHP Code:
 public static void ReportPlayer(ClientSocket CSocketClientSocket RSocketstring Report1)
        {
            
lock (DatabaseConnection.NewConnection())
            {

                
MySqlCommand Cmd = new MySqlCommand("insert into `Report`(`WhoReport`, `WhoReported`, `Report`) values ('" CSocket.Client.Name "', '" RSocket.Client.Name "', '" Report1 "')"DatabaseConnection.NewConnection());

                
Cmd.ExecuteNonQuery();
            }
        } 

And for the database itself. Open up navicat and create a new database.

Mine is called "Report" with the following fields

ReportUID, int, 11, 0 notnull, key, auto incrimented
WhoReport, varchar, 20, 0, notnull
WhoReported, varchar, 20, 0, notnull
Report, varchar, 200, 0, notnull

That should be all you need, you will wanna add a bool under Characters.cs for "isHH", that's the new moderator position I am adding for players with improved server rights (such as reporting, don't want noobs spamming up the log)


You can also use this type of a thing to log server events such as errors for later reference.... but that's a different thing and I'm super tired so yah.

Enjoy,
Pro4never
02/05/2010 13:01 sawickas#2
I like xD
02/05/2010 15:52 Metapod#3
good job
02/05/2010 18:19 hunterman01#4
This is actually a useful release
02/05/2010 20:28 Arcо#5
I can see this being abused+spammed database.
Not saying its bad lol.
Good job I just see it being abused.
02/05/2010 20:57 pro4never#6
Quote:
Originally Posted by .Arco View Post
I can see this being abused+spammed database.
Not saying its bad lol.
Good job I just see it being abused.
That's why it's only a gm/pm/moderator command. Normal players can't report players for that simple reason.
02/08/2010 04:05 copz1337#7
could you please convert this for 5165?
02/08/2010 04:20 pro4never#8
No: None of my releases are for 5165 because I have no interest whatsoever in that source.

Beside, any time I spend coding (or awake it seems) is spent working on my server. Working on finishing up my 1v1 dueling system right now actually... I release some of the features I code from time to time simply because I enjoy contributing to epvp.
02/08/2010 05:48 hunterman01#9
Quote:
Originally Posted by pro4never View Post
No: None of my releases are for 5165 because I have no interest whatsoever in that source.

Beside, any time I spend coding (or awake it seems) is spent working on my server. Working on finishing up my 1v1 dueling system right now actually... I release some of the features I code from time to time simply because I enjoy contributing to epvp.
Except the stuff we code isnt getting released

Btw i found that top spouse status i was looking for
02/08/2010 10:49 pro4never#10
Quote:
Originally Posted by hunterman01 View Post
Except the stuff we code isnt getting released

Btw i found that top spouse status i was looking for
yah exactly. I do release small stuff though that helps people without giving away the functionality of my server (aka this)


Nice job with top spouse! If you could get a list of all the halo id's for reference that would be awesome. As it is right now I only remember a few of them.

As soon as I compile the next rev we will have

-Fully functioning beta duel system (everything works perfectly, simplified for testing though)
-Perfectly balanced ninja skills (since my corrected distance checks to avoid laggy hits ninjas are OVER nerfed lol)
-Correct more attack bugs
-Finally get around to fixing the status update packet so all the effects are working again (shhhh, that was a 6 am coding fuckup after being up all night)

After that is done all I can think of that needs to happen is more systems, minor bug fixes, more npcs and, obviously, more systems (I'm thinking guild war reward system next so that people have a reason to do guild war)

Honestly if we can finish up a few more events and track down a few more bugs we will be very prepared for beta (I'll leave pre-beta up for another week or so though so we can fully test the new shit before going beta)


Damnit! I always do this, I go off topic and ramble where no one cares what I have to say.


Back to my mini-release ;)
03/12/2010 19:23 vgcman1500#11
Nice release ^^
03/12/2010 20:29 xI NiNJA DuCKey#12
+1, Nice Release, Use [code] next time
03/12/2010 21:02 Arcо#13
Quote:
Originally Posted by xI NiNJA DuCKey View Post
+1, Nice Release, Use [code] next time
[code] or [php], he used [php], as long as it keeps it organized it doesn't really matter.
03/12/2010 21:50 herekorvac#14
great job :)
03/13/2010 12:55 xI NiNJA DuCKey#15
use [code] ftw?
Thanks.