[MODDB] Ban Hammer

Post your MODs, receive and provide feedback!
Topics in this forum are not for MOD support, they are for giving the author feedback.
Forum rules
The topics in this forum are not for general MOD support, they are for giving the MOD author some feedback, ideas and bug reports.
SamT
Past Contributor
Past Contributor
Posts: 79
Joined: 14 Jun 2009, 16:29
Real name: Sam
Location: Sacramento, CA, USA
Contact:

[MODDB] Ban Hammer

Post by SamT »

MOD title: Ban Hammer - MCP Module
MOD description: One click bans and rids profile data of spammers entered in the box. You may also use this to remove all their topics, replies, attachment, and PMs they sent.
MOD version: 1.0.0 RC2
phpBB version: 3.0.5
Development stage: RC
MOD Format: MODX
Features:
  • MCP Module - No file edits!
  • Bans list of users with pre-defined reasons/parameters
  • Removes all attachments they set
  • Option to delete all Topics and Replies
  • Option to delete all PMs the sent

MOD download: http://www.phpbb.com/community/viewtopic.php?f=69&t=1756785

Screenshots:
banhammer2demo.png


Planned Features:
I have some more info on 1.1, this is the final feature list of features that are being implemented:
  • Ban Hammer accessible via ACP
  • Ban Hammer accessible via MCP
  • ACP Configuration
    • Assign Trash Can Forum, instead of deletion
    • Assign rank to give hammered members
    • Set predefined Ban reasons
  • Three new Permissions
    • a_hammer_ban - If an admin can use the Ban Hammer
    • a_hammer_settings - If an admin can configure the settings
    • m_hammer_ban - if a moderator can use the Ban Hammer
  • Stop Forum Spam integration - A more last minute feature, but it will have the abilty to automatically report Hammered Users.
  • Error Handling - The current version really has nothing aside from "You can't ban the founder" in terms of error handling, but this new version will be more user friendly in that department.
  • Ability to define a usernote - to give to everyone as the Hammering is taking place
  • Archive spammer's PMs - to posts in the "trash forum"


Notes: This is potentially, a very dangerous tool and could really mess up user's accounts if used improperly. It is only to be entrusted to the most responsible of moderators. This module is only meant to be used for spam bot accounts that need quick ridding of, this is not for typical rule breaker, legitimate user bans.
User avatar
Obsidian
Supporter
Supporter
Posts: 736
Joined: 13 May 2008, 15:20
Real name: Damian
Contact:

Re: [ALPHA] Ban Hammer

Post by Obsidian »

How does it determine the "Banned" rank?
SamT
Past Contributor
Past Contributor
Posts: 79
Joined: 14 Jun 2009, 16:29
Real name: Sam
Location: Sacramento, CA, USA
Contact:

Re: [BETA] Ban Hammer

Post by SamT »

I decided not to put it in for the public release, because that is more of just my own board, but I would be happy to insert the line or two of code that will automatically give them a rank.

BETA is out! :D
User avatar
Obsidian
Supporter
Supporter
Posts: 736
Joined: 13 May 2008, 15:20
Real name: Damian
Contact:

Re: [BETA] Ban Hammer

Post by Obsidian »

Sweet! I'll look into the source and chew you out later. :)
SamT
Past Contributor
Past Contributor
Posts: 79
Joined: 14 Jun 2009, 16:29
Real name: Sam
Location: Sacramento, CA, USA
Contact:

Re: [RC1] Ban Hammer

Post by SamT »

RC1 Is out.

EDIT: RC2 is out
User avatar
bonelifer
Administrator
Administrator
Posts: 477
Joined: 24 Jun 2006, 17:48
Real name: William
Location: htpc.MythBuntu

Re: [RC2] Ban Hammer

Post by bonelifer »

For those of you with evil<3's Gender mod installed here's the code that needs added to reset the Gender to "Not Specified". It needs no extra queries as "user_gender" is added to the phpbb_users table when you install the Gender mod.

OPEN:

Code: Select all

includes/mcp/mcp_ban_hammer.php


FIND:

Code: Select all

                     'user_interests'      => '',


AFTER, ADD:

Code: Select all

                     'user_gender'         => '0',
SamT
Past Contributor
Past Contributor
Posts: 79
Joined: 14 Jun 2009, 16:29
Real name: Sam
Location: Sacramento, CA, USA
Contact:

Re: [RC4] Ban Hammer

Post by SamT »

RC4

If you would like to assign a rank at the same time as a ban, follow these steps:

1) Log into your ACP > Users and Groups (tab) > Manage Ranks
2) Find the rank you wish to assign banned users, and click edit
3) Look in your URL bar it might look something like this:

Code: Select all

http://localhost/community/adm/index.php?i=ranks&sid=c8334d9d20ff52826f4dedb9682&mode=ranks&action=edit&id=8

