summaryrefslogtreecommitdiff
path: root/src/char/char.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2015-06-18 02:29:43 +0200
committerHaru <haru@dotalux.com>2015-08-13 16:27:31 +0200
commit6080c7c97a32d3ac28466138a52873ed184f278d (patch)
tree035fb430668c42b6ab7dce644e9315635792e690 /src/char/char.c
parenteecdcc208c5a80d9d85e51e1a7b155b6a18c6e91 (diff)
downloadhercules-6080c7c97a32d3ac28466138a52873ed184f278d.tar.gz
hercules-6080c7c97a32d3ac28466138a52873ed184f278d.tar.bz2
hercules-6080c7c97a32d3ac28466138a52873ed184f278d.tar.xz
hercules-6080c7c97a32d3ac28466138a52873ed184f278d.zip
Added showmsg HPM interface
- The showmsg interface is automatically imported into plugins by the HPM (just like previously, the various Show* functions were). This change requires no actions from plugin developers. - stdout_with_ansisequence is now available through showmsg->stdout_with_ansisequence - msg_silent is now available through showmsg->silent - console_msg_log is now available through showmsg->console_log - timestamp_format is now available through showmsg->timestamp_format - Plugin-safe macros are provided, so that all Show* and Clear* calls will require no changes. - vShowMessage is provided through the public API, as va_list variant of ShowMessage. - vShowMessage_ is no longer part of the public API. If necessary, va_list variants of the other Show* functions will be added at a later time as follow-ups. Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/char/char.c')
-rw-r--r--src/char/char.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/char/char.c b/src/char/char.c
index 52c560373..6cfcdb331 100644
--- a/src/char/char.c
+++ b/src/char/char.c
@@ -5575,13 +5575,13 @@ int char_config_read(const char* cfgName)
remove_control_chars(w1);
remove_control_chars(w2);
if(strcmpi(w1,"timestamp_format") == 0) {
- safestrncpy(timestamp_format, w2, sizeof(timestamp_format));
+ safestrncpy(showmsg->timestamp_format, w2, sizeof(showmsg->timestamp_format));
} else if(strcmpi(w1,"console_silent")==0){
- msg_silent = atoi(w2);
- if( msg_silent ) /* only bother if its actually enabled */
+ showmsg->silent = atoi(w2);
+ if (showmsg->silent) /* only bother if its actually enabled */
ShowInfo("Console Silent Setting: %d\n", atoi(w2));
} else if(strcmpi(w1,"stdout_with_ansisequence")==0){
- stdout_with_ansisequence = config_switch(w2);
+ showmsg->stdout_with_ansisequence = config_switch(w2) ? true : false;
} else if (strcmpi(w1, "userid") == 0) {
safestrncpy(chr->userid, w2, sizeof(chr->userid));
} else if (strcmpi(w1, "passwd") == 0) {