summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/clif.c')
-rw-r--r--src/map/clif.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index 81ab49799..c9796a8e4 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -11989,6 +11989,11 @@ void clif_parse_FriendsListAdd(int fd, struct map_session_data *sd)
f_sd = map_nick2sd((char*)RFIFOP(fd,2));
+ if( sd->bl.id == f_sd->bl.id )
+ {// adding oneself as friend
+ return;
+ }
+
// Friend doesn't exist (no player with this name)
if (f_sd == NULL) {
clif_displaymessage(fd, msg_txt(3));
@@ -12037,6 +12042,11 @@ void clif_parse_FriendsListReply(int fd, struct map_session_data *sd)
char_id = RFIFOL(fd,6);
reply = RFIFOB(fd,10);
+ if( sd->bl.id == account_id )
+ {// adding oneself as friend
+ return;
+ }
+
f_sd = map_id2sd(account_id); //The account id is the same as the bl.id of players.
if (f_sd == NULL)
return;