From 520f54d6219b7c625b4e07463ac393e6982ddab6 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sat, 6 Apr 2013 13:14:41 +0200 Subject: tagging ychat-0.7.1 --- src/mods/commands/yc_msg.cpp | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) (limited to 'src/mods/commands/yc_msg.cpp') 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 *params = (vector*) 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 + " " + p_conf->get_elem("chat.msgs.whisperto") + " " + p_whisper_user->get_colored_name() + ": get_col2() + "\">"; + string s_msg = " " + + p_conf->get_elem("chat.msgs.whisperto") + + " " + + p_whisper_user->get_colored_name() + + ": get_col2() + + "\">"; - string s_whisper_msg = s_time + "" + p_user->get_colored_name() + " " + p_conf->get_elem("chat.msgs.whisper") + ": get_col2() + "\">"; + string s_whisper_msg = "" + + p_user->get_colored_name() + + " " + + p_conf->get_elem("chat.msgs.whisper") + + ": 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 + "
\n" ); - s_whisper_msg.append( s_tmp + "

\n" ); + s_msg .append( "

\n" ); + s_whisper_msg.append( "

\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; } } -- cgit v1.2.3