Bug 147: (Faux) Guild MOTD delay
Moderators: Community Managers, Developers
-
BugTracker
- Posts: 810
- Joined: Wed Aug 28, 2013 9:40 am
Bug 147: (Faux) Guild MOTD delay
Bug ID : 147 - Guild MOTD delay Bug Date : 2015/03/16 10:35:09 Assigned To : Faux Priority : Medium Category : VGClient Sub-Category : User Interface: (Default) Severity : Minor (e.g. Cosmetic) Reproducible : Some of the timeDetails:
Guild MOTD does not show up when I log in, but sends to chat when I open the Guild Social window
Originated From World: New Telon (1) Chunk : New Targonor (141) Location : -33648 6332 381
Re: Bug 147: (Faux) Guild MOTD delay
Guild motd is a funny little bugger. I commented out the section of HandleClientAuthConfirm where I sent the guildmotd after initial login. I was getting double motd's, but not always. Just sometimes. Its something I need to look more into. I'll remove the commenting for that section of code and let me know what you see on New Telon. On my dev server, I see it when I log in, and don't get a new one if I open up the Guild Social window.
- John Adams
- Retired
- Posts: 4582
- Joined: Wed Aug 28, 2013 9:40 am
- Location: Phoenix, AZ.
- Contact:
Re: Bug 147: (Faux) Guild MOTD delay
Yeah, correction to my /bug up there... it was just good timing that I happened to hit the Social window just as the text came in. On further testing, if I log in and just sit there for a moment, the Guild MOTD comes in after my client gets into the game and sits for a few seconds.
Maybe check how the server MOTD is sent, and send it after that in the same place? If you already are, then it's good enough.
Maybe check how the server MOTD is sent, and send it after that in the same place? If you already are, then it's good enough.
Re: Bug 147: (Faux) Guild MOTD delay
The double guild MOTD comes from having it send on login and having it in this function also.
Some time the client will hit this function on login also so it get's sent once on login then again when this function get's called. If you comment out the one from this function then when a player join's a guild he does not get the motd sent to him tho until he camps and log's back in.
Code: Select all
void Net::HandleClientGuildMemberListRequest(shared_ptr<Client> &client, PacketStruct *packet) {
// Check arguments first.
if (!client || !packet) {
LogDebug(LOG_NET, 0, "Net::HandleClientGuildMemberListRequest: A null client or null packet object was received.");
return;
}
// Get character
auto character = client->GetCharacter();
if (!character) {
client->SendMessageFromServer("Your character is null. Please report.");
LogWarn(LOG_CHUNK, 0, "Net::HandleClientGuildMemberListRequest from client with character == null");
return;
}
// Construct and send the guild member list packets from the world server.
guilds_list.SendGuildUpdate(client, character);
guilds_list.SendGuildMemberList(client, character);
guilds_list.SendGuildMotd(client, character);
}
- John Adams
- Retired
- Posts: 4582
- Joined: Wed Aug 28, 2013 9:40 am
- Location: Phoenix, AZ.
- Contact:
Re: Bug 147: (Faux) Guild MOTD delay
We probably need to implement the "first_time_login" global like we have in EQ2, so when the login process completes the flag is set to false and we can then check that against all these billion other loops we end up in.
Is no one but me concerned how many times our code gets called, repeatedly? Turn up debug logging, you'll see what I mean.
Is no one but me concerned how many times our code gets called, repeatedly? Turn up debug logging, you'll see what I mean.
Re: Bug 147: (Faux) Guild MOTD delay
It is under first time login the issue is sometimes the client also hit's HandleClientGuildMemberListRequest when you log in.
- John Adams
- Retired
- Posts: 4582
- Joined: Wed Aug 28, 2013 9:40 am
- Location: Phoenix, AZ.
- Contact:
Re: Bug 147: (Faux) Guild MOTD delay
"sometimes" isn't acceptable. It's our code, we're in control not the code lol. There should be no "oh maybe one day I'll do this and the next I'll do that" The code is not alive, I promise.
Re: Bug 147: (Faux) Guild MOTD delay
John, when I was writing this, I was actually talking to Xinux because I wasn't seeing the client ask for the packets it was supposed to ask for. When we updated the guild id within SGOPCPawn, the client started requesting the OP_GuildMemberList. If there is a consistency issue, it could be related to that, since the guild member list only gets sent when the client specifically requests it.
- John Adams
- Retired
- Posts: 4582
- Joined: Wed Aug 28, 2013 9:40 am
- Location: Phoenix, AZ.
- Contact:
Re: Bug 147: (Faux) Guild MOTD delay
Btw, I am on a tirade because I watched our logging the other day, full on debug level="9" mode and was aghast by some of the repeated function calls. Things generally run pretty good, but I am concluding if we cleaned up our act, things would run even better. (not speaking to MOTDs in this, just generally)
Try it sometime, if you're bored. You'll see what I mean.
Try it sometime, if you're bored. You'll see what I mean.
Re: Bug 147: (Faux) Guild MOTD delay
[quote="Xinux"]The double guild MOTD comes from having it send on login and having it in this function also.
Some time the client will hit this function on login also so it get's sent once on login then again when this function get's called. If you comment out the one from this function then when a player join's a guild he does not get the motd sent to him tho until he camps and log's back in.[/quote]
I could always move the the guild motd out of OP_ServerGuildMembersList and just add a call to send the guild motd at the end of the handler for inviting a player to the guild. That seems like it should solve it. So it would get sent once on login. And it would get sent once when being added to a guild.
Code: Select all
void Net::HandleClientGuildMemberListRequest(shared_ptr<Client> &client, PacketStruct *packet) {
// Check arguments first.
if (!client || !packet) {
LogDebug(LOG_NET, 0, "Net::HandleClientGuildMemberListRequest: A null client or null packet object was received.");
return;
}
// Get character
auto character = client->GetCharacter();
if (!character) {
client->SendMessageFromServer("Your character is null. Please report.");
LogWarn(LOG_CHUNK, 0, "Net::HandleClientGuildMemberListRequest from client with character == null");
return;
}
// Construct and send the guild member list packets from the world server.
guilds_list.SendGuildUpdate(client, character);
guilds_list.SendGuildMemberList(client, character);
guilds_list.SendGuildMotd(client, character);
}
I could always move the the guild motd out of OP_ServerGuildMembersList and just add a call to send the guild motd at the end of the handler for inviting a player to the guild. That seems like it should solve it. So it would get sent once on login. And it would get sent once when being added to a guild.