Online banlist?

Post Reply
Master Jay
Posts: 139
Joined: Mon Mar 29, 2010 10:28 pm

Online banlist?

Post by Master Jay »

Hey, I know I was gone for such a long time. I didn't need a lot of modding when I left. But now I have a question. Its not really modding BUT, it has something with my server ban list. Okay so my question today is, how do I enable my server ban list to a SMF site? Any suggestions? I was trying to make it look like this kinda, Name: Reason: Time: Admin: Keyhash:. Is this possible?
Image
Im Watching You... When You Sleep!
freddy
Posts: 1267
Joined: Sun Oct 18, 2009 4:58 pm

Post by freddy »

dunno how to do that, i use a logparser

Image

http://en.sourceforge.jp/projects/sfnet_dclp/
Master Jay
Posts: 139
Joined: Mon Mar 29, 2010 10:28 pm

Re: Online banlist?

Post by Master Jay »

Hey, thanks for the reply. I couden't really understand how to do this using a SMF forum. I read the README.txt but nothing helped. Can you guide me threw this please?
Image
Im Watching You... When You Sleep!
freddy
Posts: 1267
Joined: Sun Oct 18, 2009 4:58 pm

Post by freddy »

uww i dont know what a SMF forum is?

you need the usual setup with MySQL, apache and php for this to work
Master Jay
Posts: 139
Joined: Mon Mar 29, 2010 10:28 pm

Re: Online banlist?

Post by Master Jay »

do you have xfire or anything ? Maybe you can help me threw this MySQL, not very easy. Xfire: xmathewx75
Image
Im Watching You... When You Sleep!
freddy
Posts: 1267
Joined: Sun Oct 18, 2009 4:58 pm

Post by freddy »

sry no xfire :(

theres some parameters that need to be fulfilled in order to get this program to work, can you edit a shortcut with witch you start your bf server? if not its no idea to even try.
Master Jay
Posts: 139
Joined: Mon Mar 29, 2010 10:28 pm

Re: Online banlist?

Post by Master Jay »

I think I will need a coder to do this. Thanks for helping.
Image
Im Watching You... When You Sleep!
Grabbi
Posts: 42
Joined: Wed Aug 03, 2011 3:37 pm
Location: Germany
Contact:

Re: Online banlist?

Post by Grabbi »

the Russian way:

the serverbanlist.con is a comma separated value array -> csv

you dont need a MySql etc, simply a PHP parser thats all.

The first "online Bannlist Parser" has been developed by Netorn Team / Parsultang in 2004/2005

published 2008 here:
http://www.php.ru/forum/viewtopic.php?t=13040


Simply give web or ftp access to server/mods/bf1942/serverbanlist.con

On website create a PHP with example below ( + access data)

Code: Select all

bans.php:
[php]
$bans = file("serverbanlist.con");
$number_of_bans = count($bans);
if ($number_of_bans == 0)
{
echo "Забаненных нет";
}
for ($i=0; $i<$number_of_bans; $i++)
{
$part = explode(",", $bans[$i]);
$ban_name = trim($part[0]);
$ban_ip = trim($part[1]);
$ban_keyhash = trim($part[2]);
$ban_guid = trim($part[3]);
$ban_admin = trim($part[4]);
$ban_banned = trim($part[5]);
$ban_expires = trim($part[6]);
$ban_reason = trim($part[7]);

echo "
<table>
<tr>
<td>$ban_name</td>
</tr>
</table>
";
}[/php] 

optimized ( cause of " )

Code: Select all

[php]
<?
$arr=array();
for ($i=0; $i<$number_of_bans; $i++)
{
$part = explode(",", $bans[$i]);

$ban_name =trim($part[0]);
if (!in_array($ban_name,$arr['name'])) {
echo "
<table>
<tr>
<td>$ban_name</td>
</tr>
</table>
";
$arr['name'][]=$ban_name;
}
}
?>[/php]
similar (array) & advanced (csv) development from 2007 by PFC you can see here ( cause Parsultang didn't share the code at that time in 2005):

http://www.pixel-fighter.com/modules.php?name=PFC_BANS


Greetz
[url=bf1942://85.214.226.169:14567]Image[/url]
Post Reply