summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-12-04 13:59:42 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-12-04 13:59:42 +0000
commit5edc20529759c12add3da5c3ed0a1cfe335de6b8 (patch)
treeb56a90c9e21301b4117e53cda82c9362aeaab761 /src/map/clif.c
parent12966eebf5750b2dc0a4394204aaf6d2b1d554db (diff)
downloadhercules-5edc20529759c12add3da5c3ed0a1cfe335de6b8.tar.gz
hercules-5edc20529759c12add3da5c3ed0a1cfe335de6b8.tar.bz2
hercules-5edc20529759c12add3da5c3ed0a1cfe335de6b8.tar.xz
hercules-5edc20529759c12add3da5c3ed0a1cfe335de6b8.zip
- Fixed the txt->sql converter not escaping character names before saving them.
- Fixed a pet's level not resetting to their db level when you enable pet leveling and later on decide to turn it off. - Fixed a bad initialization in pc_setnewpc - Fixed restricted equipment not updating your view info after they are unequipped. - Removed a bunch of extra text/checks when ignoring characters (/ex) when Aegis does none of these checks. /inall now wipes your ignore list (it does this on Aegis, too). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9400 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/clif.c')
-rw-r--r--src/map/clif.c34
1 files changed, 8 insertions, 26 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index 69b7d1af8..31fdd80f7 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -11098,16 +11098,6 @@ void clif_parse_PMIgnore(int fd, struct map_session_data *sd) { // Rewritten by
WFIFOW(fd,0) = 0x0d1; // R 00d1 <type>.B <fail>.B: type: 0: deny, 1: allow, fail: 0: success, 1: fail
WFIFOB(fd,2) = RFIFOB(fd,26);
- // do nothing only if nick can not exist
- if (strlen(nick) < 4) {
- WFIFOB(fd,3) = 1; // fail
- WFIFOSET(fd, packet_len_table[0x0d1]);
- clif_wis_message(fd, wisp_server_name,
- "This player name is not valid.",
- strlen("This player name is not valid.")+1);
- return;
- }
- // name can exist
// deny action (we add nick only if it's not already exist
if (RFIFOB(fd,26) == 0) { // Add block
for(i = 0; i < MAX_IGNORE_LIST &&
@@ -11118,9 +11108,6 @@ void clif_parse_PMIgnore(int fd, struct map_session_data *sd) { // Rewritten by
if (i == MAX_IGNORE_LIST) { //Full List
WFIFOB(fd,3) = 1; // fail
WFIFOSET(fd, packet_len_table[0x0d1]);
- clif_wis_message(fd, wisp_server_name,
- "You can not block more people.",
- strlen("You can not block more people.") + 1);
if (strcmp(wisp_server_name, nick) == 0)
{ // to found possible bot users who automaticaly ignore people.
sprintf(output, "Character '%s' (account: %d) has tried to block wisps from '%s' (wisp name of the server). Bot user?", sd->status.name, sd->status.account_id, wisp_server_name);
@@ -11130,11 +11117,8 @@ void clif_parse_PMIgnore(int fd, struct map_session_data *sd) { // Rewritten by
}
if(sd->ignore[i].name[0] != '\0')
{ //Name already exists.
- WFIFOB(fd,3) = 1; // fail
+ WFIFOB(fd,3) = 0; // Aegis reports success.
WFIFOSET(fd, packet_len_table[0x0d1]);
- clif_wis_message(fd, wisp_server_name,
- "This player is already blocked.",
- strlen("This player is already blocked.") + 1);
if (strcmp(wisp_server_name, nick) == 0) { // to found possible bot users who automaticaly ignore people.
sprintf(output, "Character '%s' (account: %d) has tried AGAIN to block wisps from '%s' (wisp name of the server). Bot user?", sd->status.name, sd->status.account_id, wisp_server_name);
intif_wis_message_to_gm(wisp_server_name, battle_config.hack_info_GM_level, output);
@@ -11168,9 +11152,6 @@ void clif_parse_PMIgnore(int fd, struct map_session_data *sd) { // Rewritten by
{ //Not found
WFIFOB(fd,3) = 1; // fail
WFIFOSET(fd, packet_len_table[0x0d1]);
- clif_wis_message(fd, wisp_server_name,
- "This player is not blocked by you.",
- strlen("This player is not blocked by you.") + 1);
return;
}
//Move everything one place down to overwrite removed entry.
@@ -11199,9 +11180,6 @@ void clif_parse_PMIgnoreAll(int fd, struct map_session_data *sd) { // Rewritten
if (sd->state.ignoreAll) {
WFIFOB(fd,3) = 1; // fail
WFIFOSET(fd, packet_len_table[0x0d2]);
- clif_wis_message(fd, wisp_server_name,
- "You already block everyone.",
- strlen("You already block everyone.") + 1);
return;
}
sd->state.ignoreAll = 1;
@@ -11211,11 +11189,15 @@ void clif_parse_PMIgnoreAll(int fd, struct map_session_data *sd) { // Rewritten
}
//Unblock everyone
if (!sd->state.ignoreAll) {
+ if (sd->ignore[0].name[0] != '\0')
+ { //Wipe the ignore list.
+ memset(sd->ignore, 0, sizeof(sd->ignore));
+ WFIFOB(fd,3) = 0;
+ WFIFOSET(fd, packet_len_table[0x0d2]);
+ return;
+ }
WFIFOB(fd,3) = 1; // fail
WFIFOSET(fd, packet_len_table[0x0d2]);
- clif_wis_message(fd, wisp_server_name,
- "You already allow everyone.",
- strlen("You already allow everyone.") + 1);
return;
}
sd->state.ignoreAll = 0;