4) At the end, you will see a value called id, in this case, "id=8"
5) Now that you know your rank id (8 in this sample), open root/includes/mcp/mcp_ban_hammer.php
Find:

Code: Select all

                            'user_birthday'            => ' 0- 0-   0',&nbsp;&nbsp;&nbsp;&nbsp

Add After

Code: Select all

                            'user_rank'                => '8',&nbsp;&nbsp;&nbsp;&nbsp
Be sure to change '8' to what your rank's id you wish to assign is.
6) Save and test it out (No need to purge cache)
User avatar
bonelifer
Administrator
Administrator
Posts: 477
Joined: 24 Jun 2006, 17:48
Real name: William
Location: htpc.MythBuntu

Re: [RC4] Ban Hammer

Post by bonelifer »

Sam-T, you need to also take into account, registered but not activated(by user) accounts. Possibly check for this and activate the account if it's not already, then have it Ban Hammer.


Code: Select all

General Error
SQL ERROR [ mysqli ]

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 3 [1064]

SQL

UPDATE phpbb_users SET user_birthday = ' 0- 0- 0', user_rank = '52', user_avatar = '', user_avatar_type = 0, user_avatar_width = 0, user_avatar_height = 0, user_sig = '', user_from = '', user_icq = '', user_aim = '', user_yim = '', user_msnm = '', user_jabber = '', user_website = '', user_occ = '', user_interests = '', user_gender = 0 WHERE user_id =

BACKTRACE

FILE: includes/db/mysqli.php
LINE: 162
CALL: dbal->sql_error()

FILE: includes/mcp/mcp_ban_hammer.php
LINE: 104
CALL: dbal_mysqli->sql_query()

FILE: includes/functions_module.php
LINE: 507
CALL: mcp_ban_hammer->main()

FILE: mcp.php
LINE: 238
CALL: p_master->load_active()
igorw
Past Contributor
Past Contributor
Posts: 1967
Joined: 01 Jun 2006, 20:48
Real name: Igor

Re: [RC4] Ban Hammer

Post by igorw »

Nice MOD. It would be nice to have an option of moving all posts to a forum (trash can) for archiving purposes instead of deleting.
User avatar
RMcGirr83
Supporter
Supporter
Posts: 6242
Joined: 30 Nov 2006, 14:23
Real name: Rich McGirr

Re: [RC4] Ban Hammer

Post by RMcGirr83 »

Sam,

Does this mean, if an admin applies full ban hammerage upon the user (deletes everything) does that name then not become available for re-registration because it is hammered (and no, not like on a Friday or Saturday night ;) )?

Doesn't matter, just wondering.
User avatar
Obsidian
Supporter
Supporter
Posts: 736
Joined: 13 May 2008, 15:20
Real name: Damian
Contact:

Re: [RC4] Ban Hammer

Post by Obsidian »

RMcGirr83 wrote:Sam,

Does this mean, if an admin applies full ban hammerage upon the user (deletes everything) does that name then not become available for re-registration because it is hammered (and no, not like on a Friday or Saturday night ;) )?

Doesn't matter, just wondering.


The user is NOT deleted, it is just banned beyond recognition. The profile and all relevant fields are cleaned out, really.
User avatar
RMcGirr83
Supporter
Supporter
Posts: 6242
Joined: 30 Nov 2006, 14:23
Real name: Rich McGirr

Re: [RC4] Ban Hammer

Post by RMcGirr83 »

Obsidian wrote:The user is NOT deleted, it is just banned beyond recognition. The profile and all relevant fields are cleaned out, really.


Right, so if IRCC the default phpBB code, to a normal user the name will not be allowed as it has already been taken by a registered, yet banned, user.

Si?
User avatar
Obsidian
Supporter
Supporter
Posts: 736
Joined: 13 May 2008, 15:20
Real name: Damian
Contact:

Re: [RC4] Ban Hammer

Post by Obsidian »

Correct.
SamT
Past Contributor
Past Contributor
Posts: 79
Joined: 14 Jun 2009, 16:29
Real name: Sam
Location: Sacramento, CA, USA
Contact:

Re: [RC4] Ban Hammer

Post by SamT »

Mod is now validated.

http://www.phpbb.com/community/viewtopic.php?f=69&t=1756785


eviL<3 wrote:Nice MOD. It would be nice to have an option of moving all posts to a forum (trash can) for archiving purposes instead of deleting.

I really wanted to do this (and I might be doing this for the version running on my own site) but phpBB does not have a standard trash can yet. It is more then likely I will rewrite this mod when phpBB decides on a soft delete system.

@bonelifer, I am coming up with a patch for the user not activated issue. I will need to make a diff for this one as Obsidian is impossible. >_>
User avatar
Obsidian
Supporter
Supporter
Posts: 736
Joined: 13 May 2008, 15:20
Real name: Damian
Contact:

Re: [RC4] Ban Hammer

Post by Obsidian »

I love you too. :beer:
Post Reply