diff options
| author | Paul Buetow <paul@buetow.org> | 2013-04-06 13:14:47 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2013-04-06 13:14:47 +0200 |
| commit | d4c9f10efe815af146438cafb694d16da0e5650a (patch) | |
| tree | 93956195c448768b2d58892cb672bee36a6a6463 /src/mods/commands/yc_msg.cpp | |
| parent | ee315a27b72dc967a8a90f132725b7c8e4fd9fba (diff) | |
tagging ychat-0.7.0ychat-0.7.0
Diffstat (limited to 'src/mods/commands/yc_msg.cpp')
| -rwxr-xr-x | src/mods/commands/yc_msg.cpp | 35 |
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; } } |
