[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.

[MODDB] Ban Hammer

Postby SamT » 31 Jul 2009, 06:51

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/viewtopi ... &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
SamT
Past Contributor
Past Contributor
 
Posts: 91
Joined: 14 Jun 2009, 16:29
Location: Sacramento, CA, USA
Real name: Sam

Re: [ALPHA] Ban Hammer

Postby Obsidian » 31 Jul 2009, 12:26

How does it determine the "Banned" rank?
User avatar
Obsidian
Supporter
Supporter
 
Posts: 866
Joined: 13 May 2008, 15:20
Real name: Damian

Re: [BETA] Ban Hammer

Postby SamT » 31 Jul 2009, 18:49

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
SamT
Past Contributor
Past Contributor
 
Posts: 91
Joined: 14 Jun 2009, 16:29
Location: Sacramento, CA, USA
Real name: Sam

Re: [BETA] Ban Hammer

Postby Obsidian » 01 Aug 2009, 14:02

Sweet! I'll look into the source and chew you out later. :)
User avatar
Obsidian
Supporter
Supporter
 
Posts: 866
Joined: 13 May 2008, 15:20
Real name: Damian

Re: [RC1] Ban Hammer

Postby SamT » 02 Aug 2009, 05:05

RC1 Is out.

EDIT: RC2 is out
User avatar
SamT
Past Contributor
Past Contributor
 
Posts: 91
Joined: 14 Jun 2009, 16:29
Location: Sacramento, CA, USA
Real name: Sam

Re: [RC2] Ban Hammer

Postby bonelifer » 16 Aug 2009, 00:58

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',
User avatar
bonelifer
Moderator Team Leader
Moderator Team Leader
 
Posts: 1475
Joined: 24 Jun 2006, 17:48
Location: htpc.MythBuntu
Real name: William

Re: [RC4] Ban Hammer

Postby SamT » 16 Aug 2009, 05:05

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', 

Add After
Code: Select all
                            'user_rank'                => '8', 
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
SamT
Past Contributor
Past Contributor
 
Posts: 91
Joined: 14 Jun 2009, 16:29
Location: Sacramento, CA, USA
Real name: Sam

Re: [RC4] Ban Hammer

Postby bonelifer » 20 Aug 2009, 18:20

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()
User avatar
bonelifer
Moderator Team Leader
Moderator Team Leader
 
Posts: 1475
Joined: 24 Jun 2006, 17:48
Location: htpc.MythBuntu
Real name: William

Re: [RC4] Ban Hammer

Postby igorw » 26 Aug 2009, 19:27

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
igorw
Past Contributor
Past Contributor
 
Posts: 2321
Joined: 01 Jun 2006, 20:48
Real name: Igor

Re: [RC4] Ban Hammer

Postby RMcGirr83 » 26 Aug 2009, 21:17

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.
Image
User avatar
RMcGirr83
MOD Team Leader
MOD Team Leader
 
Posts: 444
Joined: 30 Nov 2006, 14:23
Real name: Rich McGirr

Re: [RC4] Ban Hammer

Postby Obsidian » 26 Aug 2009, 21:58

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
Obsidian
Supporter
Supporter
 
Posts: 866
Joined: 13 May 2008, 15:20
Real name: Damian

Re: [RC4] Ban Hammer

Postby RMcGirr83 » 27 Aug 2009, 02:09

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?
Image
User avatar
RMcGirr83
MOD Team Leader
MOD Team Leader
 
Posts: 444
Joined: 30 Nov 2006, 14:23
Real name: Rich McGirr

Re: [RC4] Ban Hammer

Postby Obsidian » 27 Aug 2009, 02:16

Correct.
User avatar
Obsidian
Supporter
Supporter
 
Posts: 866
Joined: 13 May 2008, 15:20
Real name: Damian

Re: [RC4] Ban Hammer

Postby SamT » 27 Aug 2009, 05:25

Mod is now validated.

http://www.phpbb.com/community/viewtopi ... &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
SamT
Past Contributor
Past Contributor
 
Posts: 91
Joined: 14 Jun 2009, 16:29
Location: Sacramento, CA, USA
Real name: Sam

Re: [RC4] Ban Hammer

Postby Obsidian » 27 Aug 2009, 05:56

I love you too. :beer:
User avatar
Obsidian
Supporter
Supporter
 
Posts: 866
Joined: 13 May 2008, 15:20
Real name: Damian

Next

Return to MOD Feedback

Who is online

Users browsing this forum: No registered users and 4 guests