mybb / merge-system

The MyBB Merge System allows for easy merging of an existing forum (be it MyBB or another forum software) into a MyBB 1.8.x forum.
Other
34 stars 33 forks source link

Ban Module #220

Closed veryard closed 5 years ago

veryard commented 5 years ago
burner1024 commented 5 years ago

Just tried this. 1) All bans end today (well, at least permanent ones, I only have those). 2) Ban reason is missing. 3) Ban source is always "MyBB Engine". 4) Several "Guest" accounts somehow creeped in? Maybe those are deleted users?

Captura de pantalla de 2019-03-22 21-20-09

I don't mean to be picky, of course, just trying to help too.

veryard commented 5 years ago

Just tried this.

  1. All bans end today (well, at least permanent ones, I only have those).
  2. Ban reason is missing.
  3. Ban source is always "MyBB Engine".
  4. Several "Guest" accounts somehow creeped in? Maybe those are deleted users?

Captura de pantalla de 2019-03-22 21-20-09

I don't mean to be picky, of course, just trying to help too.

Thanks for the feedback:

  1. Will have a look, MyBB has a weird dateline field that i'll need to code from phpBB.
  2. phpBB has two reasons, one that is given and one that is shown, at the moment i'm just pulling the ban_reason not the ban_give_reason (I'll make it pull the ban_give_reason if the initial one is empty)
  3. I don't think phpBB store the user id against the ban when banned? (Would need to pull from the phpbb_log but these can be cleared so im not to sure.
  4. I'm not sure about this, I only had 2 users and they both came through no guests.

I'll get to everything on Sunday.

Thanks, Brad.

euantorano commented 5 years ago

I'll keep this as requiring changes until I've had a chance to test, then approve it if it looks like everything works. Thanks for the contribution šŸ˜„

burner1024 commented 5 years ago
  1. I definitely have an account with both reasons filled in, still comes up empty in MyBB.

  2. I think you're right about the logs. It would be helpful to pull the source from there, but it's not crucial.

  3. Yes, it appears that deleted users can leave lingering bans, db integrity is not enforced. Can probably just skip these:

    select count(ban_id) from phpbb_banlist where ban_userid not in (select user_id from phpbb_users);
    +---------------+
    | count(ban_id) |
    +---------------+
    |             8 |
    +---------------+
  4. Also, there are IP and email bans, ideally they should be transferred as well.

veryard commented 5 years ago

Hello,

Have made changes:

  1. Also, there are IP and email bans, ideally they should be transferred as well.

I looked into this, looks like MyBB stores these bans in the banfilters table which is a bit odd considering it all could be done from one table. I'll have to extend the code to do this some where down the line.

euantorano commented 5 years ago

Iā€™d be happy with email/IP bans being added at a later date, I think having just standard band would be a big enough improvement on its own.

On 23 Mar 2019, at 02:17, Brad Veryard notifications@github.com wrote:

Hello,

Have made changes:

Reason will pull from ban_give_reason if ban_reason is empty Deleted users or users that do not exist in the users table are ignored. bantime is now generated based from the phpBB fields ban_start & ban_end, treats bans less than one day as a one day ban. (phpBB allows users to be banned for 30 mins, 1 hour etc etc.) Also, there are IP and email bans, ideally they should be transferred as well. I looked into this, looks like MyBB stores these bans in the banfilters table which is a bit odd considering it all could be done from one table. I'll have to extend the code to do this some where down the line.

ā€” You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

veryard commented 5 years ago

Let me know if you need me to fix/update anything.

Brad.

burner1024 commented 5 years ago

What if the text contains valid tags, though? Code snippets, etc.

veryard commented 5 years ago

What if the text contains valid tags, though? Code snippets, etc.

Sorry, I don't understand what you're saying?

burner1024 commented 5 years ago

err... that was for the pull for issue #223

veryard commented 5 years ago

err... that was for the pull for issue #223 I see, well phpBB uses BBCodes aswell, so they are code snippets are inside the [code] BBCode.