Added stanza send hooks to C and Python exmaples

This commit is contained in:
James Booth
2016-03-26 15:51:43 +00:00
parent 609f0cb7fc
commit f4aa454397
2 changed files with 53 additions and 0 deletions

View File

@@ -685,3 +685,44 @@ prof_post_priv_message_send(const char * const room, const char * const nick, co
sprintf(buf, "%s%s, %s, %s", str, room, nick, message);
prof_win_show(plugin_win, buf);
}
char*
prof_on_message_stanza_send(const char *const stanza)
{
create_win();
char *str = "fired -> prof_on_message_stanza_send: ";
char buf[strlen(str) + strlen(stanza)];
sprintf(buf, "%s%s", str, stanza);
prof_win_show(plugin_win, buf);
return NULL;
// char *new_stanza = strdup("<message id='ktx72v49' to='chanleemoon@ejabberd.local' type='chat' xml:lang='en'><body>Art thou not Romeo, and a Montague?</body></message>");
// return (char *)new_stanza;
}
char*
prof_on_presence_stanza_send(const char *const stanza)
{
create_win();
char *str = "fired -> prof_on_presence_stanza_send: ";
char buf[strlen(str) + strlen(stanza)];
sprintf(buf, "%s%s", str, stanza);
prof_win_show(plugin_win, buf);
return NULL;
}
char*
prof_on_iq_stanza_send(const char *const stanza)
{
create_win();
char *str = "fired -> prof_on_iq_stanza_send: ";
char buf[strlen(str) + strlen(stanza)];
sprintf(buf, "%s%s", str, stanza);
prof_win_show(plugin_win, buf);
return NULL;
}