mirror of
https://github.com/2006-Scape/apollo.git
synced 2026-12-06 03:07:19 +00:00
Move login and logout listening to the new Event system and update plugins to reflect this move, remove previous listening system, fix minor bug in EventListenerChainSet.
This commit is contained in:
1 parent
3e4ecb5c73
commit
06b6f5fb74
23 files changed
+174
-220
No files matched your search
@@ -42,7 +42,8 @@ on :message, :remove_friend do |ctx, player, message|
|
||||
end
|
||||
|
||||
# Update the friend server status and send the friend/ignore lists of the player logging in.
|
||||
on :login do |player|
|
||||
on :login do |event, context|
|
||||
player = event.player
|
||||
player.send(FriendServerStatusMessage.new(ServerStatus::CONNECTING))
|
||||
player.send(IgnoreListMessage.new(player.ignored_usernames)) if player.ignored_usernames.size > 0
|
||||
|
||||
@@ -62,8 +63,8 @@ on :login do |player|
|
||||
end
|
||||
|
||||
# Notifies the player's friends that the player has logged out.
|
||||
on :logout do |player|
|
||||
update_friends(player, 0)
|
||||
on :logout do |event, context|
|
||||
update_friends(event.player, 0)
|
||||
end
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user