Separate BlockList from BuddyList
Posted: 16 Apr 2008, 00:25
I know they are all connected to the same tables on the embed database, but I think it would be nice to create a better approach in the code towards "blockBuddy" and "addBuddy".
Reason for that: It doesn't make much sense to add the player to your buddy list before adding it to your block list. In fact, in order to create a different approach (without making this awkward option), my block event handler goes to a small function that first add the buddy, and once its caught in the onBuddyListUpdate, automatically send them to the block list. Same way goes when removing a player from it. First remove them from block list, then from buddy list.
Would be even more interesting if there was a way for the buddy list to trigger the onBuddyListError in case you try adding a blocked buddy in your buddy list.
Hope you consider
Reason for that: It doesn't make much sense to add the player to your buddy list before adding it to your block list. In fact, in order to create a different approach (without making this awkward option), my block event handler goes to a small function that first add the buddy, and once its caught in the onBuddyListUpdate, automatically send them to the block list. Same way goes when removing a player from it. First remove them from block list, then from buddy list.
Would be even more interesting if there was a way for the buddy list to trigger the onBuddyListError in case you try adding a blocked buddy in your buddy list.
Hope you consider