AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   SourceBans / SourceBans++ (https://forums.alliedmods.net/forumdisplay.php?f=152)
-   -   Release SourceBans++ (v1.6.4) [Updated: 2021-10-06] (https://forums.alliedmods.net/showthread.php?t=263735)

daleGEND 03-03-2016 09:32

Re: [RELEASE] SourceBans++ (v1.5.4.1) [Updated: 2016-03-01]
 
I'm working on a theme for 1.5.4 and wanted to see if anyone is interested in it. https://forums.alliedmods.net/showthread.php?t=279850

KaktusCZ 03-06-2016 14:50

Re: [RELEASE] SourceBans++ (v1.5.4.1) [Updated: 2016-03-01]
 
Hi, can you add command (cmd) for add admin through console?

jpwanabe 03-06-2016 14:51

Re: [RELEASE] SourceBans++ (v1.5.4.1) [Updated: 2016-03-01]
 
Quote:

Originally Posted by KaktusCZ (Post 2400086)
Hi, can you add command (cmd) for add admin through console?

That is a really really really bad idea. It makes your server completely insecure, and all of your other servers completely insecure.

EDIT: Any one know of a way to see an enhanced block list. Like more then the 10 most recent.

durangod 03-07-2016 14:51

Re: [RELEASE] SourceBans++ (v1.5.4.1) [Updated: 2016-03-01]
 
Hi, thanks for doing this :)

However i would like to get rid of this line in the footer. Sorry but even joking about a cheat is not that funny in todays world.

How do i remove this?

Quote:

"built in cheat 1.6 - my friend told me theres a cheat where u can buy a car door and run around and it makes u invincible...." - gdogg
Thanks

UPDATE: i found it. May i remove it please? I will just make it a empty array or something simple, or if you have a preference of what you would like in the array i will do that as well.

How about this :)
Quote:

Life is hard. It's even harder if your stupid!....", "John Wayne"
I like this one because its by me! :)

Quote:

"Unfortunately you suffer from Dunning-Kruger effect", "DurangoDave"



Also this is showing
Quote:

Error connecting (xxx.xxx.xxx.xx: xxxxx)
from gameservers, i have the tech looking at it now and i have set up the debug php file for him to check out as well. I have also added the game server ip to the remote mysql tool in cpanel.

sneaK 03-07-2016 18:06

Re: [RELEASE] SourceBans++ (v1.5.4.1) [Updated: 2016-03-01]
 
Just want to check, am I now safe to download the latest release? I saw there were many issues with the first release of 1.5.4.

durangod 03-07-2016 21:21

Re: [RELEASE] SourceBans++ (v1.5.4.1) [Updated: 2016-03-01]
 
Blackhawk74 - there are just a few piddly errors in the error log when i installed it but nothing serious, i cleared them out and the error log as been clean since. And nothing in the cpanel error log either. The only issue i am having is connecting. But everything else seems to work great.



On another note:

This is in the little demo window that pops up on the hacker report form for this plugin. Is this still accurate?

Quote:


