summaryrefslogtreecommitdiff
path: root/src/mods/commands/yc_invisible.cpp
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2013-04-06 13:14:42 +0200
committerPaul Buetow <paul@buetow.org>2013-04-06 13:14:42 +0200
commit42b79aa5c591dde88e78922a519802f948d9ea60 (patch)
tree92cd4e576656837bb99214d8c09c3fec3201474f /src/mods/commands/yc_invisible.cpp
parent520f54d6219b7c625b4e07463ac393e6982ddab6 (diff)
tagging ychat-0.7.9.4ychat-0.7.9.4
Diffstat (limited to 'src/mods/commands/yc_invisible.cpp')
-rwxr-xr-xsrc/mods/commands/yc_invisible.cpp43
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;
+ }
}