<s> from lampost . context . resource import m_requires <EOL> from lampost . server . handlers import SessionHandler <EOL> m_requires ( __name__ , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) <EOL> class FriendResponse ( SessionHandler ) : <EOL> def main ( self ) : <EOL> source_id = self . raw [ '<STR_LIT>' ] <EOL> player_id = self . raw [ '<STR_LIT>' ] <EOL> friend_service . remove_request ( source_id , player_id ) <EOL> message_service . remove_message ( player_id , self . raw [ '<STR_LIT>' ] ) <EOL> if self . raw [ '<STR_LIT:action>' ] == '<STR_LIT>' : <EOL> friend_service . add_friend ( source_id , player_id ) <EOL> message_service . add_message ( "<STR_LIT>" , "<STR_LIT>" . format ( user_manager . id_to_name ( player_id ) ) , source_id ) <EOL> message_service . add_message ( "<STR_LIT>" , "<STR_LIT>" . format ( user_manager . id_to_name ( source_id ) ) , player_id ) <EOL> elif self . raw [ '<STR_LIT:action>' ] == '<STR_LIT>' : <EOL> message_service . block_messages ( player_id , source_id ) <EOL> else : <EOL> message_service . add_message ( "<STR_LIT>" , "<STR_LIT>" . format ( user_manager . id_to_name ( player_id ) ) , source_id ) <EOL> message_service . add_message ( "<STR_LIT>" , "<STR_LIT>" . format ( user_manager . id_to_name ( source_id ) ) , player_id ) <EOL> class MessageDelete ( SessionHandler ) : <EOL> def main ( self ) : <EOL> message_service . remove_message ( ** self . raw ) </s>