While you are spectating the offending player, press the ` key on your keyboard. Then type record [demoname] and hit enter. Also type sb_status for extra information in SteamBans servers. The file will be in your mod folder.


nguyenbaodanh 03-07-2016 23:06

Re: [RELEASE] SourceBans++ (v1.5.4.1) [Updated: 2016-03-01]
 
It will be great if ADMINS with flags Z can see live server console (if possible) like HLSW

durangod 03-08-2016 00:20

Re: [RELEASE] SourceBans++ (v1.5.4.1) [Updated: 2016-03-01]
 
Also would be nice to show someone how to get someone's SteamID if they dont know how. I added this to my report form.

Code:

If you do not know how to get someones SteamID you can go here: <a href="https://steamcommunity.com/sharedfiles/filedetails/?id=209000244" target="_blank">Get SteamID</a>
<br />
<br />

also rather than fill up our server with videos when someone reports a cheater. Wouldn't it be just as good to have a field input so they could just share their youtube link, that way let youtube store it not us.

durangod 03-08-2016 08:09

Re: [RELEASE] SourceBans++ (v1.5.4.1) [Updated: 2016-03-01]
 
Hi modders and fadders lol

i did solve the connection issue. You have to have your web side host open the UDP port that is the same port number as your game server port on the game server side. And boom it works... just wanted to share the news.

durangod 03-09-2016 00:18

Re: [RELEASE] SourceBans++ (v1.5.4.1) [Updated: 2016-03-01]
 
1 Attachment(s)
Preface:

Ok this post will be kind of long and I wanted to contribute my part to this so as to help the dev a bit. I hope he adds my mod to the production version.

First let me say that I learned that you have to set up your main admin group for the primary admin for the web side of this before they will get an email on new requests. The php mail is inside and if statement that it will only execute if the permissions are set for the admin.

Once I set the permissions and added the admin to the group the email went out.


Also the only issue I am having now (if you want to even call it an issue) is that the section that does the updates is not connecting to get updates, it says failed. But that's ok I would rather download the updates anyway, but it would be nice to know if there was one available.


OK now for the MOD

Make sure you copy from the file and not from this post because I tried really hard to keep track of the changes as I went so I could just copy and paste but I found a few I missed and I don't know how because every time I made a change I put it on my notepad. Anyway the files should be perfectly accurate because that is what I am running.



What it does:

This mod to this plugin adds a youtube field at the end of the "report player" form so that someone can submit a link to their youtube video of the player they are reporting. It validates that url input as either:

Quote:


https://www.youtube.com/watch?v=zzzzzzzzz
https://youtu.be/zzzzzzzzz

as http or https and with or without the www

Then it includes the link on the email that the admin gets so they can click on the link from their email.

Basic MOD Code Addition:

I added a field to the sb_submission table called tube

Quote:

tube VARCHAR 70 None utf8_general_ci Null(yes)
I edited four files: 3 theme files and 1 process php file

Files edited:
(3) themes/<theme_name>/page_submitban.tpl
(1) pages/page.submit.php

I will attach one default theme file (as a sample - just repeat on other 2) and the page.submit.php file if it will let me do so below.

DONT FORGET TO LOG INTO ADMIN WHEN YOU ARE DONE AND REFRESH THE CACHE!


Detailed Code Changes:


themes/<theme_name>/page_submitban.tpl Do this 3x once for each theme

Code:


<!-- added for youtube url input -->
      <tr>
        <td width="20%">
          Youtube Link:
        </td>
        <td>
          <input name="youtube_link" type="text" size="40" maxlength="70" value="{$youtube_link}" class="textbox" style="width: 250px;" />
        </td>
      </tr>
<!-- end add youtube url input -->

pages/page.submit.php 1x

THESE CHANGES ARE IN DIFFERENT PLACES IN THE FILE - I HAVE POSTED THE CHANGES SEQUENTIAL TOP TO BOTTOM


PHP Code:

 
//added for youtube link
        
$Youtubelink "";
        
$youtubepre "";
        
$got_tubelink "";
//end youtube link add 

look for next part

PHP Code:

 
//added for youtube link
        
        
$youtubepre = (string) trim($_POST['youtube_link']);
        
$tubepattern "#(https?:\/\/).*?(?:youtu\.be\/|(?:www\.)?youtube\.com\/watch(?:\.php)?\?.*v=)([a-zA-Z0-9\-_]+)#";
        
$Youtubelink preg_match$tubepattern$youtubepre$matches);
//end youtube link add 

look for next part


PHP Code:


//added for youtube link
           
if(!empty($youtubepre) )
           {
             if(!
$Youtubelink)  // will be 0 or 1
             
{
             
               
$errors .= '* The youtube link is not a valid youtube url.<br>';
        
$validsubmit false;
              }else{
                     
$got_tubelink $matches[0];
                    }
//close else if youtubelink
           
}//close if !empty
//end added for youtube link 

look for next part

PHP Code:

 
 
//added tube to the end 
//and added another ? to the end for tube value
   
$pre $GLOBALS['db']->Prepare("INSERT INTO ".DB_PREFIX."_submissions(submitted,SteamId,name,email,ModID,reason,ip,subname,sip,archiv,server,tube) 
VALUES (UNIX_TIMESTAMP(),?,?,?,?,?,?,?,?,0,?,?)"
);
   
$GLOBALS['db']->Execute($pre,array($SteamID,$PlayerName,$Email,$modid[0],$BanReason$_SERVER['REMOTE_ADDR'], $SubmitterName$BanIP$SID$got_tubelink)); 

look for next part

PHP Code:

 
 
//added reinit for var
   
if(!empty($_FILES['demo_file']['name']))
    
$GLOBALS['db']->Execute("INSERT INTO ".DB_PREFIX."_demos(demid,demtype,filename,origname) VALUES (?, 'S', ?, ?)", array($subid$filename$_FILES['demo_file']['name']));
   
$SteamID "";
   
$BanIP "";
   
$PlayerName "";
   
$BanReason "";
   
$SubmitterName "";
   
$Email "";
   
$SID = -1;
   
$Youtubelink ""

look for next part


PHP Code:

                        
 
//added youtube link
    
$message .= "Player: ".$_POST['PlayerName']." (".$_POST['SteamID'].")\nDemo: ".(empty($_FILES['demo_file']['name'])?'no':'yes (http://' $_SERVER['HTTP_HOST'] . $requri 'getdemo.php?type=S&id='.$subid.')')."\n".$mailserver."Reason: ".$_POST['BanReason']."\n\n"."Youtube Link:".$got_tubelink."\n\n"

go to bottom of file to see the next part

PHP Code:

 
//added for youtube link
$theme->assign('youtube_link',  $got_tubelink);
//end added for youtube link 

Now run the sql to add the new field to the table or you can do it manually if you wish

Code:


either
 
tube  VARCHAR  70  None utf8_general_ci  Null (yes)
 
or
 
ALTER TABLE  `sb_submissions` ADD  `tube` VARCHAR( 70 ) CHARACTER SET
utf8 COLLATE utf8_general_ci  NULL

DONE GREAT JOB!!!

Refresh your cache from admin and your good to go.. enjoy!


Files included:

youtubemod.zip

which includes:
page_submitban.tpl Template file
page.submit.php Process file

Thanks, Dev hope this helps you and everyone :)


All times are GMT -4. The time now is 06:28.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.