-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Chat channel onJoin message gets send to all others but not the one that joined #4618
Comments
my naive workaround (delayed as OTClient complained that channel is not yet open (channel is null - problem in OTClient I guess)): addEvent(function(pid)
local player = Player(pid)
if not player then
return
end
player:sendChannelMessage("", "Here you can advertise all kinds of things. Among others, you can trade items, advertise ingame events, seek characters for a quest or a hunting group, find members for your guild or look for somebody to help you with something.", MESSAGE_GUILD, CHANNEL_ADVERTISING)
player:sendChannelMessage("", "It goes without saying that all advertisements must conform to the Rules, e.g. it is illegal to advertise trades including real money.", MESSAGE_GUILD, CHANNEL_ADVERTISING)
end, 100, player:getId()) |
I don't think it's a bug. If someone plans to fix it, please use |
Not a bug, you send the message when player that is currently joining channel isn't yet there, so he cannot see it. |
@nekiro i noticed that bebavior, but sending that message is not my code. It’s in tfs master thus i noticed it being sent and thought either it worked differently before or it was written on assumption that this works differently |
https://github.com/otland/forgottenserver/blob/6579f1263271b0c431b00ae779b5b102569178d8/data/chatchannels/scripts/advertising.lua#L42C10-L45
onJoin message gets sent to all other members but the one that joined as it uses
sendToAll
https://github.com/otland/forgottenserver/blob/6579f1263271b0c431b00ae779b5b102569178d8/src/chat.cpp#L117C6-L117C17
The text was updated successfully, but these errors were encountered: