summaryrefslogtreecommitdiff
path: root/ychat-0.8.2/src/mods/commands/yc_time.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ychat-0.8.2/src/mods/commands/yc_time.cpp')
-rwxr-xr-xychat-0.8.2/src/mods/commands/yc_time.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/ychat-0.8.2/src/mods/commands/yc_time.cpp b/ychat-0.8.2/src/mods/commands/yc_time.cpp
new file mode 100755
index 0000000..86a93ec
--- /dev/null
+++ b/ychat-0.8.2/src/mods/commands/yc_time.cpp
@@ -0,0 +1,22 @@
+#include "../../incl.h"
+
+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;
+ timr* p_timr = (timr*) ((dynamic_wrap*)c->elem[3])->TIMR;
+
+ string s_msg = p_conf->get_elem("chat.msgs.servertime") + p_timr->get_time() + "<br>\n";
+
+ p_user->msg_post( &s_msg );
+
+ return 0;
+ }
+}
+