mirror of
https://github.com/profanity-im/profanity.git
synced 2024-11-03 19:37:16 -05:00
Merge branch 'master' into plugins
This commit is contained in:
commit
a60447ee60
@ -43,17 +43,19 @@ void prof_on_disconnect(const char * const account_name, const char * const full
|
||||
/**
|
||||
Called before a chat message is displayed
|
||||
@param barejid Jabber ID of the message sender
|
||||
@param resource resource of the message sender
|
||||
@param message the received 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
|
||||
@param barejid Jabber ID of the message sender
|
||||
@param resource resource of the message sender
|
||||
@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
|
||||
@ -72,78 +74,78 @@ void prof_post_chat_message_send(const char * const barejid, const char *message
|
||||
|
||||
/**
|
||||
Called before a chat room message is displayed
|
||||
@param room Jabber ID of the room
|
||||
@param barejid Jabber ID of the room
|
||||
@param nick nickname of message sender
|
||||
@param message the received message
|
||||
@return the new message to display, or NULL to preserve the original message
|
||||
*/
|
||||
char* prof_pre_room_message_display(const char * const room, const char * const nick, const char *message);
|
||||
char* prof_pre_room_message_display(const char * const barejid, const char * const nick, const char *message);
|
||||
|
||||
/**
|
||||
Called after a chat room message is displayed
|
||||
@param room Jabber ID of the room
|
||||
@param barejid Jabber ID of the room
|
||||
@param nick nickname of the message sender
|
||||
@param message the received message
|
||||
*/
|
||||
void prof_post_room_message_display(const char * const room, const char * const nick, const char *message);
|
||||
void prof_post_room_message_display(const char * const barejid, const char * const nick, const char *message);
|
||||
|
||||
/**
|
||||
Called before a chat room message is sent
|
||||
@param room Jabber ID of the room
|
||||
@param barejid Jabber ID of the room
|
||||
@param message the message to be sent
|
||||
@return the new message to send, or NULL to preserve the original message
|
||||
*/
|
||||
char* prof_pre_room_message_send(const char * const room, const char *message);
|
||||
char* prof_pre_room_message_send(const char * const barejid, const char *message);
|
||||
|
||||
/**
|
||||
Called after a chat room message has been sent
|
||||
@param room Jabber ID of the room
|
||||
@param barejid Jabber ID of the room
|
||||
@param message the sent message
|
||||
*/
|
||||
void prof_post_room_message_send(const char * const room, const char *message);
|
||||
void prof_post_room_message_send(const char * const barejid, const char *message);
|
||||
|
||||
/**
|
||||
Called when the server sends a chat room history message
|
||||
@param room Jabber ID of the room
|
||||
@param barejid Jabber ID of the room
|
||||
@param nick nickname of the message sender
|
||||
@param message the message to be sent
|
||||
@param timestamp time the message was originally sent to the room, in ISO8601 format
|
||||
*/
|
||||
void prof_on_room_history_message(const char * const room, const char *const nick, const char *const message, const char *const timestamp);
|
||||
void prof_on_room_history_message(const char * const barejid, const char *const nick, const char *const message, const char *const timestamp);
|
||||
|
||||
/**
|
||||
Called before a private chat room message is displayed
|
||||
@param room Jabber ID of the room
|
||||
@param barejid Jabber ID of the room
|
||||
@param nick nickname of message sender
|
||||
@param message the received message
|
||||
@return the new message to display, or NULL to preserve the original message
|
||||
*/
|
||||
char* prof_pre_priv_message_display(const char * const room, const char * const nick, const char *message);
|
||||
char* prof_pre_priv_message_display(const char * const barejid, const char * const nick, const char *message);
|
||||
|
||||
/**
|
||||
Called after a private chat room message is displayed
|
||||
@param room Jabber ID of the room
|
||||
@param barejid Jabber ID of the room
|
||||
@param nick nickname of the message sender
|
||||
@param message the received message
|
||||
*/
|
||||
void prof_post_priv_message_display(const char * const room, const char * const nick, const char *message);
|
||||
void prof_post_priv_message_display(const char * const barejid, const char * const nick, const char *message);
|
||||
|
||||
/**
|
||||
Called before a private chat room message is sent
|
||||
@param room Jabber ID of the room
|
||||
@param barejid Jabber ID of the room
|
||||
@param nick nickname of message recipient
|
||||
@param message the message to be sent
|
||||
@return the new message to send, or NULL to preserve the original message
|
||||
*/
|
||||
char* prof_pre_priv_message_send(const char * const room, const char * const nick, const char *message);
|
||||
char* prof_pre_priv_message_send(const char * const barejid, const char * const nick, const char *message);
|
||||
|
||||
/**
|
||||
Called after a private chat room message has been sent
|
||||
@param room Jabber ID of the room
|
||||
@param barejid Jabber ID of the room
|
||||
@param nick nickname of the message recipient
|
||||
@param message the sent message
|
||||
*/
|
||||
void prof_post_priv_message_send(const char * const room, const char * const nick, const char *message);
|
||||
void prof_post_priv_message_send(const char * const barejid, const char * const nick, const char *message);
|
||||
|
||||
/**
|
||||
Called before an XMPP message stanza is sent
|
||||
@ -213,6 +215,6 @@ void prof_on_chat_win_focus(const char *const barejid);
|
||||
|
||||
/**
|
||||
Called when a chat room window is focussed
|
||||
@param room Jabber ID of the room
|
||||
@param barejid Jabber ID of the room
|
||||
*/
|
||||
void prof_on_room_win_focus(const char *const room);
|
||||
void prof_on_room_win_focus(const char *const barejid);
|
||||
|
@ -71,12 +71,14 @@ def prof_on_disconnect(account_name, fulljid):
|
||||
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
|
||||
|
||||
:param barejid: Jabber ID of the message sender
|
||||
:param resource: resource of the message sender
|
||||
:param message: the received message
|
||||
:type barejid: str or unicode
|
||||
:type resource: str or unicode
|
||||
:type message: str or unicode
|
||||
:return: the new message to display, or ``None`` to preserve the original message
|
||||
:rtype: str or unicode
|
||||
@ -84,12 +86,14 @@ def prof_pre_chat_message_display(barejid, message):
|
||||
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
|
||||
|
||||
:param barejid: Jabber ID of the message sender
|
||||
:param resource: resource of the message sender
|
||||
:param message: the received message
|
||||
:type barejid: str or unicode
|
||||
:type resource: str or unicode
|
||||
:type message: str or unicode
|
||||
"""
|
||||
pass
|
||||
@ -119,13 +123,13 @@ def prof_post_chat_message_send(barejid, message):
|
||||
pass
|
||||
|
||||
|
||||
def prof_pre_room_message_display(room, nick, message):
|
||||
def prof_pre_room_message_display(barejid, nick, message):
|
||||
"""Called before a chat room message is displayed
|
||||
|
||||
:param room: Jabber ID of the room
|
||||
:param barejid: Jabber ID of the room
|
||||
:param nick: nickname of message sender
|
||||
:param message: the received message
|
||||
:type room: str or unicode
|
||||
:type barejid: str or unicode
|
||||
:type nick: str or unicode
|
||||
:type message: str or unicode
|
||||
:return: the new message to display, or ``None`` to preserve the original message
|
||||
@ -134,25 +138,25 @@ def prof_pre_room_message_display(room, nick, message):
|
||||
pass
|
||||
|
||||
|
||||
def prof_post_room_message_display(room, nick, message):
|
||||
def prof_post_room_message_display(barejid, nick, message):
|
||||
"""Called after a chat room message is displayed
|
||||
|
||||
:param room: Jabber ID of the room
|
||||
:param barejid: Jabber ID of the room
|
||||
:param nick: nickname of the message sender
|
||||
:param message: the received message
|
||||
:type room: str or unicode
|
||||
:type barejid: str or unicode
|
||||
:type nick: str or unicode
|
||||
:type message: str or unicode
|
||||
"""
|
||||
pass
|
||||
|
||||
|
||||
def prof_pre_room_message_send(room, message):
|
||||
def prof_pre_room_message_send(barejid, message):
|
||||
"""Called before a chat room message is sent
|
||||
|
||||
:param room: Jabber ID of the room
|
||||
:param barejid: Jabber ID of the room
|
||||
:param message: the message to be sent
|
||||
:type room: str or unicode
|
||||
:type barejid: str or unicode
|
||||
:type message: str or unicode
|
||||
:return: the new message to send, or ``None`` to preserve the original message
|
||||
:rtype: str or unicode
|
||||
@ -160,25 +164,25 @@ def prof_pre_room_message_send(room, message):
|
||||
pass
|
||||
|
||||
|
||||
def prof_post_room_message_send(room, message):
|
||||
def prof_post_room_message_send(barejid, message):
|
||||
"""Called after a chat room message has been sent
|
||||
|
||||
:param room: Jabber ID of the room
|
||||
:param barejid: Jabber ID of the room
|
||||
:param message: the sent message
|
||||
:type room: str or unicode
|
||||
:type barejid: str or unicode
|
||||
:type message: str or unicode
|
||||
"""
|
||||
pass
|
||||
|
||||
|
||||
def prof_on_room_history_message(room, nick, message, timestamp):
|
||||
def prof_on_room_history_message(barejid, nick, message, timestamp):
|
||||
"""Called when the server sends a chat room history message
|
||||
|
||||
:param room: Jabber ID of the room
|
||||
:param barejid: Jabber ID of the room
|
||||
:param nick: nickname of the message sender
|
||||
:param message: the message to be sent
|
||||
:param timestamp: time the message was originally sent to the room, in ISO8601 format
|
||||
:type room: str or unicode
|
||||
:type barejid: str or unicode
|
||||
:type nick: str or unicode
|
||||
:type message: str or unicode
|
||||
:type timestamp: str or unicode
|
||||
@ -186,13 +190,13 @@ def prof_on_room_history_message(room, nick, message, timestamp):
|
||||
pass
|
||||
|
||||
|
||||
def prof_pre_priv_message_display(room, nick, message):
|
||||
def prof_pre_priv_message_display(barejid, nick, message):
|
||||
"""Called before a private chat room message is displayed
|
||||
|
||||
:param room: Jabber ID of the room
|
||||
:param barejid: Jabber ID of the room
|
||||
:param nick: nickname of message sender
|
||||
:param message: the received message
|
||||
:type room: str or unicode
|
||||
:type barejid: str or unicode
|
||||
:type nick: str or unicode
|
||||
:type message: str or unicode
|
||||
:return: the new message to display, or ``None`` to preserve the original message
|
||||
@ -201,26 +205,26 @@ def prof_pre_priv_message_display(room, nick, message):
|
||||
pass
|
||||
|
||||
|
||||
def prof_post_priv_message_display(room, nick, message):
|
||||
def prof_post_priv_message_display(barejid, nick, message):
|
||||
"""Called after a private chat room message is displayed
|
||||
|
||||
:param room: Jabber ID of the room
|
||||
:param barejid: Jabber ID of the room
|
||||
:param nick: nickname of the message sender
|
||||
:param message: the received message
|
||||
:type room: str or unicode
|
||||
:type barejid: str or unicode
|
||||
:type nick: str or unicode
|
||||
:type message: str or unicode
|
||||
"""
|
||||
pass
|
||||
|
||||
|
||||
def prof_pre_priv_message_send(room, nick, message):
|
||||
def prof_pre_priv_message_send(barejid, nick, message):
|
||||
"""Called before a private chat room message is sent
|
||||
|
||||
:param room: Jabber ID of the room
|
||||
:param barejid: Jabber ID of the room
|
||||
:param nick: nickname of message recipient
|
||||
:param message: the message to be sent
|
||||
:type room: str or unicode
|
||||
:type barejid: str or unicode
|
||||
:type nick: str or unicode
|
||||
:type message: str or unicode
|
||||
:return: the new message to send, or ``None`` to preserve the original message
|
||||
@ -229,13 +233,13 @@ def prof_pre_priv_message_send(room, nick, message):
|
||||
pass
|
||||
|
||||
|
||||
def prof_post_priv_message_send(room, nick, message):
|
||||
def prof_post_priv_message_send(barejid, nick, message):
|
||||
"""Called after a private chat room message has been sent
|
||||
|
||||
:param room: Jabber ID of the room
|
||||
:param barejid: Jabber ID of the room
|
||||
:param nick: nickname of the message recipient
|
||||
:param message: the sent message
|
||||
:type room: str or unicode
|
||||
:type barejid: str or unicode
|
||||
:type nick: str or unicode
|
||||
:type message: str or unicode
|
||||
"""
|
||||
@ -347,10 +351,10 @@ def prof_on_chat_win_focus(barejid):
|
||||
pass
|
||||
|
||||
|
||||
def prof_on_room_win_focus(room):
|
||||
def prof_on_room_win_focus(barejid):
|
||||
"""Called when a chat room window is focussed
|
||||
|
||||
:param room: Jabber ID of the room
|
||||
:type room: str or unicode
|
||||
:param barejid: Jabber ID of the room
|
||||
:type barejid: str or unicode
|
||||
"""
|
||||
pass
|
||||
|
@ -206,124 +206,124 @@ c_on_disconnect_hook(ProfPlugin *plugin, const char *const account_name, const c
|
||||
}
|
||||
|
||||
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;
|
||||
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);
|
||||
|
||||
if (NULL == (f = dlsym(plugin->module, "prof_pre_chat_message_display")))
|
||||
return NULL;
|
||||
|
||||
func = (char* (*)(const char *const, const char *))f;
|
||||
return func(jid, message);
|
||||
func = (char* (*)(const char *const, const char *const, const char *))f;
|
||||
return func(barejid, resource, message);
|
||||
}
|
||||
|
||||
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 (*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);
|
||||
|
||||
if (NULL == (f = dlsym(plugin->module, "prof_post_chat_message_display")))
|
||||
return;
|
||||
|
||||
func = (void (*)(const char *const, const char *))f;
|
||||
func(jid, message);
|
||||
func = (void (*)(const char *const, const char *const, const char *))f;
|
||||
func(barejid, resource, message);
|
||||
}
|
||||
|
||||
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;
|
||||
char* (*func)(const char *const __jid, const char *__message);
|
||||
char* (*func)(const char *const __barejid, const char *__message);
|
||||
assert(plugin && plugin->module);
|
||||
|
||||
if (NULL == (f = dlsym(plugin->module, "prof_pre_chat_message_send")))
|
||||
return NULL;
|
||||
|
||||
func = (char* (*)(const char *const, const char *))f;
|
||||
return func(jid, message);
|
||||
return func(barejid, message);
|
||||
}
|
||||
|
||||
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 (*func)(const char *const __jid, const char *__message);
|
||||
void (*func)(const char *const __barejid, const char *__message);
|
||||
assert(plugin && plugin->module);
|
||||
|
||||
if (NULL == (f = dlsym(plugin->module, "prof_post_chat_message_send")))
|
||||
return;
|
||||
|
||||
func = (void (*)(const char *const, const char *))f;
|
||||
func(jid, message);
|
||||
func(barejid, message);
|
||||
}
|
||||
|
||||
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;
|
||||
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);
|
||||
|
||||
if (NULL == (f = dlsym(plugin->module, "prof_pre_room_message_display")))
|
||||
return NULL;
|
||||
|
||||
func = (char* (*)(const char *const, const char *const, const char *))f;
|
||||
return func(room, nick, message);
|
||||
return func(barejid, nick, message);
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
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);
|
||||
|
||||
if (NULL == (f = dlsym(plugin->module, "prof_post_room_message_display")))
|
||||
return;
|
||||
|
||||
func = (void (*)(const char *const, const char *const, const char *))f;
|
||||
func(room, nick, message);
|
||||
func(barejid, nick, message);
|
||||
}
|
||||
|
||||
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;
|
||||
char* (*func)(const char *const __room, const char *__message);
|
||||
char* (*func)(const char *const __barejid, const char *__message);
|
||||
assert(plugin && plugin->module);
|
||||
|
||||
if (NULL == (f = dlsym(plugin->module, "prof_pre_room_message_send")))
|
||||
return NULL;
|
||||
|
||||
func = (char* (*)(const char *const, const char *))f;
|
||||
return func(room, message);
|
||||
return func(barejid, message);
|
||||
}
|
||||
|
||||
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 (*func)(const char *const __room, const char *__message);
|
||||
void (*func)(const char *const __barejid, const char *__message);
|
||||
assert(plugin && plugin->module);
|
||||
|
||||
if (NULL == (f = dlsym(plugin->module, "prof_post_room_message_send")))
|
||||
return;
|
||||
|
||||
func = (void (*)(const char *const, const char *))f;
|
||||
func(room, message);
|
||||
func(barejid, message);
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
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);
|
||||
assert(plugin && plugin->module);
|
||||
|
||||
@ -331,64 +331,64 @@ c_on_room_history_message_hook(ProfPlugin *plugin, const char *const room, const
|
||||
return;
|
||||
|
||||
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*
|
||||
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;
|
||||
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);
|
||||
|
||||
if (NULL == (f = dlsym(plugin->module, "prof_pre_priv_message_display")))
|
||||
return NULL;
|
||||
|
||||
func = (char* (*)(const char *const, const char *const, const char *))f;
|
||||
return func(room, nick, message);
|
||||
return func(barejid, nick, message);
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
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);
|
||||
|
||||
if (NULL == (f = dlsym(plugin->module, "prof_post_priv_message_display")))
|
||||
return;
|
||||
|
||||
func = (void (*)(const char *const, const char *const, const char *))f;
|
||||
func(room, nick, message);
|
||||
func(barejid, nick, message);
|
||||
}
|
||||
|
||||
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;
|
||||
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);
|
||||
|
||||
if (NULL == (f = dlsym(plugin->module, "prof_pre_priv_message_send")))
|
||||
return NULL;
|
||||
|
||||
func = (char* (*)(const char *const, const char *const, const char *))f;
|
||||
return func(room, nick, message);
|
||||
return func(barejid, nick, message);
|
||||
}
|
||||
|
||||
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 (*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);
|
||||
|
||||
if (NULL == (f = dlsym(plugin->module, "prof_post_priv_message_send")))
|
||||
return;
|
||||
|
||||
func = (void (*)(const char *const, const char *const, const char *))f;
|
||||
func(room, nick, message);
|
||||
func(barejid, nick, message);
|
||||
}
|
||||
|
||||
char*
|
||||
@ -521,17 +521,17 @@ 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)
|
||||
c_on_room_win_focus_hook(ProfPlugin *plugin, const char *const barejid)
|
||||
{
|
||||
void *f = NULL;
|
||||
void (*func)(const char *const __roomjid);
|
||||
void (*func)(const char *const __barejid);
|
||||
assert(plugin && plugin->module);
|
||||
|
||||
if (NULL == (f = dlsym(plugin->module, "prof_on_room_win_focus")))
|
||||
return;
|
||||
|
||||
func = (void (*)(const char *const))f;
|
||||
func(roomjid);
|
||||
func(barejid);
|
||||
}
|
||||
|
||||
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_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);
|
||||
void c_post_chat_message_display_hook(ProfPlugin *plugin, const char *const jid, const char *message);
|
||||
char* c_pre_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 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 barejid, const char *const resource, 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 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);
|
||||
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);
|
||||
char* c_pre_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 room, const char *message);
|
||||
void c_on_room_history_message_hook(ProfPlugin *plugin, const char *const room, const char *const nick,
|
||||
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 barejid, const char *message);
|
||||
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);
|
||||
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
|
||||
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);
|
||||
|
||||
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
|
||||
|
@ -393,7 +393,7 @@ plugins_on_disconnect(const char * const account_name, const char * const fullji
|
||||
}
|
||||
|
||||
char*
|
||||
plugins_pre_chat_message_display(const char * const jid, const char *message)
|
||||
plugins_pre_chat_message_display(const char * const barejid, const char *const resource, const char *message)
|
||||
{
|
||||
char *new_message = NULL;
|
||||
char *curr_message = strdup(message);
|
||||
@ -402,7 +402,7 @@ plugins_pre_chat_message_display(const char * const jid, const char *message)
|
||||
GList *curr = values;
|
||||
while (curr) {
|
||||
ProfPlugin *plugin = curr->data;
|
||||
new_message = plugin->pre_chat_message_display(plugin, jid, curr_message);
|
||||
new_message = plugin->pre_chat_message_display(plugin, barejid, resource, curr_message);
|
||||
if (new_message) {
|
||||
free(curr_message);
|
||||
curr_message = strdup(new_message);
|
||||
@ -416,20 +416,20 @@ plugins_pre_chat_message_display(const char * const jid, const char *message)
|
||||
}
|
||||
|
||||
void
|
||||
plugins_post_chat_message_display(const char * const jid, 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 *curr = values;
|
||||
while (curr) {
|
||||
ProfPlugin *plugin = curr->data;
|
||||
plugin->post_chat_message_display(plugin, jid, message);
|
||||
plugin->post_chat_message_display(plugin, barejid, resource, message);
|
||||
curr = g_list_next(curr);
|
||||
}
|
||||
g_list_free(values);
|
||||
}
|
||||
|
||||
char*
|
||||
plugins_pre_chat_message_send(const char * const jid, const char *message)
|
||||
plugins_pre_chat_message_send(const char * const barejid, const char *message)
|
||||
{
|
||||
char *new_message = NULL;
|
||||
char *curr_message = strdup(message);
|
||||
@ -438,7 +438,7 @@ plugins_pre_chat_message_send(const char * const jid, const char *message)
|
||||
GList *curr = values;
|
||||
while (curr) {
|
||||
ProfPlugin *plugin = curr->data;
|
||||
new_message = plugin->pre_chat_message_send(plugin, jid, curr_message);
|
||||
new_message = plugin->pre_chat_message_send(plugin, barejid, curr_message);
|
||||
if (new_message) {
|
||||
free(curr_message);
|
||||
curr_message = strdup(new_message);
|
||||
@ -452,20 +452,20 @@ plugins_pre_chat_message_send(const char * const jid, const char *message)
|
||||
}
|
||||
|
||||
void
|
||||
plugins_post_chat_message_send(const char * const jid, const char *message)
|
||||
plugins_post_chat_message_send(const char * const barejid, const char *message)
|
||||
{
|
||||
GList *values = g_hash_table_get_values(plugins);
|
||||
GList *curr = values;
|
||||
while (curr) {
|
||||
ProfPlugin *plugin = curr->data;
|
||||
plugin->post_chat_message_send(plugin, jid, message);
|
||||
plugin->post_chat_message_send(plugin, barejid, message);
|
||||
curr = g_list_next(curr);
|
||||
}
|
||||
g_list_free(values);
|
||||
}
|
||||
|
||||
char*
|
||||
plugins_pre_room_message_display(const char * const room, const char * const nick, const char *message)
|
||||
plugins_pre_room_message_display(const char * const barejid, const char * const nick, const char *message)
|
||||
{
|
||||
char *new_message = NULL;
|
||||
char *curr_message = strdup(message);
|
||||
@ -474,7 +474,7 @@ plugins_pre_room_message_display(const char * const room, const char * const nic
|
||||
GList *curr = values;
|
||||
while (curr) {
|
||||
ProfPlugin *plugin = curr->data;
|
||||
new_message = plugin->pre_room_message_display(plugin, room, nick, curr_message);
|
||||
new_message = plugin->pre_room_message_display(plugin, barejid, nick, curr_message);
|
||||
if (new_message) {
|
||||
free(curr_message);
|
||||
curr_message = strdup(new_message);
|
||||
@ -488,20 +488,20 @@ plugins_pre_room_message_display(const char * const room, const char * const nic
|
||||
}
|
||||
|
||||
void
|
||||
plugins_post_room_message_display(const char * const room, const char * const nick, const char *message)
|
||||
plugins_post_room_message_display(const char * const barejid, const char * const nick, const char *message)
|
||||
{
|
||||
GList *values = g_hash_table_get_values(plugins);
|
||||
GList *curr = values;
|
||||
while (curr) {
|
||||
ProfPlugin *plugin = curr->data;
|
||||
plugin->post_room_message_display(plugin, room, nick, message);
|
||||
plugin->post_room_message_display(plugin, barejid, nick, message);
|
||||
curr = g_list_next(curr);
|
||||
}
|
||||
g_list_free(values);
|
||||
}
|
||||
|
||||
char*
|
||||
plugins_pre_room_message_send(const char * const room, const char *message)
|
||||
plugins_pre_room_message_send(const char * const barejid, const char *message)
|
||||
{
|
||||
char *new_message = NULL;
|
||||
char *curr_message = strdup(message);
|
||||
@ -510,7 +510,7 @@ plugins_pre_room_message_send(const char * const room, const char *message)
|
||||
GList *curr = values;
|
||||
while (curr) {
|
||||
ProfPlugin *plugin = curr->data;
|
||||
new_message = plugin->pre_room_message_send(plugin, room, curr_message);
|
||||
new_message = plugin->pre_room_message_send(plugin, barejid, curr_message);
|
||||
if (new_message) {
|
||||
free(curr_message);
|
||||
curr_message = strdup(new_message);
|
||||
@ -524,20 +524,20 @@ plugins_pre_room_message_send(const char * const room, const char *message)
|
||||
}
|
||||
|
||||
void
|
||||
plugins_post_room_message_send(const char * const room, const char *message)
|
||||
plugins_post_room_message_send(const char * const barejid, const char *message)
|
||||
{
|
||||
GList *values = g_hash_table_get_values(plugins);
|
||||
GList *curr = values;
|
||||
while (curr) {
|
||||
ProfPlugin *plugin = curr->data;
|
||||
plugin->post_room_message_send(plugin, room, message);
|
||||
plugin->post_room_message_send(plugin, barejid, message);
|
||||
curr = g_list_next(curr);
|
||||
}
|
||||
g_list_free(values);
|
||||
}
|
||||
|
||||
void
|
||||
plugins_on_room_history_message(const char *const room, const char *const nick, const char *const message,
|
||||
plugins_on_room_history_message(const char *const barejid, const char *const nick, const char *const message,
|
||||
GDateTime *timestamp)
|
||||
{
|
||||
char *timestamp_str = NULL;
|
||||
@ -551,7 +551,7 @@ plugins_on_room_history_message(const char *const room, const char *const nick,
|
||||
GList *curr = values;
|
||||
while (curr) {
|
||||
ProfPlugin *plugin = curr->data;
|
||||
plugin->on_room_history_message(plugin, room, nick, message, timestamp_str);
|
||||
plugin->on_room_history_message(plugin, barejid, nick, message, timestamp_str);
|
||||
curr = g_list_next(curr);
|
||||
}
|
||||
g_list_free(values);
|
||||
@ -560,9 +560,9 @@ plugins_on_room_history_message(const char *const room, const char *const nick,
|
||||
}
|
||||
|
||||
char*
|
||||
plugins_pre_priv_message_display(const char * const jid, const char *message)
|
||||
plugins_pre_priv_message_display(const char * const fulljid, const char *message)
|
||||
{
|
||||
Jid *jidp = jid_create(jid);
|
||||
Jid *jidp = jid_create(fulljid);
|
||||
char *new_message = NULL;
|
||||
char *curr_message = strdup(message);
|
||||
|
||||
@ -585,9 +585,9 @@ plugins_pre_priv_message_display(const char * const jid, const char *message)
|
||||
}
|
||||
|
||||
void
|
||||
plugins_post_priv_message_display(const char * const jid, const char *message)
|
||||
plugins_post_priv_message_display(const char * const fulljid, const char *message)
|
||||
{
|
||||
Jid *jidp = jid_create(jid);
|
||||
Jid *jidp = jid_create(fulljid);
|
||||
|
||||
GList *values = g_hash_table_get_values(plugins);
|
||||
GList *curr = values;
|
||||
@ -602,9 +602,9 @@ plugins_post_priv_message_display(const char * const jid, const char *message)
|
||||
}
|
||||
|
||||
char*
|
||||
plugins_pre_priv_message_send(const char * const jid, const char * const message)
|
||||
plugins_pre_priv_message_send(const char * const fulljid, const char * const message)
|
||||
{
|
||||
Jid *jidp = jid_create(jid);
|
||||
Jid *jidp = jid_create(fulljid);
|
||||
char *new_message = NULL;
|
||||
char *curr_message = strdup(message);
|
||||
|
||||
@ -627,9 +627,9 @@ plugins_pre_priv_message_send(const char * const jid, const char * const message
|
||||
}
|
||||
|
||||
void
|
||||
plugins_post_priv_message_send(const char * const jid, const char * const message)
|
||||
plugins_post_priv_message_send(const char * const fulljid, const char * const message)
|
||||
{
|
||||
Jid *jidp = jid_create(jid);
|
||||
Jid *jidp = jid_create(fulljid);
|
||||
|
||||
GList *values = g_hash_table_get_values(plugins);
|
||||
GList *curr = values;
|
||||
@ -812,13 +812,13 @@ plugins_on_chat_win_focus(const char *const barejid)
|
||||
}
|
||||
|
||||
void
|
||||
plugins_on_room_win_focus(const char *const roomjid)
|
||||
plugins_on_room_win_focus(const char *const barejid)
|
||||
{
|
||||
GList *values = g_hash_table_get_values(plugins);
|
||||
GList *curr = values;
|
||||
while (curr) {
|
||||
ProfPlugin *plugin = curr->data;
|
||||
plugin->on_room_win_focus(plugin, roomjid);
|
||||
plugin->on_room_win_focus(plugin, barejid);
|
||||
curr = g_list_next(curr);
|
||||
}
|
||||
g_list_free(values);
|
||||
|
@ -59,27 +59,27 @@ typedef struct prof_plugin_t {
|
||||
void (*on_disconnect_func)(struct prof_plugin_t* plugin, const char *const account_name,
|
||||
const char *const fulljid);
|
||||
|
||||
char* (*pre_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 jid, const char *message);
|
||||
char* (*pre_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 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 barejid, const char *const resource, 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 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);
|
||||
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);
|
||||
char* (*pre_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 room, 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,
|
||||
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 barejid, const char *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);
|
||||
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
|
||||
char* (*on_message_stanza_send)(struct prof_plugin_t* plugin, const char *const text);
|
||||
@ -97,7 +97,7 @@ typedef struct prof_plugin_t {
|
||||
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_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;
|
||||
|
||||
void plugins_init(void);
|
||||
@ -119,22 +119,22 @@ void plugins_on_shutdown(void);
|
||||
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);
|
||||
|
||||
char* plugins_pre_chat_message_display(const char *const jid, const char *message);
|
||||
void plugins_post_chat_message_display(const char *const jid, const char *message);
|
||||
char* plugins_pre_chat_message_send(const char *const jid, const char *message);
|
||||
void plugins_post_chat_message_send(const char *const jid, 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 *const resource, 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);
|
||||
|
||||
char* plugins_pre_room_message_display(const char *const room, const char *const nick, const char *message);
|
||||
void plugins_post_room_message_display(const char *const room, const char *const nick, const char *message);
|
||||
char* plugins_pre_room_message_send(const char *const room, const char *message);
|
||||
void plugins_post_room_message_send(const char *const room, const char *message);
|
||||
void plugins_on_room_history_message(const char *const room, const char *const nick, const char *const message,
|
||||
char* plugins_pre_room_message_display(const char *const barejid, const char *const nick, const char *message);
|
||||
void plugins_post_room_message_display(const char *const barejid, const char *const nick, const char *message);
|
||||
char* plugins_pre_room_message_send(const char *const barejid, const char *message);
|
||||
void plugins_post_room_message_send(const char *const barejid, const char *message);
|
||||
void plugins_on_room_history_message(const char *const barejid, const char *const nick, const char *const message,
|
||||
GDateTime *timestamp);
|
||||
|
||||
char* plugins_pre_priv_message_display(const char *const jid, const char *message);
|
||||
void plugins_post_priv_message_display(const char *const jid, const char *message);
|
||||
char* plugins_pre_priv_message_send(const char *const jid, const char *const message);
|
||||
void plugins_post_priv_message_send(const char *const jid, const char *const message);
|
||||
char* plugins_pre_priv_message_display(const char *const fulljid, const char *message);
|
||||
void plugins_post_priv_message_display(const char *const fulljid, const char *message);
|
||||
char* plugins_pre_priv_message_send(const char *const fulljid, const char *const message);
|
||||
void plugins_post_priv_message_send(const char *const fulljid, const char *const message);
|
||||
|
||||
void plugins_win_process_line(char *win, const char *const line);
|
||||
void plugins_close_win(const char *const plugin_name, const char *const tag);
|
||||
@ -153,7 +153,7 @@ void plugins_on_contact_presence(const char *const barejid, const char *const re
|
||||
const char *const status, const int priority);
|
||||
|
||||
void plugins_on_chat_win_focus(const char *const barejid);
|
||||
void plugins_on_room_win_focus(const char *const roomjid);
|
||||
void plugins_on_room_win_focus(const char *const barejid);
|
||||
|
||||
gboolean plugins_run_command(const char * const cmd);
|
||||
void plugins_run_timed(void);
|
||||
|
@ -277,10 +277,11 @@ python_on_disconnect_hook(ProfPlugin *plugin, const char *const account_name, co
|
||||
}
|
||||
|
||||
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();
|
||||
PyObject *p_args = Py_BuildValue("ss", jid, message);
|
||||
PyObject *p_args = Py_BuildValue("sss", barejid, resource, message);
|
||||
PyObject *p_function;
|
||||
|
||||
PyObject *p_module = plugin->module;
|
||||
@ -304,10 +305,10 @@ python_pre_chat_message_display_hook(ProfPlugin *plugin, const char *const jid,
|
||||
}
|
||||
|
||||
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();
|
||||
PyObject *p_args = Py_BuildValue("ss", jid, message);
|
||||
PyObject *p_args = Py_BuildValue("sss", barejid, resource, message);
|
||||
PyObject *p_function;
|
||||
|
||||
PyObject *p_module = plugin->module;
|
||||
@ -325,10 +326,10 @@ python_post_chat_message_display_hook(ProfPlugin *plugin, const char *const jid,
|
||||
}
|
||||
|
||||
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();
|
||||
PyObject *p_args = Py_BuildValue("ss", jid, message);
|
||||
PyObject *p_args = Py_BuildValue("ss", barejid, message);
|
||||
PyObject *p_function;
|
||||
|
||||
PyObject *p_module = plugin->module;
|
||||
@ -352,10 +353,10 @@ python_pre_chat_message_send_hook(ProfPlugin *plugin, const char * const jid, co
|
||||
}
|
||||
|
||||
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();
|
||||
PyObject *p_args = Py_BuildValue("ss", jid, message);
|
||||
PyObject *p_args = Py_BuildValue("ss", barejid, message);
|
||||
PyObject *p_function;
|
||||
|
||||
PyObject *p_module = plugin->module;
|
||||
@ -373,10 +374,10 @@ python_post_chat_message_send_hook(ProfPlugin *plugin, const char *const jid, co
|
||||
}
|
||||
|
||||
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();
|
||||
PyObject *p_args = Py_BuildValue("sss", room, nick, message);
|
||||
PyObject *p_args = Py_BuildValue("sss", barejid, nick, message);
|
||||
PyObject *p_function;
|
||||
|
||||
PyObject *p_module = plugin->module;
|
||||
@ -400,11 +401,11 @@ python_pre_room_message_display_hook(ProfPlugin *plugin, const char * const room
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
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_module = plugin->module;
|
||||
@ -422,10 +423,10 @@ python_post_room_message_display_hook(ProfPlugin *plugin, const char *const room
|
||||
}
|
||||
|
||||
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();
|
||||
PyObject *p_args = Py_BuildValue("ss", room, message);
|
||||
PyObject *p_args = Py_BuildValue("ss", barejid, message);
|
||||
PyObject *p_function;
|
||||
|
||||
PyObject *p_module = plugin->module;
|
||||
@ -449,10 +450,10 @@ python_pre_room_message_send_hook(ProfPlugin *plugin, const char *const room, co
|
||||
}
|
||||
|
||||
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();
|
||||
PyObject *p_args = Py_BuildValue("ss", room, message);
|
||||
PyObject *p_args = Py_BuildValue("ss", barejid, message);
|
||||
PyObject *p_function;
|
||||
|
||||
PyObject *p_module = plugin->module;
|
||||
@ -470,11 +471,11 @@ python_post_room_message_send_hook(ProfPlugin *plugin, const char *const room, c
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
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_module = plugin->module;
|
||||
@ -492,11 +493,11 @@ python_on_room_history_message_hook(ProfPlugin *plugin, const char *const room,
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
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_module = plugin->module;
|
||||
@ -520,11 +521,11 @@ python_pre_priv_message_display_hook(ProfPlugin *plugin, const char *const room,
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
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_module = plugin->module;
|
||||
@ -542,11 +543,11 @@ python_post_priv_message_display_hook(ProfPlugin *plugin, const char *const room
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
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_module = plugin->module;
|
||||
@ -570,11 +571,11 @@ python_pre_priv_message_send_hook(ProfPlugin *plugin, const char *const room, co
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
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_module = plugin->module;
|
||||
@ -828,10 +829,10 @@ 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)
|
||||
python_on_room_win_focus_hook(ProfPlugin *plugin, const char *const barejid)
|
||||
{
|
||||
disable_python_threads();
|
||||
PyObject *p_args = Py_BuildValue("(s)", roomjid);
|
||||
PyObject *p_args = Py_BuildValue("(s)", barejid);
|
||||
PyObject *p_function;
|
||||
|
||||
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_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);
|
||||
void python_post_chat_message_display_hook(ProfPlugin *plugin, const char *const jid, const char *message);
|
||||
char* python_pre_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 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 barejid, const char *const resource, 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 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);
|
||||
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);
|
||||
char* python_pre_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 room, const char *message);
|
||||
void python_on_room_history_message_hook(ProfPlugin *plugin, const char *const room, const char *const nick,
|
||||
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 barejid, const char *message);
|
||||
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);
|
||||
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
|
||||
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);
|
||||
|
||||
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
|
||||
|
@ -235,7 +235,7 @@ chatwin_incoming_msg(ProfChatWin *chatwin, const char *const resource, const cha
|
||||
{
|
||||
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;
|
||||
int num = wins_get_num(window);
|
||||
@ -287,7 +287,7 @@ chatwin_incoming_msg(ProfChatWin *chatwin, const char *const resource, const cha
|
||||
|
||||
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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user