#dev | Logs for 2023-06-15

« return
[05:06:43] -!- kolie2 has quit [Read error: Connection reset by peer]
[05:06:48] -!- kolie2 [kolie2!~justin@47.180.mlm.kw] has joined #dev
[21:11:25] -!- kolie [kolie!~kolie@Soylent/Staff/Management/kolie] has joined #dev
[21:13:36] -!- mechanicjay [mechanicjay!~mechanicj@Soylent/Staff/Sysop/mechanicjay] has joined #dev
[21:13:36] -!- mode/#dev [+v mechanicjay] by Hera
[21:14:18] <mechanicjay> sure
[21:14:31] <kolie2> sweet
[21:14:35] <kolie2> hey how are you seeing the current db values
[21:19:41] <kolie> loggie is here be on good behavior.
[21:19:43] <kolie> my $potential_moderators =
[21:19:43] <kolie> getPotentialModerators($constants, $slashdb, $user_activity_period, $karma_min, $age_min);
[21:19:59] <kolie> If he's in that list he could get some.
[21:20:47] <kolie> That list is affected by a minimum of, how active they've been recently in modding, karma, m1_pointgrand_end has to do with some account age.
[21:21:49] <mechanicjay> what's your SECLEV on the site?
[21:22:05] <kolie> "users_info",
[21:22:05] <kolie> "karma >= $karma AND lastaccess_ts > DATE_SUB(CURDATE(), INTERVAL $user_activity_period MINUTE) AND (points = 0) AND (uid <= $highest_elligable_uid) AND uid != $anon_uid ORDER BY lastgranted ASC"
[21:22:11] <kolie> infinite.
[21:22:21] <kolie> I can see the db too.
[21:22:25] <mechanicjay> at a high enough SECLEV, you get the config button across the top of the Admin bar, hit that, then hit vars
[21:22:38] <mechanicjay> then use the silly drop down to find what you're looking for
[21:22:48] <kolie> auto complete for the LOSE
[21:22:51] <mechanicjay> all that stuff, AFAIK is a direct read/write to the db
[21:22:58] <kolie> it is.
[21:23:09] <kolie> ok so you are seeing the db - and i think it should be 0.3
[21:23:11] <kolie> what did you think it was
[21:23:41] <mechanicjay> I though it should 1 -- which would enable everyone to moderate
[21:24:08] <kolie> so let me see how that percentage plays out.
[21:25:32] <kolie2> So it looks like
[21:25:38] <kolie2> it gets a list and only goes through .3 of it.
[21:25:44] <kolie2> If that list is stable or not -
[21:25:55] <kolie2> I don't see any randomness here.
[21:26:12] <kolie2> a db query could consistenly leave c0lo out depending or sort or index storage on disk
[21:26:20] <kolie2> affecting the query values so hes always shorted.
[21:28:14] <kolie2> So getModeratorCount is called to $current_mod_count
[21:28:20] <mechanicjay> hmm
[21:28:21] <kolie2> that finds people in the db who have any points
[21:28:35] <kolie2> then we get a few constants.
[21:28:44] <kolie2> Then we get "potential mods" based on the above query.
[21:28:53] <kolie2> karma > mod_elig_minkarma
[21:29:09] <kolie2> 0 rn
[21:29:48] <kolie2> and a last access - lastaccess_ts > DATE_SUB(CURDATE(), INTERVAL $user_activity_period MINUTE)
[21:30:11] <kolie2> mod activity level is 5
[21:30:31] <kolie2> You have to be active in the last 5 minutes to get mod p's?
[21:30:57] <kolie2> last access _ ts > ( current date - 5 minutes )
[21:31:54] <kolie2> weird - im just reading the code.
[21:33:05] <kolie2> so potential_moderators = users where karma > 0 && last access > 5 minutes ago && they have no points && they are atleast x% of the age of the sites users.
[21:33:24] <kolie2> $current_eligible_count = the number of rows of potetial mods
[21:33:36] <kolie2> total eligible is current mods + current eligible count.
[21:33:56] <kolie2> And the current percentage is total elligible - current / total users elligible.
[21:36:15] <kolie2> Of that group of people, 30% of them are going to get atleast 10 and potential 25 points - unless vars.
[21:36:39] <kolie2> The vars are 5 minimum...
[21:37:55] <kolie2> mod_max_points_per_user doesnt exist so 25.
[21:38:24] <kolie2> so we calculate users to hand out to $current_eligible count * .3
[21:38:53] <mechanicjay> this seems very complex..
[21:39:06] <kolie2> going through it
[21:39:12] <kolie2> basically - get a list of people who have mod points
[21:39:16] <kolie2> make a list of people who can get mod points
[21:39:23] <kolie2> calculate how many people we want to give mod points to
[21:39:50] <kolie2> and then based on the list of people who can - give some of them - a number of points based on the parameters for who and how many.
[21:41:06] <kolie2> ahh!
[21:41:12] <kolie2> Ok so thats how.
[21:41:14] <kolie2> It is sorted
[21:41:19] <kolie2> by last granted ascending.
[21:41:29] <kolie2> But you have to be around.
[21:41:37] <kolie2> "karma >= $karma AND lastaccess_ts > DATE_SUB(CURDATE(), INTERVAL $user_activity_period MINUTE) AND (points = 0) AND (uid <= $highest_elligable_uid) AND uid != $anon_uid ORDER BY lastgranted ASC
[21:42:28] <kolie2> so if you have positive karma, and your lastaccess_ts was after 5 minutes ago, and you have no points, and you are a user on the site of a certain uid age, and you arent anon - return that list with the person with no mod points given the longest ago first.
[21:42:40] <kolie2> What's c0lo's last granted value.
[21:45:35] <mechanicjay> should be something like: select lastgranted from users_info where uid=156;
[21:45:56] <kolie2> ill check it later. peace.
[21:46:12] <kolie2> https://github.com
[21:46:13] <systemd> ^ 03rehash/plugins/Moderation/process_moderation.pl at 2da7f2be8619ce1b2d53760241e303ced9880b42 ( https://github.com )
[21:46:18] <kolie2> Thats the magic sauce.
[21:46:21] <kolie2> ttyl