aboutsummaryrefslogtreecommitdiffstats
path: root/protocols/bee_user.c
diff options
context:
space:
mode:
authordequis <dx@dxzone.com.ar>2015-05-30 21:11:20 -0300
committerdequis <dx@dxzone.com.ar>2015-05-30 21:11:20 -0300
commit0f7eccff5b3f7436f50c66e4270009fa6290a578 (patch)
tree6bb388836ad43e2beea4880082b0728201c09772 /protocols/bee_user.c
parentc42d9916663ecae98d01c539cf038d9bc99acfbb (diff)
parentf453a7faa95f9210adbdba20644f280cce68c42e (diff)
Merge branch 'develop'
Diffstat (limited to 'protocols/bee_user.c')
-rw-r--r--protocols/bee_user.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/protocols/bee_user.c b/protocols/bee_user.c
index 2eb24997..2d63bfb4 100644
--- a/protocols/bee_user.c
+++ b/protocols/bee_user.c
@@ -270,6 +270,32 @@ void imcb_buddy_msg(struct im_connection *ic, const char *handle, const char *ms
}
}
+void imcb_notify_email(struct im_connection *ic, char *format, ...)
+{
+ const char *handle;
+ va_list params;
+ char *msg;
+
+ if (!set_getbool(&ic->acc->set, "mail_notifications")) {
+ return;
+ }
+
+ va_start(params, format);
+ msg = g_strdup_vprintf(format, params);
+ va_end(params);
+
+ /* up to the protocol to set_add this if they want to use this */
+ handle = set_getstr(&ic->acc->set, "mail_notifications_handle");
+
+ if (handle != NULL) {
+ imcb_buddy_msg(ic, handle, msg, 0, 0);
+ } else {
+ imcb_log(ic, "%s", msg);
+ }
+
+ g_free(msg);
+}
+
void imcb_buddy_typing(struct im_connection *ic, const char *handle, uint32_t flags)
{
bee_user_t *bu;