summaryrefslogtreecommitdiff
path: root/src/mods/commands/yc_msg.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mods/commands/yc_msg.cpp')
-rwxr-xr-xsrc/mods/commands/yc_msg.cpp35
1 files changed, 20 insertions, 15 deletions
diff --git a/src/mods/commands/yc_msg.cpp b/src/mods/commands/yc_msg.cpp
index 33beee4..dda26b3 100755
--- a/src/mods/commands/yc_msg.cpp
+++ b/src/mods/commands/yc_msg.cpp
@@ -17,7 +17,6 @@ extern "C" {
vector<string> *params = (vector<string>*) c->elem[2]; // param array
chat* p_chat = (chat*) ((dynamic_wrap*)c->elem[3])->CHAT;
conf* p_conf = (conf*) ((dynamic_wrap*)c->elem[3])->CONF;
- timr* p_timr = (timr*) ((dynamic_wrap*)c->elem[3])->TIMR;
if ( ! params->empty() )
{
@@ -28,22 +27,30 @@ extern "C" {
if ( b_found )
{
- string s_time = "";
- if ( p_conf->get_elem("chat.printalwaystime") == "true" )
- s_time = p_timr->get_time() + " ";
-
- string s_msg = s_time + "<i> " + p_conf->get_elem("chat.msgs.whisperto") + " " + p_whisper_user->get_colored_name() + ": <font color=\"#" + p_user->get_col2() + "\">";
+ string s_msg = "<i> "
+ + p_conf->get_elem("chat.msgs.whisperto")
+ + " "
+ + p_whisper_user->get_colored_name()
+ + ": <font color=\"#"
+ + p_user->get_col2()
+ + "\">";
- string s_whisper_msg = s_time + "<i>" + p_user->get_colored_name() + " " + p_conf->get_elem("chat.msgs.whisper") + ": <font color=\"#" + p_user->get_col2() + "\">";
+ string s_whisper_msg = "<i>"
+ + p_user->get_colored_name()
+ + " "
+ + p_conf->get_elem("chat.msgs.whisper")
+ + ": <font color=\"#"
+ + p_user->get_col2()
+ + "\">";
- string s_tmp = "";
for ( iter++; iter != params->end(); iter++ )
- s_tmp.append( *iter + " " );
+ {
+ s_msg .append( *iter + " " );
+ s_whisper_msg.append( *iter + " " );
+ }
- p_chat->string_replacer(&s_tmp);
-
- s_msg .append( s_tmp + "</font></i><br>\n" );
- s_whisper_msg.append( s_tmp + "</font></i><br>\n" );
+ s_msg .append( "</font></i><br>\n" );
+ s_whisper_msg.append( "</font></i><br>\n" );
p_user ->msg_post( &s_msg );
p_whisper_user->msg_post( &s_whisper_msg );
@@ -61,8 +68,6 @@ extern "C" {
p_user->msg_post( &s_msg );
}
}
-
- return 0;
}
}