Community->Mail Packet

Submit code for osProse project.

Moderators: osRose dev team, ospRose dev team, osiRose dev team, Moderators

Community->Mail Packet

Postby Drakia on Sun May 18, 2008 9:52 pm

The Mail tab in Community can actually be used with this packet. If a user is offline when you try to send them a message (via the Friend tab) the client will send packet 0x7e5 with action 2 to the server. This is a "Mail" packet, pretty basic syntax, first is the charname to send to, followed by the message. Forwarding the message on is a little trickier, I can't seem to figure out the date format they are using. Hope Brett and ExJam don't mind me stealing their format :) I don't know much about the packets, but this is what I gathered from screwing around with it.

Packet 0x7e5 Out:
  1. BYTE action
  2. :IF( action == 2 ) // Send Mail
  3.   DWORD date // Unknown format
  4.   STRING charName // Null terminated
  5.   STRING message // Null terminated
  6. :ELSEIF ( action == 4 || action == 5 ) // Sends "ID cannot be found" message
  7. :ELSEIF ( action == 6 ) // Send "Declining message" message
  8. :ELSEIF ( action == 7 ) // Send "Friends mailbox full" message
  9. :ELSEIF ( action == 8 ) // Send "Content Error" message
  10. :ENDIF


Packet 0x7e5 In:
  1. BYTE action
  2. :IF ( action == 2 ) // Send Mail
  3.   STRING charName // Null terminated
  4.   STRING message // Null terminates
  5. :ENDIF
My favorite skill is scaring new users away.
If you haven't SEARCHED expect me to yell at you.
Image
Drakia
ospRose dev team
ospRose dev team
 
Posts: 1614
Joined: Tue Sep 18, 2007 6:53 am
Location: Nanaimo, BC, Canada

Re: Community->Mail Packet

Postby lmame on Sun May 18, 2008 10:05 pm

For some other packets they use a weird thing for time:
  1.  
  2.              ADDWORD(pak,timeinfo->tm_year+1900);   //Year
  3.              ADDBYTE( pak, timeinfo->tm_mon+1);  //Month
  4.              ADDBYTE( pak, timeinfo->tm_mday);  //Day
  5.              ADDBYTE( pak, timeinfo->tm_hour+1);  //hour
  6.              //ADDBYTE( pak, timeinfo->tm_min+1); //minutes?
  7.              ADDBYTE( pak, 0x00);  //minutes?
  8.  


Perhaps it's simply a time in seconds.
The world is full of love and peace ^_^
Image
User avatar
lmame
Admin
Admin
 
Posts: 8997
Joined: Mon Aug 06, 2007 4:42 pm
Location: July City

Re: Community->Mail Packet

Postby Drakia on Sun May 18, 2008 10:27 pm

I've tried standard unix timestamp, I tried using the year/month/day, neither seems to work :/
My favorite skill is scaring new users away.
If you haven't SEARCHED expect me to yell at you.
Image
Drakia
ospRose dev team
ospRose dev team
 
Posts: 1614
Joined: Tue Sep 18, 2007 6:53 am
Location: Nanaimo, BC, Canada


Return to Submit Code

Who is online

Users browsing this forum: No registered users and 4 guests