Rewrite inter server messaging
git-svn-id: https://svn.code.sf.net/p/rathena/svn/branches/stable@740 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
@@ -306,13 +306,13 @@ int inter_mapif_init(int fd) {
|
||||
//--------------------------------------------------------
|
||||
|
||||
// GM message sending
|
||||
int mapif_GMmessage(unsigned char *mes, int len) {
|
||||
int mapif_GMmessage(unsigned char *mes, int len, int sfd) {
|
||||
unsigned char buf[len];
|
||||
|
||||
WBUFW(buf, 0) = 0x3800;
|
||||
WBUFW(buf, 2) = len;
|
||||
memcpy(WBUFP(buf, 4), mes, len-4);
|
||||
mapif_sendall(buf, len);
|
||||
mapif_sendallwos(sfd, buf, len);
|
||||
printf("\033[1;34m inter server: GM[len:%d] - '%s' \033[0m\n", len, mes);
|
||||
return 0;
|
||||
}
|
||||
@@ -414,7 +414,7 @@ int check_ttl_wisdata() {
|
||||
// GM message sending
|
||||
int mapif_parse_GMmessage(int fd)
|
||||
{
|
||||
mapif_GMmessage(RFIFOP(fd, 4), RFIFOW(fd, 2));
|
||||
mapif_GMmessage(RFIFOP(fd, 4), RFIFOW(fd, 2), fd);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user