• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Gesior 2012 Banished Time

president vankk

Web Developer & AuraOT Owner
Joined
Jul 10, 2009
Messages
5,719
Solutions
9
Reaction score
339
Hi my dear friends,

Could someone help me out with this problem that I'm having with gesior, it keep saying [Banished until 31 December 1969, 21:00].

The code on characters.php
Code:
if($player->isBanned() || $account->isBanned())
                        $main_content .= '<font color="red"> [Banished until '.date("j F Y, G:i", $account->getBanTime()).']</font>';

classes/account.php
Code:
public function isBanned($forceReload = false)
    {
        $this->loadBans($forceReload);
        return count($this->bans) > 0;
    }

    public function getBanTime($forceReload = false)
    {
        $this->loadBans($forceReload);
        $lastExpires = 0;
        foreach($bans as $ban)
        {
            if($ban->getExpiresAt() <= 0)
            {
                $lastExpires = 0;
                break;
            }
            if($ban->getExpiresAt() > time() && $ban->getExpiresAt() > $lastExpires)
                $lastExpires = $ban->getExpiresAt();
        }
        return $lastExpires;
    }

classes/player.php
Code:
public function isBanned()
    {
        return $this->getAccount()->isBanned();
    }

Why that? I can't see where is the error.

Thanks.
 
show your config nginx go to /etc/nginx/sites avalible. Defaul

and look maybe this help: https://otland.net/threads/gesior-2012-latest-news-date-completely-incorrect.233054/

Code:
##
# You should look at the following URL's in order to grasp a solid
# understanding of Nginx configuration files in order to fully unleash
# the power of Nginx. http://wiki.nginx.org/Pitfalls
# http://wiki.nginx.org/QuickStart http://wiki.nginx.org/Configuration
#
# Generally, you will want to move this file somewhere, and start with a
# clean file but keep this around for reference. Or just disable in
# sites-enabled.
#
# Please see /usr/share/doc/nginx-doc/examples/ for more detailed
# examples.
##
# Default server configuration
#
server {
    listen 80 default_server;
    # listen [::]:80 default_server; SSL configuration
    #
    # listen 443 ssl default_server; listen [::]:443 ssl
    # default_server;
    #
    # Self signed certs generated by the ssl-cert package Don't use
    # them in a production server!
    #
    # include snippets/snakeoil.conf;
    root /var/www/html;
    # Add index.php to the list if you are using PHP
    index index.html index.htm index.nginx-debian.html index.php;
    server_name _;
    location / {
        # First attempt to serve request as file, then as
        # directory, then fall back to displaying a 404.
        try_files $uri $uri/ =404;
       
    }
    location ~* \.(jpg|jpeg|png|gif|ico|css|js)$ {
       expires 365d;
    }
    location ~ .php$ {
        limit_req zone=flood burst=200;
                try_files $uri =404;
            fastcgi_pass unix:/var/run/php5-fpm.sock;
                fastcgi_index index.php;
                fastcgi_param SCRIPT_FILENAME
$document_root$fastcgi_script_name;
                include fastcgi_params;
                fastcgi_buffers 16 16k;
                fastcgi_buffer_size 32k;
               
        }
    location ~ /\.ht {
            deny all;
    }
   
    # pass the PHP scripts to FastCGI server listening on
    # 127.0.0.1:9000
    #
    #location ~ \.php$ {
    #    include snippets/fastcgi-php.conf;
    #
    #    # With php5-cgi alone:
    #    fastcgi_pass 127.0.0.1:9000;
    #    # With php5-fpm:
    #    fastcgi_pass unix:/var/run/php5-fpm.sock;
    #}
    # deny access to .htaccess files, if Apache's document root
    # concurs with nginx's one
    #
    #location ~ /\.ht {
    #    deny all;
    #}
}
# Virtual Host configuration for example.com
#
# You can move that to a different file under sites-available/ and
# symlink that to sites-enabled/ to enable it.
#
#server {
#    listen 80; listen [::]:80;
#
#    server_name example.com;
#
#    root /var/www/example.com; index index.html;
#
#    location / {
#        try_files $uri $uri/ =404;
#    }
#}
 
I do not know if it's a problem daddy main server or hosting it is possible that the fault php
maybe @Gesior.pl give advice to remedy

im use this nginx conf:
Code:
server {
        listen       80;
        server_name  your_site_name.com;
        root /var/www/html;
        index index.php index.html index.htm index.nginx-debian.html;
        location / {
                try_files $uri $uri/ =404;
        }
        error_page 404 /404.html;
        error_page 500 502 503 504 /50x.html;
        location = /50x.html {
                root /var/www/html;
        }
        location ~ \.php$ {
                try_files $uri =404;
                fastcgi_pass unix:/var/run/php5-fpm.sock;
                fastcgi_index index.php;
                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                include fastcgi_params;
        }
}
 
Can you export table 'bans' in phpmyadmin and give us account id of account that show that problem?

What TFS do you use? 1.0?

EDIT:

It looks like your account got permanent account banishment or acc. maker is bugged :p

It looks like 'player banishment' shows message with 'account banishment' time, which can be 0 when account is not banned, but player is banned.

Where did you get this code? I can't find it in acc. maker:
PHP:
if($player->isBanned() || $account->isBanned())
$main_content .= '<font color="red"> [Banished until '.date("j F Y, G:i", $account->getBanTime()).']</font>';
In acc. maker 2012 I see only:
PHP:
if($player->isBanned() || $account->isBanned())
$main_content .= '<span style="color:red">[BANNED]</span>';
It does not show date on characters.php, because I did not make function to get 'player ban time'. If you want to show character banishment time you must add function to 'getBanTime' in class Player.
 
Last edited:

Similar threads

Back
Top