mirror of
https://github.com/profanity-im/profanity.git
synced 2025-02-02 15:08:15 -05:00
Add resource to chat message plugin hooks
This commit is contained in:
parent
a948d741d9
commit
5d6b2d0b04
@ -43,17 +43,19 @@ void prof_on_disconnect(const char * const account_name, const char * const full
|
|||||||
/**
|
/**
|
||||||
Called before a chat message is displayed
|
Called before a chat message is displayed
|
||||||
@param barejid Jabber ID of the message sender
|
@param barejid Jabber ID of the message sender
|
||||||
|
@param resource resource of the message sender
|
||||||
@param message the received message
|
@param message the received message
|
||||||
@return the new message to display, or NULL to preserve the original message
|
@return the new message to display, or NULL to preserve the original message
|
||||||
*/
|
*/
|
||||||
char* prof_pre_chat_message_display(const char * const barejid, const char *message);
|
char* prof_pre_chat_message_display(const char * const barejid, const char *const resource, const char *message);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Called after a chat message is displayed
|
Called after a chat message is displayed
|
||||||
@param barejid Jabber ID of the message sender
|
@param barejid Jabber ID of the message sender
|
||||||
|
@param resource resource of the message sender
|
||||||
@param message the received message
|
@param message the received message
|
||||||
*/
|
*/
|
||||||
void prof_post_chat_message_display(const char * const barejid, const char *message);
|
void prof_post_chat_message_display(const char * const barejid, const char *const resource, const char *message);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Called before a chat message is sent
|
Called before a chat message is sent
|
||||||
|
@ -71,12 +71,14 @@ def prof_on_disconnect(account_name, fulljid):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
def prof_pre_chat_message_display(barejid, message):
|
def prof_pre_chat_message_display(barejid, resource, message):
|
||||||
"""Called before a chat message is displayed
|
"""Called before a chat message is displayed
|
||||||
|
|
||||||
:param barejid: Jabber ID of the message sender
|
:param barejid: Jabber ID of the message sender
|
||||||
|
:param resource: resource of the message sender
|
||||||
:param message: the received message
|
:param message: the received message
|
||||||
:type barejid: str or unicode
|
:type barejid: str or unicode
|
||||||
|
:type resource: str or unicode
|
||||||
:type message: str or unicode
|
:type message: str or unicode
|
||||||
:return: the new message to display, or ``None`` to preserve the original message
|
:return: the new message to display, or ``None`` to preserve the original message
|
||||||
:rtype: str or unicode
|
:rtype: str or unicode
|
||||||
@ -84,12 +86,14 @@ def prof_pre_chat_message_display(barejid, message):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
def prof_post_chat_message_display(barejid, message):
|
def prof_post_chat_message_display(barejid, resource, message):
|
||||||
"""Called after a chat message is displayed
|
"""Called after a chat message is displayed
|
||||||
|
|
||||||
:param barejid: Jabber ID of the message sender
|
:param barejid: Jabber ID of the message sender
|
||||||
|
:param resource: resource of the message sender
|
||||||
:param message: the received message
|
:param message: the received message
|
||||||
:type barejid: str or unicode
|
:type barejid: str or unicode
|
||||||
|
:type resource: str or unicode
|
||||||
:type message: str or unicode
|
:type message: str or unicode
|
||||||
"""
|
"""
|
||||||
pass
|
pass
|
||||||
|
@ -206,124 +206,124 @@ c_on_disconnect_hook(ProfPlugin *plugin, const char *const account_name, const c
|
|||||||
}
|
}
|
||||||
|
|
||||||
char*
|
char*
|
||||||
c_pre_chat_message_display_hook(ProfPlugin *plugin, const char *const jid, const char *message)
|
c_pre_chat_message_display_hook(ProfPlugin *plugin, const char *const barejid, const char *const resource, const char *message)
|
||||||
{
|
{
|
||||||
void *f = NULL;
|
void *f = NULL;
|
||||||
char* (*func)(const char *const __jid, const char *__message);
|
char* (*func)(const char *const __barejid, const char *const __resource, const char *__message);
|
||||||
assert(plugin && plugin->module);
|
assert(plugin && plugin->module);
|
||||||
|
|
||||||
if (NULL == (f = dlsym(plugin->module, "prof_pre_chat_message_display")))
|
if (NULL == (f = dlsym(plugin->module, "prof_pre_chat_message_display")))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
func = (char* (*)(const char *const, const char *))f;
|
func = (char* (*)(const char *const, const char *const, const char *))f;
|
||||||
return func(jid, message);
|
return func(barejid, resource, message);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
c_post_chat_message_display_hook(ProfPlugin *plugin, const char *const jid, const char *message)
|
c_post_chat_message_display_hook(ProfPlugin *plugin, const char *const barejid, const char *const resource, const char *message)
|
||||||
{
|
{
|
||||||
void *f = NULL;
|
void *f = NULL;
|
||||||
void (*func)(const char *const __jid, const char *__message);
|
void (*func)(const char *const __barejid, const char *const __resource, const char *__message);
|
||||||
assert(plugin && plugin->module);
|
assert(plugin && plugin->module);
|
||||||
|
|
||||||
if (NULL == (f = dlsym(plugin->module, "prof_post_chat_message_display")))
|
if (NULL == (f = dlsym(plugin->module, "prof_post_chat_message_display")))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
func = (void (*)(const char *const, const char *))f;
|
func = (void (*)(const char *const, const char *const, const char *))f;
|
||||||
func(jid, message);
|
func(barejid, resource, message);
|
||||||
}
|
}
|
||||||
|
|
||||||
char*
|
char*
|
||||||
c_pre_chat_message_send_hook(ProfPlugin *plugin, const char *const jid, const char *message)
|
c_pre_chat_message_send_hook(ProfPlugin *plugin, const char *const barejid, const char *message)
|
||||||
{
|
{
|
||||||
void *f = NULL;
|
void *f = NULL;
|
||||||
char* (*func)(const char *const __jid, const char *__message);
|
char* (*func)(const char *const __barejid, const char *__message);
|
||||||
assert(plugin && plugin->module);
|
assert(plugin && plugin->module);
|
||||||
|
|
||||||
if (NULL == (f = dlsym(plugin->module, "prof_pre_chat_message_send")))
|
if (NULL == (f = dlsym(plugin->module, "prof_pre_chat_message_send")))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
func = (char* (*)(const char *const, const char *))f;
|
func = (char* (*)(const char *const, const char *))f;
|
||||||
return func(jid, message);
|
return func(barejid, message);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
c_post_chat_message_send_hook(ProfPlugin *plugin, const char *const jid, const char *message)
|
c_post_chat_message_send_hook(ProfPlugin *plugin, const char *const barejid, const char *message)
|
||||||
{
|
{
|
||||||
void *f = NULL;
|
void *f = NULL;
|
||||||
void (*func)(const char *const __jid, const char *__message);
|
void (*func)(const char *const __barejid, const char *__message);
|
||||||
assert(plugin && plugin->module);
|
assert(plugin && plugin->module);
|
||||||
|
|
||||||
if (NULL == (f = dlsym(plugin->module, "prof_post_chat_message_send")))
|
if (NULL == (f = dlsym(plugin->module, "prof_post_chat_message_send")))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
func = (void (*)(const char *const, const char *))f;
|
func = (void (*)(const char *const, const char *))f;
|
||||||
func(jid, message);
|
func(barejid, message);
|
||||||
}
|
}
|
||||||
|
|
||||||
char*
|
char*
|
||||||
c_pre_room_message_display_hook(ProfPlugin *plugin, const char *const room, const char *const nick, const char *message)
|
c_pre_room_message_display_hook(ProfPlugin *plugin, const char *const barejid, const char *const nick, const char *message)
|
||||||
{
|
{
|
||||||
void *f = NULL;
|
void *f = NULL;
|
||||||
char* (*func)(const char *const __room, const char *const __nick, const char *__message);
|
char* (*func)(const char *const __barejid, const char *const __nick, const char *__message);
|
||||||
assert(plugin && plugin->module);
|
assert(plugin && plugin->module);
|
||||||
|
|
||||||
if (NULL == (f = dlsym(plugin->module, "prof_pre_room_message_display")))
|
if (NULL == (f = dlsym(plugin->module, "prof_pre_room_message_display")))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
func = (char* (*)(const char *const, const char *const, const char *))f;
|
func = (char* (*)(const char *const, const char *const, const char *))f;
|
||||||
return func(room, nick, message);
|
return func(barejid, nick, message);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
c_post_room_message_display_hook(ProfPlugin *plugin, const char *const room, const char *const nick,
|
c_post_room_message_display_hook(ProfPlugin *plugin, const char *const barejid, const char *const nick,
|
||||||
const char *message)
|
const char *message)
|
||||||
{
|
{
|
||||||
void *f = NULL;
|
void *f = NULL;
|
||||||
void (*func)(const char *const __room, const char *const __nick, const char *__message);
|
void (*func)(const char *const __barejid, const char *const __nick, const char *__message);
|
||||||
assert(plugin && plugin->module);
|
assert(plugin && plugin->module);
|
||||||
|
|
||||||
if (NULL == (f = dlsym(plugin->module, "prof_post_room_message_display")))
|
if (NULL == (f = dlsym(plugin->module, "prof_post_room_message_display")))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
func = (void (*)(const char *const, const char *const, const char *))f;
|
func = (void (*)(const char *const, const char *const, const char *))f;
|
||||||
func(room, nick, message);
|
func(barejid, nick, message);
|
||||||
}
|
}
|
||||||
|
|
||||||
char*
|
char*
|
||||||
c_pre_room_message_send_hook(ProfPlugin *plugin, const char *const room, const char *message)
|
c_pre_room_message_send_hook(ProfPlugin *plugin, const char *const barejid, const char *message)
|
||||||
{
|
{
|
||||||
void *f = NULL;
|
void *f = NULL;
|
||||||
char* (*func)(const char *const __room, const char *__message);
|
char* (*func)(const char *const __barejid, const char *__message);
|
||||||
assert(plugin && plugin->module);
|
assert(plugin && plugin->module);
|
||||||
|
|
||||||
if (NULL == (f = dlsym(plugin->module, "prof_pre_room_message_send")))
|
if (NULL == (f = dlsym(plugin->module, "prof_pre_room_message_send")))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
func = (char* (*)(const char *const, const char *))f;
|
func = (char* (*)(const char *const, const char *))f;
|
||||||
return func(room, message);
|
return func(barejid, message);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
c_post_room_message_send_hook(ProfPlugin *plugin, const char *const room, const char *message)
|
c_post_room_message_send_hook(ProfPlugin *plugin, const char *const barejid, const char *message)
|
||||||
{
|
{
|
||||||
void *f = NULL;
|
void *f = NULL;
|
||||||
void (*func)(const char *const __room, const char *__message);
|
void (*func)(const char *const __barejid, const char *__message);
|
||||||
assert(plugin && plugin->module);
|
assert(plugin && plugin->module);
|
||||||
|
|
||||||
if (NULL == (f = dlsym(plugin->module, "prof_post_room_message_send")))
|
if (NULL == (f = dlsym(plugin->module, "prof_post_room_message_send")))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
func = (void (*)(const char *const, const char *))f;
|
func = (void (*)(const char *const, const char *))f;
|
||||||
func(room, message);
|
func(barejid, message);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
c_on_room_history_message_hook(ProfPlugin *plugin, const char *const room, const char *const nick,
|
c_on_room_history_message_hook(ProfPlugin *plugin, const char *const barejid, const char *const nick,
|
||||||
const char *const message, const char *const timestamp)
|
const char *const message, const char *const timestamp)
|
||||||
{
|
{
|
||||||
void *f = NULL;
|
void *f = NULL;
|
||||||
void (*func)(const char *const __room, const char *const __nick, const char *const __message,
|
void (*func)(const char *const __barejid, const char *const __nick, const char *const __message,
|
||||||
const char *const __timestamp);
|
const char *const __timestamp);
|
||||||
assert(plugin && plugin->module);
|
assert(plugin && plugin->module);
|
||||||
|
|
||||||
@ -331,64 +331,64 @@ c_on_room_history_message_hook(ProfPlugin *plugin, const char *const room, const
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
func = (void (*)(const char *const, const char *const, const char *const, const char *const))f;
|
func = (void (*)(const char *const, const char *const, const char *const, const char *const))f;
|
||||||
func(room, nick, message, timestamp);
|
func(barejid, nick, message, timestamp);
|
||||||
}
|
}
|
||||||
|
|
||||||
char*
|
char*
|
||||||
c_pre_priv_message_display_hook(ProfPlugin *plugin, const char *const room, const char *const nick, const char *message)
|
c_pre_priv_message_display_hook(ProfPlugin *plugin, const char *const barejid, const char *const nick, const char *message)
|
||||||
{
|
{
|
||||||
void *f = NULL;
|
void *f = NULL;
|
||||||
char* (*func)(const char *const __room, const char *const __nick, const char *__message);
|
char* (*func)(const char *const __barejid, const char *const __nick, const char *__message);
|
||||||
assert(plugin && plugin->module);
|
assert(plugin && plugin->module);
|
||||||
|
|
||||||
if (NULL == (f = dlsym(plugin->module, "prof_pre_priv_message_display")))
|
if (NULL == (f = dlsym(plugin->module, "prof_pre_priv_message_display")))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
func = (char* (*)(const char *const, const char *const, const char *))f;
|
func = (char* (*)(const char *const, const char *const, const char *))f;
|
||||||
return func(room, nick, message);
|
return func(barejid, nick, message);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
c_post_priv_message_display_hook(ProfPlugin *plugin, const char *const room, const char *const nick,
|
c_post_priv_message_display_hook(ProfPlugin *plugin, const char *const barejid, const char *const nick,
|
||||||
const char *message)
|
const char *message)
|
||||||
{
|
{
|
||||||
void *f = NULL;
|
void *f = NULL;
|
||||||
void (*func)(const char *const __room, const char *const __nick, const char *__message);
|
void (*func)(const char *const __barejid, const char *const __nick, const char *__message);
|
||||||
assert(plugin && plugin->module);
|
assert(plugin && plugin->module);
|
||||||
|
|
||||||
if (NULL == (f = dlsym(plugin->module, "prof_post_priv_message_display")))
|
if (NULL == (f = dlsym(plugin->module, "prof_post_priv_message_display")))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
func = (void (*)(const char *const, const char *const, const char *))f;
|
func = (void (*)(const char *const, const char *const, const char *))f;
|
||||||
func(room, nick, message);
|
func(barejid, nick, message);
|
||||||
}
|
}
|
||||||
|
|
||||||
char*
|
char*
|
||||||
c_pre_priv_message_send_hook(ProfPlugin *plugin, const char *const room, const char *const nick, const char *message)
|
c_pre_priv_message_send_hook(ProfPlugin *plugin, const char *const barejid, const char *const nick, const char *message)
|
||||||
{
|
{
|
||||||
void *f = NULL;
|
void *f = NULL;
|
||||||
char* (*func)(const char *const __room, const char *const __nick, const char *__message);
|
char* (*func)(const char *const __barejid, const char *const __nick, const char *__message);
|
||||||
assert(plugin && plugin->module);
|
assert(plugin && plugin->module);
|
||||||
|
|
||||||
if (NULL == (f = dlsym(plugin->module, "prof_pre_priv_message_send")))
|
if (NULL == (f = dlsym(plugin->module, "prof_pre_priv_message_send")))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
func = (char* (*)(const char *const, const char *const, const char *))f;
|
func = (char* (*)(const char *const, const char *const, const char *))f;
|
||||||
return func(room, nick, message);
|
return func(barejid, nick, message);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
c_post_priv_message_send_hook(ProfPlugin *plugin, const char *const room, const char *const nick, const char *message)
|
c_post_priv_message_send_hook(ProfPlugin *plugin, const char *const barejid, const char *const nick, const char *message)
|
||||||
{
|
{
|
||||||
void *f = NULL;
|
void *f = NULL;
|
||||||
void (*func)(const char *const __room, const char *const __nick, const char *__message);
|
void (*func)(const char *const __barejid, const char *const __nick, const char *__message);
|
||||||
assert(plugin && plugin->module);
|
assert(plugin && plugin->module);
|
||||||
|
|
||||||
if (NULL == (f = dlsym(plugin->module, "prof_post_priv_message_send")))
|
if (NULL == (f = dlsym(plugin->module, "prof_post_priv_message_send")))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
func = (void (*)(const char *const, const char *const, const char *))f;
|
func = (void (*)(const char *const, const char *const, const char *))f;
|
||||||
func(room, nick, message);
|
func(barejid, nick, message);
|
||||||
}
|
}
|
||||||
|
|
||||||
char*
|
char*
|
||||||
@ -521,17 +521,17 @@ c_on_chat_win_focus_hook(ProfPlugin *plugin, const char *const barejid)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
c_on_room_win_focus_hook(ProfPlugin *plugin, const char *const roomjid)
|
c_on_room_win_focus_hook(ProfPlugin *plugin, const char *const barejid)
|
||||||
{
|
{
|
||||||
void *f = NULL;
|
void *f = NULL;
|
||||||
void (*func)(const char *const __roomjid);
|
void (*func)(const char *const __barejid);
|
||||||
assert(plugin && plugin->module);
|
assert(plugin && plugin->module);
|
||||||
|
|
||||||
if (NULL == (f = dlsym(plugin->module, "prof_on_room_win_focus")))
|
if (NULL == (f = dlsym(plugin->module, "prof_on_room_win_focus")))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
func = (void (*)(const char *const))f;
|
func = (void (*)(const char *const))f;
|
||||||
func(roomjid);
|
func(barejid);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -51,27 +51,27 @@ void c_on_unload_hook(ProfPlugin *plugin);
|
|||||||
void c_on_connect_hook(ProfPlugin *plugin, const char *const account_name, const char *const fulljid);
|
void c_on_connect_hook(ProfPlugin *plugin, const char *const account_name, const char *const fulljid);
|
||||||
void c_on_disconnect_hook(ProfPlugin *plugin, const char *const account_name, const char *const fulljid);
|
void c_on_disconnect_hook(ProfPlugin *plugin, const char *const account_name, const char *const fulljid);
|
||||||
|
|
||||||
char* c_pre_chat_message_display_hook(ProfPlugin *plugin, const char *const jid, const char *message);
|
char* c_pre_chat_message_display_hook(ProfPlugin *plugin, const char *const barejid, const char *const resource, const char *message);
|
||||||
void c_post_chat_message_display_hook(ProfPlugin *plugin, const char *const jid, const char *message);
|
void c_post_chat_message_display_hook(ProfPlugin *plugin, const char *const barejid, const char *const resource, const char *message);
|
||||||
char* c_pre_chat_message_send_hook(ProfPlugin *plugin, const char *const jid, const char *message);
|
char* c_pre_chat_message_send_hook(ProfPlugin *plugin, const char *const barejid, const char *message);
|
||||||
void c_post_chat_message_send_hook(ProfPlugin *plugin, const char *const jid, const char *message);
|
void c_post_chat_message_send_hook(ProfPlugin *plugin, const char *const barejid, const char *message);
|
||||||
|
|
||||||
char* c_pre_room_message_display_hook(ProfPlugin *plugin, const char *const room, const char *const nick,
|
char* c_pre_room_message_display_hook(ProfPlugin *plugin, const char *const barejid, const char *const nick,
|
||||||
const char *message);
|
const char *message);
|
||||||
void c_post_room_message_display_hook(ProfPlugin *plugin, const char *const room, const char *const nick,
|
void c_post_room_message_display_hook(ProfPlugin *plugin, const char *const barejid, const char *const nick,
|
||||||
const char *message);
|
const char *message);
|
||||||
char* c_pre_room_message_send_hook(ProfPlugin *plugin, const char *const room, const char *message);
|
char* c_pre_room_message_send_hook(ProfPlugin *plugin, const char *const barejid, const char *message);
|
||||||
void c_post_room_message_send_hook(ProfPlugin *plugin, const char *const room, const char *message);
|
void c_post_room_message_send_hook(ProfPlugin *plugin, const char *const barejid, const char *message);
|
||||||
void c_on_room_history_message_hook(ProfPlugin *plugin, const char *const room, const char *const nick,
|
void c_on_room_history_message_hook(ProfPlugin *plugin, const char *const barejid, const char *const nick,
|
||||||
const char *const message, const char *const timestamp);
|
const char *const message, const char *const timestamp);
|
||||||
|
|
||||||
char* c_pre_priv_message_display_hook(ProfPlugin *plugin, const char *const room, const char *const nick,
|
char* c_pre_priv_message_display_hook(ProfPlugin *plugin, const char *const barejid, const char *const nick,
|
||||||
const char *message);
|
const char *message);
|
||||||
void c_post_priv_message_display_hook(ProfPlugin *plugin, const char *const room, const char *const nick,
|
void c_post_priv_message_display_hook(ProfPlugin *plugin, const char *const barejid, const char *const nick,
|
||||||
const char *message);
|
const char *message);
|
||||||
char* c_pre_priv_message_send_hook(ProfPlugin *plugin, const char *const room, const char *const nick,
|
char* c_pre_priv_message_send_hook(ProfPlugin *plugin, const char *const barejid, const char *const nick,
|
||||||
const char *const message);
|
const char *const message);
|
||||||
void c_post_priv_message_send_hook(ProfPlugin *plugin, const char *const room, const char *const nick,
|
void c_post_priv_message_send_hook(ProfPlugin *plugin, const char *const barejid, const char *const nick,
|
||||||
const char * const message);
|
const char * const message);
|
||||||
|
|
||||||
char* c_on_message_stanza_send_hook(ProfPlugin *plugin, const char *const text);
|
char* c_on_message_stanza_send_hook(ProfPlugin *plugin, const char *const text);
|
||||||
@ -89,6 +89,6 @@ void c_on_contact_presence_hook(ProfPlugin *plugin, const char *const barejid, c
|
|||||||
const char *const presence, const char *const status, const int priority);
|
const char *const presence, const char *const status, const int priority);
|
||||||
|
|
||||||
void c_on_chat_win_focus_hook(ProfPlugin *plugin, const char *const barejid);
|
void c_on_chat_win_focus_hook(ProfPlugin *plugin, const char *const barejid);
|
||||||
void c_on_room_win_focus_hook(ProfPlugin *plugin, const char *const roomjid);
|
void c_on_room_win_focus_hook(ProfPlugin *plugin, const char *const barejid);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -359,7 +359,7 @@ plugins_on_disconnect(const char * const account_name, const char * const fullji
|
|||||||
}
|
}
|
||||||
|
|
||||||
char*
|
char*
|
||||||
plugins_pre_chat_message_display(const char * const barejid, const char *message)
|
plugins_pre_chat_message_display(const char * const barejid, const char *const resource, const char *message)
|
||||||
{
|
{
|
||||||
char *new_message = NULL;
|
char *new_message = NULL;
|
||||||
char *curr_message = strdup(message);
|
char *curr_message = strdup(message);
|
||||||
@ -368,7 +368,7 @@ plugins_pre_chat_message_display(const char * const barejid, const char *message
|
|||||||
GList *curr = values;
|
GList *curr = values;
|
||||||
while (curr) {
|
while (curr) {
|
||||||
ProfPlugin *plugin = curr->data;
|
ProfPlugin *plugin = curr->data;
|
||||||
new_message = plugin->pre_chat_message_display(plugin, barejid, curr_message);
|
new_message = plugin->pre_chat_message_display(plugin, barejid, resource, curr_message);
|
||||||
if (new_message) {
|
if (new_message) {
|
||||||
free(curr_message);
|
free(curr_message);
|
||||||
curr_message = strdup(new_message);
|
curr_message = strdup(new_message);
|
||||||
@ -382,13 +382,13 @@ plugins_pre_chat_message_display(const char * const barejid, const char *message
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
plugins_post_chat_message_display(const char * const barejid, const char *message)
|
plugins_post_chat_message_display(const char * const barejid, const char *const resource, const char *message)
|
||||||
{
|
{
|
||||||
GList *values = g_hash_table_get_values(plugins);
|
GList *values = g_hash_table_get_values(plugins);
|
||||||
GList *curr = values;
|
GList *curr = values;
|
||||||
while (curr) {
|
while (curr) {
|
||||||
ProfPlugin *plugin = curr->data;
|
ProfPlugin *plugin = curr->data;
|
||||||
plugin->post_chat_message_display(plugin, barejid, message);
|
plugin->post_chat_message_display(plugin, barejid, resource, message);
|
||||||
curr = g_list_next(curr);
|
curr = g_list_next(curr);
|
||||||
}
|
}
|
||||||
g_list_free(values);
|
g_list_free(values);
|
||||||
|
@ -57,27 +57,27 @@ typedef struct prof_plugin_t {
|
|||||||
void (*on_disconnect_func)(struct prof_plugin_t* plugin, const char *const account_name,
|
void (*on_disconnect_func)(struct prof_plugin_t* plugin, const char *const account_name,
|
||||||
const char *const fulljid);
|
const char *const fulljid);
|
||||||
|
|
||||||
char* (*pre_chat_message_display)(struct prof_plugin_t* plugin, const char *const jid, const char *message);
|
char* (*pre_chat_message_display)(struct prof_plugin_t* plugin, const char *const barejid, const char *const resource, const char *message);
|
||||||
void (*post_chat_message_display)(struct prof_plugin_t* plugin, const char *const jid, const char *message);
|
void (*post_chat_message_display)(struct prof_plugin_t* plugin, const char *const barejid, const char *const resource, const char *message);
|
||||||
char* (*pre_chat_message_send)(struct prof_plugin_t* plugin, const char *const jid, const char *message);
|
char* (*pre_chat_message_send)(struct prof_plugin_t* plugin, const char *const barejid, const char *message);
|
||||||
void (*post_chat_message_send)(struct prof_plugin_t* plugin, const char *const jid, const char *message);
|
void (*post_chat_message_send)(struct prof_plugin_t* plugin, const char *const barejid, const char *message);
|
||||||
|
|
||||||
char* (*pre_room_message_display)(struct prof_plugin_t* plugin, const char *const room, const char *const nick,
|
char* (*pre_room_message_display)(struct prof_plugin_t* plugin, const char *const barejid, const char *const nick,
|
||||||
const char *message);
|
const char *message);
|
||||||
void (*post_room_message_display)(struct prof_plugin_t* plugin, const char *const room, const char *const nick,
|
void (*post_room_message_display)(struct prof_plugin_t* plugin, const char *const barejid, const char *const nick,
|
||||||
const char *message);
|
const char *message);
|
||||||
char* (*pre_room_message_send)(struct prof_plugin_t* plugin, const char *const room, const char *message);
|
char* (*pre_room_message_send)(struct prof_plugin_t* plugin, const char *const barejid, const char *message);
|
||||||
void (*post_room_message_send)(struct prof_plugin_t* plugin, const char *const room, const char *message);
|
void (*post_room_message_send)(struct prof_plugin_t* plugin, const char *const barejid, const char *message);
|
||||||
void (*on_room_history_message)(struct prof_plugin_t* plugin, const char *const room, const char *const nick, const char *const message,
|
void (*on_room_history_message)(struct prof_plugin_t* plugin, const char *const barejid, const char *const nick, const char *const message,
|
||||||
const char *const timestamp);
|
const char *const timestamp);
|
||||||
|
|
||||||
char* (*pre_priv_message_display)(struct prof_plugin_t* plugin, const char *const room, const char *const nick,
|
char* (*pre_priv_message_display)(struct prof_plugin_t* plugin, const char *const barejid, const char *const nick,
|
||||||
const char *message);
|
const char *message);
|
||||||
void (*post_priv_message_display)(struct prof_plugin_t* plugin, const char *const room, const char *const nick,
|
void (*post_priv_message_display)(struct prof_plugin_t* plugin, const char *const barejid, const char *const nick,
|
||||||
const char *message);
|
const char *message);
|
||||||
char* (*pre_priv_message_send)(struct prof_plugin_t* plugin, const char *const room, const char *const nick,
|
char* (*pre_priv_message_send)(struct prof_plugin_t* plugin, const char *const barejid, const char *const nick,
|
||||||
const char *const message);
|
const char *const message);
|
||||||
void (*post_priv_message_send)(struct prof_plugin_t* plugin, const char *const room, const char *const nick,
|
void (*post_priv_message_send)(struct prof_plugin_t* plugin, const char *const barejid, const char *const nick,
|
||||||
const char *const message);
|
const char *const message);
|
||||||
|
|
||||||
char* (*on_message_stanza_send)(struct prof_plugin_t* plugin, const char *const text);
|
char* (*on_message_stanza_send)(struct prof_plugin_t* plugin, const char *const text);
|
||||||
@ -95,7 +95,7 @@ typedef struct prof_plugin_t {
|
|||||||
const char *const presence, const char *const status, const int priority);
|
const char *const presence, const char *const status, const int priority);
|
||||||
|
|
||||||
void (*on_chat_win_focus)(struct prof_plugin_t* plugin, const char *const barejid);
|
void (*on_chat_win_focus)(struct prof_plugin_t* plugin, const char *const barejid);
|
||||||
void (*on_room_win_focus)(struct prof_plugin_t* plugin, const char *const roomjid);
|
void (*on_room_win_focus)(struct prof_plugin_t* plugin, const char *const barejid);
|
||||||
} ProfPlugin;
|
} ProfPlugin;
|
||||||
|
|
||||||
void plugins_init(void);
|
void plugins_init(void);
|
||||||
@ -117,8 +117,8 @@ void plugins_on_shutdown(void);
|
|||||||
void plugins_on_connect(const char *const account_name, const char *const fulljid);
|
void plugins_on_connect(const char *const account_name, const char *const fulljid);
|
||||||
void plugins_on_disconnect(const char *const account_name, const char *const fulljid);
|
void plugins_on_disconnect(const char *const account_name, const char *const fulljid);
|
||||||
|
|
||||||
char* plugins_pre_chat_message_display(const char *const barejid, const char *message);
|
char* plugins_pre_chat_message_display(const char *const barejid, const char *const resource, const char *message);
|
||||||
void plugins_post_chat_message_display(const char *const barejid, const char *message);
|
void plugins_post_chat_message_display(const char *const barejid, const char *const resource, const char *message);
|
||||||
char* plugins_pre_chat_message_send(const char *const barejid, const char *message);
|
char* plugins_pre_chat_message_send(const char *const barejid, const char *message);
|
||||||
void plugins_post_chat_message_send(const char *const barejid, const char *message);
|
void plugins_post_chat_message_send(const char *const barejid, const char *message);
|
||||||
|
|
||||||
|
@ -277,10 +277,11 @@ python_on_disconnect_hook(ProfPlugin *plugin, const char *const account_name, co
|
|||||||
}
|
}
|
||||||
|
|
||||||
char*
|
char*
|
||||||
python_pre_chat_message_display_hook(ProfPlugin *plugin, const char *const jid, const char *message)
|
python_pre_chat_message_display_hook(ProfPlugin *plugin, const char *const barejid, const char *const resource,
|
||||||
|
const char *message)
|
||||||
{
|
{
|
||||||
disable_python_threads();
|
disable_python_threads();
|
||||||
PyObject *p_args = Py_BuildValue("ss", jid, message);
|
PyObject *p_args = Py_BuildValue("sss", barejid, resource, message);
|
||||||
PyObject *p_function;
|
PyObject *p_function;
|
||||||
|
|
||||||
PyObject *p_module = plugin->module;
|
PyObject *p_module = plugin->module;
|
||||||
@ -304,10 +305,10 @@ python_pre_chat_message_display_hook(ProfPlugin *plugin, const char *const jid,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
python_post_chat_message_display_hook(ProfPlugin *plugin, const char *const jid, const char *message)
|
python_post_chat_message_display_hook(ProfPlugin *plugin, const char *const barejid, const char *const resource, const char *message)
|
||||||
{
|
{
|
||||||
disable_python_threads();
|
disable_python_threads();
|
||||||
PyObject *p_args = Py_BuildValue("ss", jid, message);
|
PyObject *p_args = Py_BuildValue("sss", barejid, resource, message);
|
||||||
PyObject *p_function;
|
PyObject *p_function;
|
||||||
|
|
||||||
PyObject *p_module = plugin->module;
|
PyObject *p_module = plugin->module;
|
||||||
@ -325,10 +326,10 @@ python_post_chat_message_display_hook(ProfPlugin *plugin, const char *const jid,
|
|||||||
}
|
}
|
||||||
|
|
||||||
char*
|
char*
|
||||||
python_pre_chat_message_send_hook(ProfPlugin *plugin, const char * const jid, const char *message)
|
python_pre_chat_message_send_hook(ProfPlugin *plugin, const char * const barejid, const char *message)
|
||||||
{
|
{
|
||||||
disable_python_threads();
|
disable_python_threads();
|
||||||
PyObject *p_args = Py_BuildValue("ss", jid, message);
|
PyObject *p_args = Py_BuildValue("ss", barejid, message);
|
||||||
PyObject *p_function;
|
PyObject *p_function;
|
||||||
|
|
||||||
PyObject *p_module = plugin->module;
|
PyObject *p_module = plugin->module;
|
||||||
@ -352,10 +353,10 @@ python_pre_chat_message_send_hook(ProfPlugin *plugin, const char * const jid, co
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
python_post_chat_message_send_hook(ProfPlugin *plugin, const char *const jid, const char *message)
|
python_post_chat_message_send_hook(ProfPlugin *plugin, const char *const barejid, const char *message)
|
||||||
{
|
{
|
||||||
disable_python_threads();
|
disable_python_threads();
|
||||||
PyObject *p_args = Py_BuildValue("ss", jid, message);
|
PyObject *p_args = Py_BuildValue("ss", barejid, message);
|
||||||
PyObject *p_function;
|
PyObject *p_function;
|
||||||
|
|
||||||
PyObject *p_module = plugin->module;
|
PyObject *p_module = plugin->module;
|
||||||
@ -373,10 +374,10 @@ python_post_chat_message_send_hook(ProfPlugin *plugin, const char *const jid, co
|
|||||||
}
|
}
|
||||||
|
|
||||||
char*
|
char*
|
||||||
python_pre_room_message_display_hook(ProfPlugin *plugin, const char * const room, const char * const nick, const char *message)
|
python_pre_room_message_display_hook(ProfPlugin *plugin, const char * const barejid, const char * const nick, const char *message)
|
||||||
{
|
{
|
||||||
disable_python_threads();
|
disable_python_threads();
|
||||||
PyObject *p_args = Py_BuildValue("sss", room, nick, message);
|
PyObject *p_args = Py_BuildValue("sss", barejid, nick, message);
|
||||||
PyObject *p_function;
|
PyObject *p_function;
|
||||||
|
|
||||||
PyObject *p_module = plugin->module;
|
PyObject *p_module = plugin->module;
|
||||||
@ -400,11 +401,11 @@ python_pre_room_message_display_hook(ProfPlugin *plugin, const char * const room
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
python_post_room_message_display_hook(ProfPlugin *plugin, const char *const room, const char *const nick,
|
python_post_room_message_display_hook(ProfPlugin *plugin, const char *const barejid, const char *const nick,
|
||||||
const char *message)
|
const char *message)
|
||||||
{
|
{
|
||||||
disable_python_threads();
|
disable_python_threads();
|
||||||
PyObject *p_args = Py_BuildValue("sss", room, nick, message);
|
PyObject *p_args = Py_BuildValue("sss", barejid, nick, message);
|
||||||
PyObject *p_function;
|
PyObject *p_function;
|
||||||
|
|
||||||
PyObject *p_module = plugin->module;
|
PyObject *p_module = plugin->module;
|
||||||
@ -422,10 +423,10 @@ python_post_room_message_display_hook(ProfPlugin *plugin, const char *const room
|
|||||||
}
|
}
|
||||||
|
|
||||||
char*
|
char*
|
||||||
python_pre_room_message_send_hook(ProfPlugin *plugin, const char *const room, const char *message)
|
python_pre_room_message_send_hook(ProfPlugin *plugin, const char *const barejid, const char *message)
|
||||||
{
|
{
|
||||||
disable_python_threads();
|
disable_python_threads();
|
||||||
PyObject *p_args = Py_BuildValue("ss", room, message);
|
PyObject *p_args = Py_BuildValue("ss", barejid, message);
|
||||||
PyObject *p_function;
|
PyObject *p_function;
|
||||||
|
|
||||||
PyObject *p_module = plugin->module;
|
PyObject *p_module = plugin->module;
|
||||||
@ -449,10 +450,10 @@ python_pre_room_message_send_hook(ProfPlugin *plugin, const char *const room, co
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
python_post_room_message_send_hook(ProfPlugin *plugin, const char *const room, const char *message)
|
python_post_room_message_send_hook(ProfPlugin *plugin, const char *const barejid, const char *message)
|
||||||
{
|
{
|
||||||
disable_python_threads();
|
disable_python_threads();
|
||||||
PyObject *p_args = Py_BuildValue("ss", room, message);
|
PyObject *p_args = Py_BuildValue("ss", barejid, message);
|
||||||
PyObject *p_function;
|
PyObject *p_function;
|
||||||
|
|
||||||
PyObject *p_module = plugin->module;
|
PyObject *p_module = plugin->module;
|
||||||
@ -470,11 +471,11 @@ python_post_room_message_send_hook(ProfPlugin *plugin, const char *const room, c
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
python_on_room_history_message_hook(ProfPlugin *plugin, const char *const room, const char *const nick,
|
python_on_room_history_message_hook(ProfPlugin *plugin, const char *const barejid, const char *const nick,
|
||||||
const char *const message, const char *const timestamp)
|
const char *const message, const char *const timestamp)
|
||||||
{
|
{
|
||||||
disable_python_threads();
|
disable_python_threads();
|
||||||
PyObject *p_args = Py_BuildValue("ssss", room, nick, message, timestamp);
|
PyObject *p_args = Py_BuildValue("ssss", barejid, nick, message, timestamp);
|
||||||
PyObject *p_function;
|
PyObject *p_function;
|
||||||
|
|
||||||
PyObject *p_module = plugin->module;
|
PyObject *p_module = plugin->module;
|
||||||
@ -492,11 +493,11 @@ python_on_room_history_message_hook(ProfPlugin *plugin, const char *const room,
|
|||||||
}
|
}
|
||||||
|
|
||||||
char*
|
char*
|
||||||
python_pre_priv_message_display_hook(ProfPlugin *plugin, const char *const room, const char *const nick,
|
python_pre_priv_message_display_hook(ProfPlugin *plugin, const char *const barejid, const char *const nick,
|
||||||
const char *message)
|
const char *message)
|
||||||
{
|
{
|
||||||
disable_python_threads();
|
disable_python_threads();
|
||||||
PyObject *p_args = Py_BuildValue("sss", room, nick, message);
|
PyObject *p_args = Py_BuildValue("sss", barejid, nick, message);
|
||||||
PyObject *p_function;
|
PyObject *p_function;
|
||||||
|
|
||||||
PyObject *p_module = plugin->module;
|
PyObject *p_module = plugin->module;
|
||||||
@ -520,11 +521,11 @@ python_pre_priv_message_display_hook(ProfPlugin *plugin, const char *const room,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
python_post_priv_message_display_hook(ProfPlugin *plugin, const char *const room, const char *const nick,
|
python_post_priv_message_display_hook(ProfPlugin *plugin, const char *const barejid, const char *const nick,
|
||||||
const char *message)
|
const char *message)
|
||||||
{
|
{
|
||||||
disable_python_threads();
|
disable_python_threads();
|
||||||
PyObject *p_args = Py_BuildValue("sss", room, nick, message);
|
PyObject *p_args = Py_BuildValue("sss", barejid, nick, message);
|
||||||
PyObject *p_function;
|
PyObject *p_function;
|
||||||
|
|
||||||
PyObject *p_module = plugin->module;
|
PyObject *p_module = plugin->module;
|
||||||
@ -542,11 +543,11 @@ python_post_priv_message_display_hook(ProfPlugin *plugin, const char *const room
|
|||||||
}
|
}
|
||||||
|
|
||||||
char*
|
char*
|
||||||
python_pre_priv_message_send_hook(ProfPlugin *plugin, const char *const room, const char *const nick,
|
python_pre_priv_message_send_hook(ProfPlugin *plugin, const char *const barejid, const char *const nick,
|
||||||
const char *const message)
|
const char *const message)
|
||||||
{
|
{
|
||||||
disable_python_threads();
|
disable_python_threads();
|
||||||
PyObject *p_args = Py_BuildValue("sss", room, nick, message);
|
PyObject *p_args = Py_BuildValue("sss", barejid, nick, message);
|
||||||
PyObject *p_function;
|
PyObject *p_function;
|
||||||
|
|
||||||
PyObject *p_module = plugin->module;
|
PyObject *p_module = plugin->module;
|
||||||
@ -570,11 +571,11 @@ python_pre_priv_message_send_hook(ProfPlugin *plugin, const char *const room, co
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
python_post_priv_message_send_hook(ProfPlugin *plugin, const char *const room, const char *const nick,
|
python_post_priv_message_send_hook(ProfPlugin *plugin, const char *const barejid, const char *const nick,
|
||||||
const char *const message)
|
const char *const message)
|
||||||
{
|
{
|
||||||
disable_python_threads();
|
disable_python_threads();
|
||||||
PyObject *p_args = Py_BuildValue("sss", room, nick, message);
|
PyObject *p_args = Py_BuildValue("sss", barejid, nick, message);
|
||||||
PyObject *p_function;
|
PyObject *p_function;
|
||||||
|
|
||||||
PyObject *p_module = plugin->module;
|
PyObject *p_module = plugin->module;
|
||||||
@ -828,10 +829,10 @@ python_on_chat_win_focus_hook(ProfPlugin *plugin, const char *const barejid)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
python_on_room_win_focus_hook(ProfPlugin *plugin, const char *const roomjid)
|
python_on_room_win_focus_hook(ProfPlugin *plugin, const char *const barejid)
|
||||||
{
|
{
|
||||||
disable_python_threads();
|
disable_python_threads();
|
||||||
PyObject *p_args = Py_BuildValue("(s)", roomjid);
|
PyObject *p_args = Py_BuildValue("(s)", barejid);
|
||||||
PyObject *p_function;
|
PyObject *p_function;
|
||||||
|
|
||||||
PyObject *p_module = plugin->module;
|
PyObject *p_module = plugin->module;
|
||||||
|
@ -53,27 +53,27 @@ void python_on_unload_hook(ProfPlugin *plugin);
|
|||||||
void python_on_connect_hook(ProfPlugin *plugin, const char *const account_name, const char *const fulljid);
|
void python_on_connect_hook(ProfPlugin *plugin, const char *const account_name, const char *const fulljid);
|
||||||
void python_on_disconnect_hook(ProfPlugin *plugin, const char *const account_name, const char *const fulljid);
|
void python_on_disconnect_hook(ProfPlugin *plugin, const char *const account_name, const char *const fulljid);
|
||||||
|
|
||||||
char* python_pre_chat_message_display_hook(ProfPlugin *plugin, const char *const jid, const char *message);
|
char* python_pre_chat_message_display_hook(ProfPlugin *plugin, const char *const barejid, const char *const resource, const char *message);
|
||||||
void python_post_chat_message_display_hook(ProfPlugin *plugin, const char *const jid, const char *message);
|
void python_post_chat_message_display_hook(ProfPlugin *plugin, const char *const barejid, const char *const resource, const char *message);
|
||||||
char* python_pre_chat_message_send_hook(ProfPlugin *plugin, const char *const jid, const char *message);
|
char* python_pre_chat_message_send_hook(ProfPlugin *plugin, const char *const barejid, const char *message);
|
||||||
void python_post_chat_message_send_hook(ProfPlugin *plugin, const char *const jid, const char *message);
|
void python_post_chat_message_send_hook(ProfPlugin *plugin, const char *const barejid, const char *message);
|
||||||
|
|
||||||
char* python_pre_room_message_display_hook(ProfPlugin *plugin, const char *const room, const char *const nick,
|
char* python_pre_room_message_display_hook(ProfPlugin *plugin, const char *const barejid, const char *const nick,
|
||||||
const char *message);
|
const char *message);
|
||||||
void python_post_room_message_display_hook(ProfPlugin *plugin, const char *const room, const char *const nick,
|
void python_post_room_message_display_hook(ProfPlugin *plugin, const char *const barejid, const char *const nick,
|
||||||
const char *message);
|
const char *message);
|
||||||
char* python_pre_room_message_send_hook(ProfPlugin *plugin, const char *const room, const char *message);
|
char* python_pre_room_message_send_hook(ProfPlugin *plugin, const char *const barejid, const char *message);
|
||||||
void python_post_room_message_send_hook(ProfPlugin *plugin, const char *const room, const char *message);
|
void python_post_room_message_send_hook(ProfPlugin *plugin, const char *const barejid, const char *message);
|
||||||
void python_on_room_history_message_hook(ProfPlugin *plugin, const char *const room, const char *const nick,
|
void python_on_room_history_message_hook(ProfPlugin *plugin, const char *const barejid, const char *const nick,
|
||||||
const char *const message, const char *const timestamp);
|
const char *const message, const char *const timestamp);
|
||||||
|
|
||||||
char* python_pre_priv_message_display_hook(ProfPlugin *plugin, const char *const room, const char *const nick,
|
char* python_pre_priv_message_display_hook(ProfPlugin *plugin, const char *const barejid, const char *const nick,
|
||||||
const char *message);
|
const char *message);
|
||||||
void python_post_priv_message_display_hook(ProfPlugin *plugin, const char *const room, const char *const nick,
|
void python_post_priv_message_display_hook(ProfPlugin *plugin, const char *const barejid, const char *const nick,
|
||||||
const char *message);
|
const char *message);
|
||||||
char* python_pre_priv_message_send_hook(ProfPlugin *plugin, const char *const room, const char *const nick,
|
char* python_pre_priv_message_send_hook(ProfPlugin *plugin, const char *const barejid, const char *const nick,
|
||||||
const char *const message);
|
const char *const message);
|
||||||
void python_post_priv_message_send_hook(ProfPlugin *plugin, const char *const room, const char *const nick,
|
void python_post_priv_message_send_hook(ProfPlugin *plugin, const char *const barejid, const char *const nick,
|
||||||
const char *const message);
|
const char *const message);
|
||||||
|
|
||||||
char* python_on_message_stanza_send_hook(ProfPlugin *plugin, const char *const text);
|
char* python_on_message_stanza_send_hook(ProfPlugin *plugin, const char *const text);
|
||||||
@ -89,6 +89,6 @@ void python_on_contact_presence_hook(ProfPlugin *plugin, const char *const barej
|
|||||||
const char *const presence, const char *const status, const int priority);
|
const char *const presence, const char *const status, const int priority);
|
||||||
|
|
||||||
void python_on_chat_win_focus_hook(ProfPlugin *plugin, const char *const barejid);
|
void python_on_chat_win_focus_hook(ProfPlugin *plugin, const char *const barejid);
|
||||||
void python_on_room_win_focus_hook(ProfPlugin *plugin, const char *const roomjid);
|
void python_on_room_win_focus_hook(ProfPlugin *plugin, const char *const barejid);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -235,7 +235,7 @@ chatwin_incoming_msg(ProfChatWin *chatwin, const char *const resource, const cha
|
|||||||
{
|
{
|
||||||
assert(chatwin != NULL);
|
assert(chatwin != NULL);
|
||||||
|
|
||||||
char *plugin_message = plugins_pre_chat_message_display(chatwin->barejid, message);
|
char *plugin_message = plugins_pre_chat_message_display(chatwin->barejid, resource, message);
|
||||||
|
|
||||||
ProfWin *window = (ProfWin*)chatwin;
|
ProfWin *window = (ProfWin*)chatwin;
|
||||||
int num = wins_get_num(window);
|
int num = wins_get_num(window);
|
||||||
@ -287,7 +287,7 @@ chatwin_incoming_msg(ProfChatWin *chatwin, const char *const resource, const cha
|
|||||||
|
|
||||||
free(display_name);
|
free(display_name);
|
||||||
|
|
||||||
plugins_post_chat_message_display(chatwin->barejid, plugin_message);
|
plugins_post_chat_message_display(chatwin->barejid, resource, plugin_message);
|
||||||
|
|
||||||
free(plugin_message);
|
free(plugin_message);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user