diff options
| author | Paul Buetow <paul@buetow.org> | 2013-04-06 13:14:42 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2013-04-06 13:14:42 +0200 |
| commit | 42b79aa5c591dde88e78922a519802f948d9ea60 (patch) | |
| tree | 92cd4e576656837bb99214d8c09c3fec3201474f /src/mods/commands/yc_invisible.cpp | |
| parent | 520f54d6219b7c625b4e07463ac393e6982ddab6 (diff) | |
tagging ychat-0.7.9.4ychat-0.7.9.4
Diffstat (limited to 'src/mods/commands/yc_invisible.cpp')
| -rwxr-xr-x | src/mods/commands/yc_invisible.cpp | 43 |
1 files changed, 23 insertions, 20 deletions
diff --git a/src/mods/commands/yc_invisible.cpp b/src/mods/commands/yc_invisible.cpp index dcc2498..58a8912 100755 --- a/src/mods/commands/yc_invisible.cpp +++ b/src/mods/commands/yc_invisible.cpp @@ -4,25 +4,28 @@ using namespace std; -extern "C" { - int extern_function(void *v_arg) - { - container *c=(container *)v_arg; - - user* p_user = (user*) c->elem[1]; // the corresponding user - conf* p_conf = (conf*) ((dynamic_wrap*)c->elem[3])->CONF; - - bool b_invisible = p_user->get_invisible(); - - string s_msg = b_invisible - ? p_conf->get_elem("chat.msgs.setmodeaway") - + "<br>\n" - : p_conf->get_elem("chat.msgs.unsetmodeaway") - + "<br>\n"; - - p_user->set_invisible( !b_invisible ); - p_user->get_room()->reload_onlineframe(); - p_user->msg_post ( &s_msg ); - } +extern "C" +{ + int extern_function(void *v_arg) + { + container *c=(container *)v_arg; + + user* p_user = (user*) c->elem[1]; // the corresponding user + conf* p_conf = (conf*) ((dynamic_wrap*)c->elem[3])->CONF; + + bool b_invisible = p_user->get_invisible(); + + string s_msg = b_invisible + ? p_conf->get_elem("chat.msgs.setmodeinvisible") + + "<br>\n" + : p_conf->get_elem("chat.msgs.unsetmodeinvisible") + + "<br>\n"; + + p_user->set_invisible( !b_invisible ); + p_user->get_room()->reload_onlineframe(); + p_user->msg_post ( &s_msg ); + + return 0; + } } |
