Raised This Month: $51 Target: $400
 12% 

[ANY] Report to Forums


Post New Thread Reply   
 
Thread Tools Display Modes
winterghost
Member
Join Date: Dec 2012
Old 03-19-2013 , 19:12   Re: [ANY] Report to Forums
Reply With Quote #31

Hey. First of all, great plugin! However, it's not working exactly as intended. (Running on SMF by the way).

I've set rtf_debug to 1, but the log is blank. EDIT: It updates the time so it's modifying the log, but it's still blank...
L 03/20/2013 - 001:12: [reporttoforum_smf.smx] Debug file completed

Secondly, it worked, but it behaved weirdly. Instead of creating a new topic, it changed the ID of the OP for another topic, and posted a reply to that topic. Looking in the database, it created a correct entry for topic too, but it did not set the message IDs, so the topic did not display.
Once I removed the topic it changed, it no longer does anything visible, but creates dodgy topics still.

EDIT: here's a few pics from phpmyadmin.
The smf_topics table: http://gyazo.com/dca397237785c57278569b85d753396e.png
The smf_messages table: http://gyazo.com/ec382c57be07f4688acd7b9935c45192.png

It's because your SQL is not updating the topics entry with the ID of the message and the poster. You are gonna need another SQL statement to update the smf_topics entry with the message ID:

UPDATE smf_topics SET id_first_msg='<message_id>', id_last_msg='<message_id>', id_member_started='<rtf_reporterid>', id_member_updated=''<rtf_reporterid>' WHERE id_topic='<the topic id from before>';

Last edited by winterghost; 03-19-2013 at 19:49. Reason: sql prob
winterghost is offline
Doc-Holiday
AlliedModders Donor
Join Date: Jul 2007
Old 03-19-2013 , 19:52   Re: [ANY] Report to Forums
Reply With Quote #32

Quote:
Originally Posted by winterghost View Post
Hey. First of all, great plugin! However, it's not working exactly as intended. (Running on SMF by the way).

I've set rtf_debug to 1, but the log is blank. EDIT: It updates the time so it's modifying the log, but it's still blank...
L 03/20/2013 - 001:12: [reporttoforum_smf.smx] Debug file completed

Secondly, it worked, but it behaved weirdly. Instead of creating a new topic, it changed the ID of the OP for another topic, and posted a reply to that topic. Looking in the database, it created a correct entry for topic too, but it did not set the message IDs, so the topic did not display.
Once I removed the topic it changed, it no longer does anything visible, but creates dodgy topics still.

EDIT: here's a few pics from phpmyadmin.
The smf_topics table: http://gyazo.com/dca397237785c57278569b85d753396e.png
The smf_messages table: http://gyazo.com/ec382c57be07f4688acd7b9935c45192.png

It's because your SQL is not updating the topics entry with the ID of the message and the poster. You are gonna need another SQL statement to update the smf_topics entry with the message ID:

UPDATE smf_topics SET id_first_msg='<message_id>', id_last_msg='<message_id>', id_member_started='<rtf_reporterid>', id_member_updated=''<rtf_reporterid>' WHERE id_topic='<the topic id from before>';
SMF is very bug and will most likely become unsupported.. The topic table doesn't have a timestamp section. I have a beta copy here with me that writes a timestamp into a random field simply so i can get the right topic ID.

But they have made it really hard to support their boards lol... Ill see if this works for me (hopefully it doesnt have weird side effects)

The way I was getting around it had LARGE room for errors lol.. I was getting SQL_GetRowCount and using the returned number as the new topic.

Last edited by Doc-Holiday; 03-19-2013 at 19:56.
Doc-Holiday is offline
winterghost
Member
Join Date: Dec 2012
Old 03-19-2013 , 20:05   Re: [ANY] Report to Forums
Reply With Quote #33

Quote:
Originally Posted by Doc-Holiday View Post
SMF is very bug and will most likely become unsupported.. The topic table doesn't have a timestamp section. I have a beta copy here with me that writes a timestamp into a random field simply so i can get the right topic ID.

But they have made it really hard to support their boards lol... Ill see if this works for me (hopefully it doesnt have weird side effects)

The way I was getting around it had LARGE room for errors lol.. I was getting SQL_GetRowCount and using the returned number as the new topic.
It keeps changing the message IDs of the wrong topics. If you are using GetRowCount, I can see why - remember SMF (and I assume other boards too) auto increment topic IDs, so if a row is deleted the next insert doesn't take the same ID, but instead you get a gap. EG 1456, 1458 (1457 was deleted).
What about SELECT MAX(id_topic) FROM smf_topics? I know it's another query but that should work better.

If all else fails, SMF has really good PHP integration, so if you were to alter the SMF version so it POSTS to a php file, you could include the SMF files (SSI and subs-Post) and just call createPost.

Last edited by winterghost; 03-19-2013 at 20:07.
winterghost is offline
Doc-Holiday
AlliedModders Donor
Join Date: Jul 2007
Old 03-19-2013 , 20:29   Re: [ANY] Report to Forums
Reply With Quote #34

Quote:
Originally Posted by winterghost View Post
It keeps changing the message IDs of the wrong topics. If you are using GetRowCount, I can see why - remember SMF (and I assume other boards too) auto increment topic IDs, so if a row is deleted the next insert doesn't take the same ID, but instead you get a gap. EG 1456, 1458 (1457 was deleted).
What about SELECT MAX(id_topic) FROM smf_topics? I know it's another query but that should work better.

If all else fails, SMF has really good PHP integration, so if you were to alter the SMF version so it POSTS to a php file, you could include the SMF files (SSI and subs-Post) and just call createPost.
Ill try the SELECT MAX way of doing it .. The queries are all there already just need to change Select * from smf_topics to SELECT MAX blah.

