Call Of Duty: PHP RCon 2.40 EN++

Utility ke hrám
Guest

Re: Call Of Duty: PHP RCon 2.40 EN++

Postby Guest » 25. 05. 2013 20:06

what we have to change to hide players ip on server players list..........i don't want that admins managing the server see the players ips..................
beso
Posts: 4
Joined: 21. 05. 2013 16:46

Re: Call Of Duty: PHP RCon 2.40 EN++

Postby beso » 02. 06. 2013 02:43

I have some problem in user accounts.when i try to make user account for 2 users with same server ip & port then it only works for one of then with $match_user_and_server = true; enabled.
means i can login to both account but the server i have configured for them can see only in one account that have more priority in servers.inc.php. look below if i put michael account in more priority in list then it can see the server in account while other account will say No server available. if i disabled michael account or put it lower priority then rastman account can only see the server. server i am configuring for them have same ip and port . is i am doing something wrong? ........:(

<?php
// enter all your game servers here
// format: '(game) (server_name) (Friendly name)' (only friendly name may contain spaces)

//$servers[] = 'codbo myserver My server';
$servers[] = 'cod2 michael test';
$servers[] = 'cod2 rastman test';
// $servers[] = 'cod2 another Test COD2';

?>
User avatar
Ashus
Administrátor
Posts: 417
Joined: 07. 07. 2007 10:51
Location: Ostrava - Polanka nad Odrou
Contact:

Re: Call Of Duty: PHP RCon 2.40 EN++

Postby Ashus » 02. 06. 2013 19:19

I believe it's caused by the identical friendly names. Try changing it.
Image
Coffee phreak!
beso
Posts: 4
Joined: 21. 05. 2013 16:46

Re: Call Of Duty: PHP RCon 2.40 EN++

Postby beso » 03. 06. 2013 02:10

changing friendly name did not work. i have tried to rename accounts also but its same thing................. :cry:
But when i add another server to the account which was having low priority and wasn't showing server before then it works &shows both servers . but with 1 server configured for both accounts only 1 account show server which have more priority in order............... :roll:

edit: i am using remote hosting to connect to server
User avatar
Ashus
Administrátor
Posts: 417
Joined: 07. 07. 2007 10:51
Location: Ostrava - Polanka nad Odrou
Contact:

Re: Call Of Duty: PHP RCon 2.40 EN++

Postby Ashus » 03. 06. 2013 18:51

Uh I read your post again.

$match_user_and_server
true | false; if true, users will see only their own servers
server file names must start with the username - case insensitive, eg. <username>.inc.php or <username>-main.inc.php
user 'admin' is special - he has access rights to all servers
if users get 'No servers available' error, it means they have no server configured for them.


If you want to use this feature, you need to have something like this in your servers.inc.php.

Code: Select all

$servers[] = 'cod2 michael test';
$servers[] = 'cod2 rastman test'; 
And you should have rastman.inc.php and michael.inc.php in "servers" directory.

Also you should have the two users of that names existing. If all things are set ok and it still doesn't work, I'll try to look into it more.
Image
Coffee phreak!
beso
Posts: 4
Joined: 21. 05. 2013 16:46

Re: Call Of Duty: PHP RCon 2.40 EN++

Postby beso » 03. 06. 2013 23:58

Like as you said i have following code in servers.inc.php

Code: Select all

$servers[] = 'cod2 michael Server';
$servers[] = 'cod2 rastman Test';
and have following lines in users.inc.php

Code: Select all

$list_of_users[] = 'michael 1234567 0 en';
$list_of_users[] = 'rastman 1234567 0 en';
and i also have rastman.inc.php and michael.inc.php in "servers" directory.
but it only show server in 1 user account that have more priority in servers.inc.php. for 2nd user its keep saying No server available.

Code: Select all

//$servers[] = 'cod2 michael Server';
$servers[] = 'cod2 rastman Test';

Code: Select all

$servers[] = 'cod2 rastman Test';
$servers[] = 'cod2 michael Server';
but if i disabled michael account or i put rastman account on top of michael account shown above in two codes then rastman account shows server. in 2nd case michael accounts did not show server and keep saying No server available............. :roll: [/color]
User avatar
Ashus
Administrátor
Posts: 417
Joined: 07. 07. 2007 10:51
Location: Ostrava - Polanka nad Odrou
Contact:

Re: Call Of Duty: PHP RCon 2.40 EN++

Postby Ashus » 04. 06. 2013 19:32

OK, it was my bad, change the code below in init.inc.php:

Code: Select all

// exclude servers belonging to other users
if (($match_user_and_server) && (count($servers)>0) && ($_SESSION['sess_rcon_user']!='admin'))
    {
    foreach ($servers as $n=>$v)
        {
        if (! (preg_match('`^[^ ]* '.preg_quote($_SESSION['sess_rcon_user'], '`').'`si', $v)==1))
            {unset($servers[$n]);}
        }
    }
 
to

Code: Select all

// exclude servers belonging to other users
if (($match_user_and_server) && (count($servers)>0) && ($_SESSION['sess_rcon_user']!='admin'))
    {
    foreach ($servers as $n=>$v)
        {
        if (! (preg_match('`^[^ ]* '.preg_quote($_SESSION['sess_rcon_user'], '`').'`si', $v)==1))
            {unset($servers[$n]);}
        }
    $servers = array_values($servers);
    }
 
Image
Coffee phreak!
beso
Posts: 4
Joined: 21. 05. 2013 16:46

Re: Call Of Duty: PHP RCon 2.40 EN++

Postby beso » 04. 06. 2013 20:38

thanks its working now............... :D . your tool is awesome......
ringo
Posts: 3
Joined: 17. 07. 2013 09:43

Re: Call Of Duty: PHP RCon 2.40 EN++

Postby ringo » 17. 07. 2013 09:50

I was wondering what this specific custom command

Code: Select all

$custom_cmds[] = '*<a href="javascript:;" class="rconbtn rbc_banclient" onclick="var o=$(this).parents(\'tr\'); var u=\'../cod2_banlist/edit.php?name=\'+encodeURIComponent(o.attr(\'username\'))+\'&ip=\'+encodeURIComponent(o.attr(\'userip\')); window.open(u);">Ban</a>';  //just insert this code to each player (begins with *)
was intended to do?

I, like others before in this thread, am interested in manipulating this in such a way, to ban player from COD1.1, which does not have punkbuster. I was going to go with the text file of ips that would then get dropped, but my website and my game-servers are on two different dedicated servers and I am a little confused on how to proceed.
User avatar
Ashus
Administrátor
Posts: 417
Joined: 07. 07. 2007 10:51
Location: Ostrava - Polanka nad Odrou
Contact:

Re: Call Of Duty: PHP RCon 2.40 EN++

Postby Ashus » 17. 07. 2013 10:17

ringo:
That line opens a new window with URL: ../cod2_banlist/edit.php?name=USERNAME&ip=IP
You can change the URL and make your own PHP script to write contents of parameter ip ($_GET['ip']) to the file/database of bans.
Image
Coffee phreak!

Who is online

Users browsing this forum: No registered users and 1 guest

cron