Page 37 of 51

Re: FeedBack & Bugs | Your ideas are important

Posted: 29 Jun 2015, 21:02
by weerwolf
@base

Oliverde has gives quite a few good pointers for starting writing plugins. I cannot help you at this moment with your idea, but (depending on my time and eager) it may be possible that i write that too.

Re: FeedBack & Bugs | Your ideas are important

Posted: 30 Jun 2015, 04:29
by endbase
That sounds nice Weerwolf :thumbsup:

For now I have wrote down the inlog name of the players who where online when they were on the server Old skool on paper :mrgreen:

Thx in advance !

Base

Re: FeedBack & Bugs | Your ideas are important

Posted: 30 Jun 2015, 20:55
by weerwolf

Code: Select all

            //$this->connection->kick($player, __($player, "This server is dedicated to European clients. Your connection is terminated."));
            $this->connection->kick($player->login, "This server is dedicated to European clients. Your connection is terminated.");
either code does not show the message to the player, but just gives a connecting failed (10054) to the player.
I wonder why, cause i see the same code used for admin who kickes a player, but in that case a the message (typed in the window) does show.

Re: FeedBack & Bugs | Your ideas are important

Posted: 30 Jun 2015, 21:04
by oliverde8
Simple my mistake the ther day, connection->kick requires player login and not the player object in parameter.

Try this :

Code: Select all

$this->connection->kick($player->login, __($player, "This server is dedicated to European clients. Your connection is terminated."));
Not 100% sure for the translation either you may try to remove it if it still don't work.

Re: FeedBack & Bugs | Your ideas are important

Posted: 30 Jun 2015, 21:15
by weerwolf
Nope sry

Code: Select all

$this->connection->kick($player->login, "This server is dedicated to European clients. Your connection is terminated.");
Still same effect. Kicked, but no message (10054)

Re: FeedBack & Bugs | Your ideas are important

Posted: 30 Jun 2015, 21:30
by oliverde8
Ok so the message is ignored by the game client XD, that is not an eXpansion issue. That function is from the dedicated server API, so if it doesen't work it isn't part of eXpansion.
I will investigate some more this weekend nevertheless to see if we can't display it another way.

Re: FeedBack & Bugs | Your ideas are important

Posted: 30 Jun 2015, 21:33
by weerwolf
If u have the time and want to ofcourse, but it felt strange to me because the same function is used on the idlekick plugin for example. So why would it do it there on not on mine :XD

EDIT: Could it be something based on the moment of kick. In situations both on a admin kick or a idle kick, the players connection was fully established.

Re: FeedBack & Bugs | Your ideas are important

Posted: 30 Jun 2015, 21:50
by oliverde8
weerwolf wrote:If u have the time and want to ofcourse, but it felt strange to me because the same function is used on the idlekick plugin for example. So why would it do it there on not on mine :XD

EDIT: Could it be something based on the moment of kick. In situations both on a admin kick or a idle kick, the players connection was fully established.
It is probably that. I was thinking of kicking the player after a few seconds, but if you wait for the connection it will cause the lag you try to avoid?

Maybe force spectete, send message, wait a few second then kick?

Re: FeedBack & Bugs | Your ideas are important

Posted: 30 Jun 2015, 22:01
by weerwolf
I just kicked myself with the admin command. No message is shown :'(
something changed on the dedicated server maybe ...

Re: FeedBack & Bugs | Your ideas are important

Posted: 30 Jun 2015, 22:36
by The_Big_Boo
When a player connects, he's not fully synchronized yet thus some methods can have unexpected results on client side. You may check the flag HasJoinedGame (which is false until the player is synchronized) by calling GetPlayerInfo method or listening to PlayerInfoChanged callback (which is called whenever something change in this PlayerInfo structure, first parameter being the new structure). For instance:

Code: Select all

$info = $this->connection->getPlayerInfo($player);
if($info->hasJoinedGame)
    $this->connection->kick($player, "reason");
Btw, in dedicated server API, you can use either a string or any object with a "login" attribute, both will work correctly.