View Full Version : Theif Mod
MajorFm.com
01-06-2005, 10:37 PM
Can it be set so you can't steal from a particuler usergroup?
Link14716
01-06-2005, 11:28 PM
Not yet, but it is set up on my dev board, and will be in the next major release.
MajorFm.com
01-07-2005, 01:07 PM
look forward to this...
I added that to my board with a file edit. Is it cool to post what I did?
Zachery
01-11-2005, 04:05 PM
You are more than welcome to share your mdos / addons :)
Okay, here's what I did to prevent theives from stealing from mods/admins. Never posted anything I hacked up, so hopefully this is the right format...
In /uttstore/action.theif.php find:
$thefted = $DB_site->query_first("SELECT userid, username, ".$vboptions['uttpoints_pointsfield']." AS points FROM ".TABLE_PREFIX."user WHERE ".$field."='".addslashes($data)."'");
REPLACE it with:
$thefted = $DB_site->query_first("SELECT userid, usergroupid, username, ".$vboptions['uttpoints_pointsfield']." AS points FROM ".TABLE_PREFIX."user WHERE ".$field."='".addslashes($data)."'");
find:
if (!isset($thefted['userid'])) {
$message = "User does not exist.";
uttstore_print_end_message($message);
}
ADD underneath:
if ($thefted[usergroupid]==6 || $thefted[usergroupid]==7) {
$message = "Cannot steal from staff, asshat. You have been banned.";
uttstore_print_end_message($message);
}
Change the message to whatever you want, the script doesn't really ban them for that. I just thought it was funny.
This will prevent anyone from stealing from mods or admins.
docvader
01-11-2005, 05:07 PM
Doesn't work. But I like the idea.
Doesn't work. But I like the idea.
OH! I think I know what I forgot. Hang on...
edit: Should be fixed now. I did this a while ago and forgot exactly what I had done...
MajorFm.com
01-11-2005, 07:24 PM
can you set this to usergroups to? instead of just mods and admin?
Link14716
01-11-2005, 07:24 PM
OH! I think I know what I forgot. Hang on...
edit: Should be fixed now. I did this a while ago and forgot exactly what I had done...
This will be in 0.96 actually whenever it is released. I'll be an option for Thief and Change Other User's Custom Title.
can you set this to usergroups to? instead of just mods and admin?
Yeah, just follow the format in that IF statement...
Add another: || $thefted[usergroupid]==????????
MajorFm.com
01-11-2005, 08:10 PM
Great, thank you for shareing this!
Lionel
04-29-2005, 04:04 PM
Thanks. I automatically give 200 points to new users and they are being ripped off. Can it also be made that you cannot steal from anyone with less than 10 posts?
Thanks. I automatically give 200 points to new users and they are being ripped off. Can it also be made that you cannot steal from anyone with less than 10 posts?
Yeah, that should be pretty easy to do. I'll try to remember to look at it after work, unless someone else posts it before that.
Thanks. I automatically give 200 points to new users and they are being ripped off. Can it also be made that you cannot steal from anyone with less than 10 posts?
This hack assumes that you haven't installed the code I posted above...
In action.thief.php find:
$thefted = $DB_site->query_first("SELECT userid, username, ".$vboptions['uttpoints_pointsfield']." AS points FROM ".TABLE_PREFIX."user WHERE ".$field."='".addslashes($data)."'");
REPLACE with:
$thefted = $DB_site->query_first("SELECT userid, username, posts, ".$vboptions['uttpoints_pointsfield']." AS points FROM ".TABLE_PREFIX."user WHERE ".$field."='".addslashes($data)."'");
find:
if ($userid == $bbuserinfo['userid']) {
$message = "You may not steal from yourself!";
uttstore_print_end_message($message);
}
Add under:
if ($thefted[posts]<=10) {
$message = "Leave the little ones alone now!";
uttstore_print_end_message($message);
}
Lemme know if you also used the code I posted earlier in this thread and I'll adjust it...
btw, I can't test this right now, but the code is simple. It should work without issue.
Lionel
05-03-2005, 02:15 AM
Thanks. This is how I did it earlier.
$thefted = $DB_site->query_first("SELECT userid, usergroupid, username, ".$vboptions['uttpoints_pointsfield']." AS points FROM ".TABLE_PREFIX."user WHERE posts > 0 AND ".$field."='".addslashes($data)."'");
if (!isset($thefted['userid'])) {
$message = "User does not exist <br />or, You may not steal from users with less than 10 posts.";
uttstore_print_end_message($message);
}
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.