diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-08-21 16:07:50 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-08-21 16:07:50 +0000 |
commit | 41f1a34c8593a40b4c5dc4178d7138e7e166eea0 (patch) | |
tree | f033ae8a8fe52be55838a5050ae01cbec32d5ba0 /src/map/atcommand.c | |
parent | 74aac1368dae2d2a8ed5e3897a3cafb0fc5a8984 (diff) | |
download | hercules-41f1a34c8593a40b4c5dc4178d7138e7e166eea0.tar.gz hercules-41f1a34c8593a40b4c5dc4178d7138e7e166eea0.tar.bz2 hercules-41f1a34c8593a40b4c5dc4178d7138e7e166eea0.tar.xz hercules-41f1a34c8593a40b4c5dc4178d7138e7e166eea0.zip |
- Removed config setting "muting_players", and expanded the manner_system config to specify how having negative manner (mute) affects a player (see battle/misc.conf).
- Expanded the pk_mode setting from no/yes to 0/1/2. 1 is normal pk_mode, if 2 is used, it makes killing players give you a loss of 5 manner points.
- Fixed WS_WEAPONREFINE always failing when at less than job 50.
- Fixed a compilation warning in char-txt/int_homun.c
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8402 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/atcommand.c')
-rw-r--r-- | src/map/atcommand.c | 27 |
1 files changed, 6 insertions, 21 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c index c18a94425..4e372d633 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -788,8 +788,7 @@ is_atcommand(const int fd, struct map_session_data* sd, const char* message, int nullpo_retr(AtCommand_None, sd);
- if (!battle_config.allow_atcommand_when_mute &&
- sd->sc.count && sd->sc.data[SC_NOCHAT].timer != -1) {
+ if (sd->sc.count && sd->sc.data[SC_NOCHAT].timer != -1 && sd->sc.data[SC_NOCHAT].val1&MANNER_NOCOMMAND) {
return AtCommand_Unknown;
}
@@ -8473,7 +8472,8 @@ atcommand_pettalk( return -1;
if (sd->sc.count && //no "chatting" while muted.
- (sd->sc.data[SC_BERSERK].timer!=-1 || sd->sc.data[SC_NOCHAT].timer != -1))
+ (sd->sc.data[SC_BERSERK].timer!=-1 ||
+ (sd->sc.data[SC_NOCHAT].timer != -1 && sd->sc.data[SC_NOCHAT].val1&MANNER_NOCHAT)))
return -1;
if (sscanf(message, "%99[^\n]", mes) < 1)
@@ -8718,17 +8718,11 @@ int atcommand_unmute( struct map_session_data *pl_sd = NULL;
nullpo_retr(-1, sd);
- if(!battle_config.muting_players) {
- clif_displaymessage(fd, "Please enable the muting system before using it.");
- return 0;
- }
-
if (!message || !*message)
return -1;
if((pl_sd=map_nick2sd((char *) message)) != NULL) {
if(pl_sd->sc.data[SC_NOCHAT].timer!=-1) {
- pl_sd->status.manner = 0; // have to set to 0 first [celest]
status_change_end(&pl_sd->bl,SC_NOCHAT,-1);
clif_displaymessage(sd->fd,"Player unmuted");
}
@@ -8794,11 +8788,6 @@ int atcommand_mute( int manner;
nullpo_retr(-1, sd);
- if(!battle_config.muting_players) {
- clif_displaymessage(fd, "Please enable the muting system before using it.");
- return 0;
- }
-
if (!message || !*message || sscanf(message, "%d %23[^\n]", &manner, atcmd_player_name) < 1) {
clif_displaymessage(fd, "Usage: @mute <time> <character name>.");
return -1;
@@ -10173,11 +10162,6 @@ int atcommand_mutearea( int time;
nullpo_retr(0, sd);
- if(!battle_config.muting_players) {
- clif_displaymessage(fd, "Please enable the muting system before using it.");
- return 0;
- }
-
time = atoi(message);
if (!time)
time = 15; // 15 minutes default
@@ -10262,7 +10246,8 @@ int atcommand_me( memset(atcmd_output, '\0', sizeof(atcmd_output));
if (sd->sc.count && //no "chatting" while muted.
- (sd->sc.data[SC_BERSERK].timer!=-1 || sd->sc.data[SC_NOCHAT].timer != -1))
+ (sd->sc.data[SC_BERSERK].timer!=-1 ||
+ (sd->sc.data[SC_NOCHAT].timer != -1 && sd->sc.data[SC_NOCHAT].val1&MANNER_NOCHAT)))
return -1;
if (!message || !*message) {
@@ -10725,7 +10710,7 @@ int atcommand_main( sd->state.mainchat = 1;
clif_displaymessage(fd, msg_txt(380)); // Main chat has been activated.
}
- if (sd->sc.data[SC_NOCHAT].timer != -1) {
+ if (sd->sc.data[SC_NOCHAT].timer != -1 && sd->sc.data[SC_NOCHAT].val1&MANNER_NOCHAT) {
clif_displaymessage(fd, msg_txt(387));
return -1;
}
|