Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Development

Development::Development Forum for development topics and for those interested in EQEMu development. (Not a support forum)

Reply
 
Thread Tools Display Modes
  #1  
Old 09-21-2008, 02:31 PM
Derision
Developer
 
Join Date: Feb 2004
Location: UK
Posts: 1,540
Default /who all friend

Discussion: http://eqemulator.net/forums/showthread.php?t=26300

This patch is to enable /who all friend.

http://www.rama.demon.co.uk/friends.patch

There is only so much testing I can do with two toons on a private server, so let me know if something doesn't work right.

The 6.2 opcode is already in patch_6.2.conf. The opcode for patch_Titanium.conf is:

Code:
OP_FriendsWho=0x48fe
You will need to recompile world as well as zone.
Reply With Quote
  #2  
Old 09-21-2008, 05:56 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

How did I not see this one?! Nice work yet again! Stickying this!
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #3  
Old 09-22-2008, 12:20 AM
AndMetal
Developer
 
Join Date: Mar 2007
Location: Ohio
Posts: 648
Default

Derision, once again you've saved me from having to learn assembly I think this is probably THE BIGGEST thing I've missed from Live, especially since I have started playing with others regularly on Emu servers
__________________
GM-Impossible of 'A work in progress'
A non-legit PEQ DB server
How to create your own non-legit server

My Contributions to the Wiki
Reply With Quote
  #4  
Old 09-22-2008, 05:11 AM
Derision
Developer
 
Join Date: Feb 2004
Location: UK
Posts: 1,540
Default

Quote:
Originally Posted by AndMetal View Post
you've saved me from having to learn assembly
This is one of those Client->Server opcodes that didn't require any disassembly, just had to type /who all friend and look in the zone log output to see the 'Unknown Opcode' and that the packet contained a comma delimited list of friend names The response from the server to the client is the same opcode as used by /who all.

I'm going to rework this a bit to make it more efficient. I basically copied the /who all code, and it runs through the online client list twice, first to count how many friends are online so it can calculate how big the reply packet needs to be, and then again to actually build the reply packet.

Does anyone know if /who all friends should have an output limit of 20 players, the same as /who all ?
Reply With Quote
  #5  
Old 09-22-2008, 05:30 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

I think the friends list did used to be capped at 20 max at one time same as ignore, but I am pretty sure they removed that cap at some point before Titanium.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #6  
Old 09-22-2008, 05:40 AM
Derision
Developer
 
Join Date: Feb 2004
Location: UK
Posts: 1,540
Default

You can have up to 100 people on your friends list. What I was wondering was, if you had say 30 friends online, would /who all friend display all 30, or just the first 20. I guess it doesn't really matter how it works on live.
Reply With Quote
  #7  
Old 09-22-2008, 11:12 AM
AndMetal
Developer
 
Join Date: Mar 2007
Location: Ohio
Posts: 648
Default

Quote:
Originally Posted by Derision View Post
You can have up to 100 people on your friends list. What I was wondering was, if you had say 30 friends online, would /who all friend display all 30, or just the first 20. I guess it doesn't really matter how it works on live.
Last I knew, it would display all of them. If I remember correctly, the 20 limit was originally just the amount of friends you could have period, so that's all that would display. Then, it was upped (yay for the popular kids!), but I have no idea when that happened.
__________________
GM-Impossible of 'A work in progress'
A non-legit PEQ DB server
How to create your own non-legit server

My Contributions to the Wiki
Reply With Quote
  #8  
Old 09-22-2008, 02:40 PM
Derision
Developer
 
Join Date: Feb 2004
Location: UK
Posts: 1,540
Default

I've updated the patch in the original post with what should be a more efficient way of doing things. I'm not sure how caching in Firefox works, but when I clicked on the link after I updated the patch on my webhost, Firefox showed me the old version and I had to press F5 to get the new one.

The new version has todays date in the diff for clientlist.cpp, so you can check you aren't seeing an old cached copy:

Code:
diff -u --recursive /tmp/EQEmu-0.7.0-1129/world/clientlist.cpp ./world/clientlist.cpp
--- /tmp/EQEmu-0.7.0-1129/world/clientlist.cpp	2008-06-22 09:08:53.000000000 +0100
+++ ./world/clientlist.cpp	2008-09-22 19:04:13.000000000 +0100
Reply With Quote
  #9  
Old 09-24-2008, 11:05 PM
cavedude's Avatar
cavedude
The PEQ Dude
 
Join Date: Apr 2003
Location: -
Posts: 1,988
Default

This compiles fine under Linux, but under Windows I get:

.\clientlist.cpp(579) : error C3861: 'strtok_r': identifier not found
.\clientlist.cpp(592) : error C3861: 'strtok_r': identifier not found

The lines in question are:

char *Friend_ = strtok_r(FriendsWho->FriendsString, ",", &SavePointer);

and

Friend_ = strtok_r(NULL, ",", &SavePointer);
Reply With Quote
  #10  
Old 09-24-2008, 11:40 PM
KLS
Administrator
 
Join Date: Sep 2006
Posts: 1,348
Default

There is no strtok_r for windows is the issue.
Reply With Quote
  #11  
Old 09-25-2008, 12:11 PM
spoon
Sarnak
 
Join Date: Aug 2007
Posts: 34
Default

Quote:
Originally Posted by KLS View Post
There is no strtok_r for windows is the issue.
and strtok_s is the windows equivalent. go go gadget precompiler!
Reply With Quote
  #12  
Old 09-25-2008, 12:57 PM
Derision
Developer
 
Join Date: Feb 2004
Location: UK
Posts: 1,540
Default

I rewrote it without using strtok and did a test compile on Windows this time. Patch in the first post has been updated.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 05:59 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3