There is another solution but might cause panic lol..
Code:
ALTER TABLE smf_topics ADD timestamp int(10) unsigned;
And it can use a timestamp ... defaults to 0 when you create a post via the website.

Ill have a test version up for you in a min with the SELECT MAX

EDIT: Main Post Updated

Last edited by Doc-Holiday; 03-20-2013 at 05:29.
Doc-Holiday is offline
lyric
Veteran Member
Join Date: Sep 2012
Old 03-19-2013 , 20:56   Re: [ANY] Report to Forums
Reply With Quote #35

Hey Doc-Holiday any chance you saw this new and somewhat old issue here? https://forums.alliedmods.net/showpo...2&postcount=28
__________________
lyric is offline
winterghost
Member
Join Date: Dec 2012
Old 03-19-2013 , 21:22   Re: [ANY] Report to Forums
Reply With Quote #36

The test version you uploaded works well, good job One little thing - when it reports a player for 'Not a team player', the end gets cut off - it looks like '<name> - Not a team playe'. Not sure why this occurs - the reasons has it correctly, and I can edit it in the database table to add the e.

A few ideas - can the plugin include the things below in the post?
  • A message to the player after he has chosen the reason to go to the forum and provide proof (for hacking etc)
  • Demos from SourceTV (might need to u/l to an ftp, possibly too much to ask!)
  • Dump SMAC log for the player when the reason is hacking (if it exists)
  • Dump console log for the 5 minutes before the report (to view chat etc)
  • Require multiple players to report the person before the report is sent (use the code for the vote counter from RTV?)
  • If an admin is on the server, message them rather than make the post (or tell the player to use admin message)

Last edited by winterghost; 03-19-2013 at 21:45.
winterghost is offline
Doc-Holiday
AlliedModders Donor
Join Date: Jul 2007
Old 03-19-2013 , 21:44   Re: Re: [ANY] Report to Forums
Reply With Quote #37

Quote:
Originally Posted by winterghost View Post
Works well, good job One little thing - when it reports a player for 'Not a team player', the end gets cut off - it looks like '<name> - Not a team playe'. Not sure why this occurs - the reasons has it correctly, and I can edit it in the database table to add the e.

A few ideas - can the plugin include the things below in the post?
  • Demos from SourceTV (might need to u/l to an ftp, possibly too much to ask!)
  • Dump SMAC log for the player when the reason is hacking (if it exists)
  • Dump console log for the 5 minutes before the report (to view chat etc)
  • Require multiple players to report the person before the report is sent (use the code for the vote counter from RTV?)
  • If an admin is on the server, message them rather than make the post (or tell the player to use admin message)
It might be an array size..... I'll update the main post with the new smf version.

As for the suggestions. I'll keep them in mind if you see my todo list up top you'll see the admin notification thing. It would still post but would also notify admins when that player joins and if they are already in.
Doc-Holiday is offline
Doc-Holiday
AlliedModders Donor
Join Date: Jul 2007
Old 03-20-2013 , 05:27   Re: [ANY] Report to Forums
Reply With Quote #38

Fairly Large Update....

1.0.4
Fixed a few bugs with the debug function and changed the file format.
Fixed SMF Support - Thanks to winterghost
Added phpbb Support

1.0.5
All boards are now supported from within 1 plugin.
Added New Cvar to alert admins when a player is reported and by whom
Fixed phpbb and applied the smf fix to main plugin.
Clear target info upon completion of report.
Apply report 'penalty' after the final selection is made. (exiting the menu's will not count against you)
Doc-Holiday is offline
4bdul
AlliedModders Donor
Join Date: Dec 2011
Location: United Kingdom
Old 03-20-2013 , 08:30   Re: [ANY] Report to Forums
Reply With Quote #39

Just some suggestions:

- Disable reporting (or sending the report message to admin chat) when an admin is online/non-spectator.
- Ability to report players that disconnected recently.
__________________
4bdul is offline
winterghost
Member
Join Date: Dec 2012
Old 03-20-2013 , 11:05   Re: [ANY] Report to Forums
Reply With Quote #40

Quote:
Originally Posted by 4bdul View Post
Just some suggestions:

- Disable reporting (or sending the report message to admin chat) when an admin is online/non-spectator.
- Ability to report players that disconnected recently.
+1 to both of those.

I will test the integrated plugin soon and will post back with the result.



For my idea of reading logs, I found this elsewhere - https://forums.alliedmods.net/showthread.php?t=59192 - a parse of console.log for the last 5 minutes could be posted with the report?

For SourceTV, popoklopsi was talking about ftp uploads with sockets (https://forums.alliedmods.net/showthread.php?t=145219), maybe you could use something like that and poke around SMAC AutoDemo (http://forums.alliedmods.net/showthread.php?t=204116) for the code on triggering SourceTV?

As for a second DB to store, why not a SQlite DB to keep it on the gameserver rather than another MySQL DB with an extra set of login details. You'd only realistically need the details for the people making the report (for however many are required to send said report) and the steam ID of the accused to be stored (I'm assuming the reported player still has to be on the server when the report is sent, so their details aren't needed until the report is sent).

You could also use the same SQlite database for the admin warning - store the reason for each report, and have it display to the admin (if online) like this: "[SM] xxxxx has been reported for griefing, stealing and being a good player. Do you wish to take action?". If the admin bans/kicks/whatever the player, then the report is closed and sent as Processed by <admin>, or they type !no and report is closed.

It would be preferable to send a message to admin chat instead of the full report being posted, if an admin is on with a specific flag - that way it is only sent to high ranking admins, so reports that occur with low admins on are still sent to the forum.
__________________
winterghost is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 16:29.


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