Add resource to chat message plugin hooks
This commit is contained in:
@@ -565,72 +565,72 @@ def prof_on_disconnect(account_name, fulljid):
|
||||
prof.win_show(plugin_win, "fired -> prof_on_disconnect: " + account_name + ", " + fulljid)
|
||||
|
||||
|
||||
def prof_pre_chat_message_display(jid, message):
|
||||
def prof_pre_chat_message_display(barejid, resource, message):
|
||||
prof.win_create(plugin_win, _handle_win_input)
|
||||
prof.win_show(plugin_win, "fired -> prof_pre_chat_message_display: " + jid + ", " + message)
|
||||
prof.win_show(plugin_win, "fired -> prof_pre_chat_message_display: " + barejid + "/" + resource + ", " + message)
|
||||
|
||||
|
||||
def prof_post_chat_message_display(jid, message):
|
||||
def prof_post_chat_message_display(barejid, resource, message):
|
||||
prof.win_create(plugin_win, _handle_win_input)
|
||||
prof.win_show(plugin_win, "fired -> prof_post_chat_message_display: " + jid + ", " + message)
|
||||
prof.win_show(plugin_win, "fired -> prof_post_chat_message_display: " + barejid + "/" + resource + ", " + message)
|
||||
|
||||
|
||||
def prof_pre_chat_message_send(jid, message):
|
||||
def prof_pre_chat_message_send(barejid, message):
|
||||
prof.win_create(plugin_win, _handle_win_input)
|
||||
prof.win_show(plugin_win, "fired -> prof_pre_chat_message_send: " + jid + ", " + message)
|
||||
prof.win_show(plugin_win, "fired -> prof_pre_chat_message_send: " + barejid + ", " + message)
|
||||
|
||||
|
||||
def prof_post_chat_message_send(jid, message):
|
||||
def prof_post_chat_message_send(barejid, message):
|
||||
prof.win_create(plugin_win, _handle_win_input)
|
||||
prof.win_show(plugin_win, "fired -> prof_post_chat_message_send: " + jid + ", " + message)
|
||||
prof.win_show(plugin_win, "fired -> prof_post_chat_message_send: " + barejid + ", " + message)
|
||||
|
||||
|
||||
def prof_pre_room_message_display(room, nick, message):
|
||||
def prof_pre_room_message_display(barejid, nick, message):
|
||||
prof.win_create(plugin_win, _handle_win_input)
|
||||
prof.win_show(plugin_win, "fired -> prof_pre_room_message_display: " + room + ", " + nick + ", " + message)
|
||||
prof.win_show(plugin_win, "fired -> prof_pre_room_message_display: " + barejid + ", " + nick + ", " + message)
|
||||
|
||||
|
||||
def prof_post_room_message_display(room, nick, message):
|
||||
def prof_post_room_message_display(barejid, nick, message):
|
||||
prof.win_create(plugin_win, _handle_win_input)
|
||||
prof.win_show(plugin_win, "fired -> prof_post_room_message_display: " + room + ", " + nick + ", " + message)
|
||||
prof.win_show(plugin_win, "fired -> prof_post_room_message_display: " + barejid + ", " + nick + ", " + message)
|
||||
|
||||
|
||||
def prof_pre_room_message_send(room, message):
|
||||
def prof_pre_room_message_send(barejid, message):
|
||||
prof.win_create(plugin_win, _handle_win_input)
|
||||
prof.win_show(plugin_win, "fired -> prof_pre_room_message_send: " + room + ", " + message)
|
||||
prof.win_show(plugin_win, "fired -> prof_pre_room_message_send: " + barejid + ", " + message)
|
||||
|
||||
|
||||
def prof_post_room_message_send(room, message):
|
||||
def prof_post_room_message_send(barejid, message):
|
||||
prof.win_create(plugin_win, _handle_win_input)
|
||||
prof.win_show(plugin_win, "fired -> prof_post_room_message_send: " + room + ", " + message)
|
||||
prof.win_show(plugin_win, "fired -> prof_post_room_message_send: " + barejid + ", " + message)
|
||||
|
||||
|
||||
def prof_on_room_history_message(room, nick, message, timestamp):
|
||||
def prof_on_room_history_message(barejid, nick, message, timestamp):
|
||||
prof.win_create(plugin_win, _handle_win_input)
|
||||
if timestamp:
|
||||
prof.win_show(plugin_win, "fired -> prof_on_room_history_message: " + room + ", " + nick + ", " + message + ", " + timestamp)
|
||||
prof.win_show(plugin_win, "fired -> prof_on_room_history_message: " + barejid + ", " + nick + ", " + message + ", " + timestamp)
|
||||
else:
|
||||
prof.win_show(plugin_win, "fired -> prof_on_room_history_message: " + room + ", " + nick + ", " + message)
|
||||
prof.win_show(plugin_win, "fired -> prof_on_room_history_message: " + barejid + ", " + nick + ", " + message)
|
||||
|
||||
|
||||
def prof_pre_priv_message_display(room, nick, message):
|
||||
def prof_pre_priv_message_display(barejid, nick, message):
|
||||
prof.win_create(plugin_win, _handle_win_input)
|
||||
prof.win_show(plugin_win, "fired -> prof_pre_priv_message_display: " + room + ", " + nick + ", " + message)
|
||||
prof.win_show(plugin_win, "fired -> prof_pre_priv_message_display: " + barejid + ", " + nick + ", " + message)
|
||||
|
||||
|
||||
def prof_post_priv_message_display(room, nick, message):
|
||||
def prof_post_priv_message_display(barejid, nick, message):
|
||||
prof.win_create(plugin_win, _handle_win_input)
|
||||
prof.win_show(plugin_win, "fired -> prof_post_priv_message_display: " + room + ", " + nick + ", " + message)
|
||||
prof.win_show(plugin_win, "fired -> prof_post_priv_message_display: " + barejid + ", " + nick + ", " + message)
|
||||
|
||||
|
||||
def prof_pre_priv_message_send(room, nick, message):
|
||||
def prof_pre_priv_message_send(barejid, nick, message):
|
||||
prof.win_create(plugin_win, _handle_win_input)
|
||||
prof.win_show(plugin_win, "fired -> prof_pre_priv_message_send: " + room + ", " + nick + ", " + message)
|
||||
prof.win_show(plugin_win, "fired -> prof_pre_priv_message_send: " + barejid + ", " + nick + ", " + message)
|
||||
|
||||
|
||||
def prof_post_priv_message_send(room, nick, message):
|
||||
def prof_post_priv_message_send(barejid, nick, message):
|
||||
prof.win_create(plugin_win, _handle_win_input)
|
||||
prof.win_show(plugin_win, "fired -> prof_post_priv_message_send: " + room + ", " + nick + ", " + message)
|
||||
prof.win_show(plugin_win, "fired -> prof_post_priv_message_send: " + barejid + ", " + nick + ", " + message)
|
||||
|
||||
|
||||
def prof_on_message_stanza_send(stanza):
|
||||
@@ -687,6 +687,6 @@ def prof_on_chat_win_focus(barejid):
|
||||
prof.win_show(plugin_win, "fired -> prof_on_chat_win_focus: " + barejid)
|
||||
|
||||
|
||||
def prof_on_room_win_focus(roomjid):
|
||||
def prof_on_room_win_focus(barejid):
|
||||
prof.win_create(plugin_win, _handle_win_input)
|
||||
prof.win_show(plugin_win, "fired -> prof_on_room_win_focus: " + roomjid)
|
||||
prof.win_show(plugin_win, "fired -> prof_on_room_win_focus: " + barejid)
|
||||
|
||||
@@ -744,163 +744,163 @@ prof_on_disconnect(const char * const account_name, const char * const fulljid)
|
||||
}
|
||||
|
||||
char*
|
||||
prof_pre_chat_message_display(const char * const jid, const char *message)
|
||||
prof_pre_chat_message_display(const char * const barejid, const char *const resource, const char *message)
|
||||
{
|
||||
prof_win_create(plugin_win, handle_win_input);
|
||||
|
||||
char *str = "fired -> prof_pre_chat_message_display: ";
|
||||
char buf[strlen(str) + strlen(jid) + 2 + strlen(message) + 1];
|
||||
sprintf(buf, "%s%s, %s", str, jid, message);
|
||||
char buf[strlen(str) + strlen(barejid) + 1 + strlen(resource) + 2 + strlen(message) + 1];
|
||||
sprintf(buf, "%s%s/%s, %s", str, barejid, resource, message);
|
||||
prof_win_show(plugin_win, buf);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void
|
||||
prof_post_chat_message_display(const char * const jid, const char *message)
|
||||
prof_post_chat_message_display(const char * const barejid, const char *const resource, const char *message)
|
||||
{
|
||||
prof_win_create(plugin_win, handle_win_input);
|
||||
|
||||
char *str = "fired -> prof_post_chat_message_display: ";
|
||||
char buf[strlen(str) + strlen(jid) + 2 + strlen(message) + 1];
|
||||
sprintf(buf, "%s%s, %s", str, jid, message);
|
||||
char buf[strlen(str) + strlen(barejid) + 1 + strlen(resource) + 2 + strlen(message) + 1];
|
||||
sprintf(buf, "%s%s/%s, %s", str, barejid, resource, message);
|
||||
prof_win_show(plugin_win, buf);
|
||||
}
|
||||
|
||||
char*
|
||||
prof_pre_chat_message_send(const char * const jid, const char *message)
|
||||
prof_pre_chat_message_send(const char * const barejid, const char *message)
|
||||
{
|
||||
prof_win_create(plugin_win, handle_win_input);
|
||||
|
||||
char *str = "fired -> prof_pre_chat_message_send: ";
|
||||
char buf[strlen(str) + strlen(jid) + 2 + strlen(message) + 1];
|
||||
sprintf(buf, "%s%s, %s", str, jid, message);
|
||||
char buf[strlen(str) + strlen(barejid) + 2 + strlen(message) + 1];
|
||||
sprintf(buf, "%s%s, %s", str, barejid, message);
|
||||
prof_win_show(plugin_win, buf);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void
|
||||
prof_post_chat_message_send(const char * const jid, const char *message)
|
||||
prof_post_chat_message_send(const char * const barejid, const char *message)
|
||||
{
|
||||
prof_win_create(plugin_win, handle_win_input);
|
||||
|
||||
char *str = "fired -> prof_post_chat_message_send: ";
|
||||
char buf[strlen(str) + strlen(jid) + 2 + strlen(message) + 1];
|
||||
sprintf(buf, "%s%s, %s", str, jid, message);
|
||||
char buf[strlen(str) + strlen(barejid) + 2 + strlen(message) + 1];
|
||||
sprintf(buf, "%s%s, %s", str, barejid, message);
|
||||
prof_win_show(plugin_win, buf);
|
||||
}
|
||||
|
||||
char*
|
||||
prof_pre_room_message_display(const char * const room, const char * const nick, const char *message)
|
||||
prof_pre_room_message_display(const char * const barejid, const char * const nick, const char *message)
|
||||
{
|
||||
prof_win_create(plugin_win, handle_win_input);
|
||||
|
||||
char *str = "fired -> prof_pre_room_message_display: ";
|
||||
char buf[strlen(str) + strlen(room) + 2 + strlen(nick) + 2 + strlen(message) + 1];
|
||||
sprintf(buf, "%s%s, %s, %s", str, room, nick, message);
|
||||
char buf[strlen(str) + strlen(barejid) + 2 + strlen(nick) + 2 + strlen(message) + 1];
|
||||
sprintf(buf, "%s%s, %s, %s", str, barejid, nick, message);
|
||||
prof_win_show(plugin_win, buf);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void
|
||||
prof_post_room_message_display(const char * const room, const char * const nick, const char *message)
|
||||
prof_post_room_message_display(const char * const barejid, const char * const nick, const char *message)
|
||||
{
|
||||
prof_win_create(plugin_win, handle_win_input);
|
||||
|
||||
char *str = "fired -> prof_post_room_message_display: ";
|
||||
char buf[strlen(str) + strlen(room) + 2 + strlen(nick) + 2 + strlen(message) + 1];
|
||||
sprintf(buf, "%s%s, %s, %s", str, room, nick, message);
|
||||
char buf[strlen(str) + strlen(barejid) + 2 + strlen(nick) + 2 + strlen(message) + 1];
|
||||
sprintf(buf, "%s%s, %s, %s", str, barejid, nick, message);
|
||||
prof_win_show(plugin_win, buf);
|
||||
}
|
||||
|
||||
char *
|
||||
prof_pre_room_message_send(const char * const room, const char *message)
|
||||
prof_pre_room_message_send(const char * const barejid, const char *message)
|
||||
{
|
||||
prof_win_create(plugin_win, handle_win_input);
|
||||
|
||||
char *str = "fired -> prof_pre_room_message_send: ";
|
||||
char buf[strlen(str) + strlen(room) + 2 + strlen(message) + 1];
|
||||
sprintf(buf, "%s%s, %s", str, room, message);
|
||||
char buf[strlen(str) + strlen(barejid) + 2 + strlen(message) + 1];
|
||||
sprintf(buf, "%s%s, %s", str, barejid, message);
|
||||
prof_win_show(plugin_win, buf);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void
|
||||
prof_post_room_message_send(const char * const room, const char *message)
|
||||
prof_post_room_message_send(const char * const barejid, const char *message)
|
||||
{
|
||||
prof_win_create(plugin_win, handle_win_input);
|
||||
|
||||
char *str = "fired -> prof_post_room_message_send: ";
|
||||
char buf[strlen(str) + strlen(room) + 2 + strlen(message) + 1];
|
||||
sprintf(buf, "%s%s, %s", str, room, message);
|
||||
char buf[strlen(str) + strlen(barejid) + 2 + strlen(message) + 1];
|
||||
sprintf(buf, "%s%s, %s", str, barejid, message);
|
||||
prof_win_show(plugin_win, buf);
|
||||
}
|
||||
|
||||
void
|
||||
prof_on_room_history_message(const char * const room, const char *const nick, const char *const message, const char *const timestamp)
|
||||
prof_on_room_history_message(const char * const barejid, const char *const nick, const char *const message, const char *const timestamp)
|
||||
{
|
||||
prof_win_create(plugin_win, handle_win_input);
|
||||
|
||||
char *str = "fired -> prof_on_room_history_message: ";
|
||||
if (timestamp == NULL) {
|
||||
char buf[strlen(str) + strlen(room) + 2 + strlen(nick) + 2 + strlen(message) + 1];
|
||||
sprintf(buf, "%s%s, %s, %s", str, room, nick, message);
|
||||
char buf[strlen(str) + strlen(barejid) + 2 + strlen(nick) + 2 + strlen(message) + 1];
|
||||
sprintf(buf, "%s%s, %s, %s", str, barejid, nick, message);
|
||||
prof_win_show(plugin_win, buf);
|
||||
} else {
|
||||
char buf[strlen(str) + strlen(room) + 2 + strlen(nick) + 2 + strlen(message) + 2 + strlen(timestamp) + 1];
|
||||
sprintf(buf, "%s%s, %s, %s, %s", str, room, nick, message, timestamp);
|
||||
char buf[strlen(str) + strlen(barejid) + 2 + strlen(nick) + 2 + strlen(message) + 2 + strlen(timestamp) + 1];
|
||||
sprintf(buf, "%s%s, %s, %s, %s", str, barejid, nick, message, timestamp);
|
||||
prof_win_show(plugin_win, buf);
|
||||
}
|
||||
}
|
||||
|
||||
char *
|
||||
prof_pre_priv_message_display(const char * const room, const char * const nick, const char *message)
|
||||
prof_pre_priv_message_display(const char * const barejid, const char * const nick, const char *message)
|
||||
{
|
||||
prof_win_create(plugin_win, handle_win_input);
|
||||
|
||||
char *str = "fired -> prof_pre_priv_message_display: ";
|
||||
char buf[strlen(str) + strlen(room) + 2 + strlen(nick) + 2 + strlen(message) + 1];
|
||||
sprintf(buf, "%s%s, %s, %s", str, room, nick, message);
|
||||
char buf[strlen(str) + strlen(barejid) + 2 + strlen(nick) + 2 + strlen(message) + 1];
|
||||
sprintf(buf, "%s%s, %s, %s", str, barejid, nick, message);
|
||||
prof_win_show(plugin_win, buf);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void
|
||||
prof_post_priv_message_display(const char * const room, const char * const nick, const char *message)
|
||||
prof_post_priv_message_display(const char * const barejid, const char * const nick, const char *message)
|
||||
{
|
||||
prof_win_create(plugin_win, handle_win_input);
|
||||
|
||||
char *str = "fired -> prof_post_priv_message_display: ";
|
||||
char buf[strlen(str) + strlen(room) + 2 + strlen(nick) + 2 + strlen(message) + 1];
|
||||
sprintf(buf, "%s%s, %s, %s", str, room, nick, message);
|
||||
char buf[strlen(str) + strlen(barejid) + 2 + strlen(nick) + 2 + strlen(message) + 1];
|
||||
sprintf(buf, "%s%s, %s, %s", str, barejid, nick, message);
|
||||
prof_win_show(plugin_win, buf);
|
||||
}
|
||||
|
||||
char *
|
||||
prof_pre_priv_message_send(const char * const room, const char * const nick, const char *message)
|
||||
prof_pre_priv_message_send(const char * const barejid, const char * const nick, const char *message)
|
||||
{
|
||||
prof_win_create(plugin_win, handle_win_input);
|
||||
|
||||
char *str = "fired -> prof_pre_priv_message_send: ";
|
||||
char buf[strlen(str) + strlen(room) + 2 + strlen(nick) + 2 + strlen(message) + 1];
|
||||
sprintf(buf, "%s%s, %s, %s", str, room, nick, message);
|
||||
char buf[strlen(str) + strlen(barejid) + 2 + strlen(nick) + 2 + strlen(message) + 1];
|
||||
sprintf(buf, "%s%s, %s, %s", str, barejid, nick, message);
|
||||
prof_win_show(plugin_win, buf);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void
|
||||
prof_post_priv_message_send(const char * const room, const char * const nick, const char *message)
|
||||
prof_post_priv_message_send(const char * const barejid, const char * const nick, const char *message)
|
||||
{
|
||||
prof_win_create(plugin_win, handle_win_input);
|
||||
|
||||
char *str = "fired -> prof_post_priv_message_send: ";
|
||||
char buf[strlen(str) + strlen(room) + 2 + strlen(nick) + 2 + strlen(message) + 1];
|
||||
sprintf(buf, "%s%s, %s, %s", str, room, nick, message);
|
||||
char buf[strlen(str) + strlen(barejid) + 2 + strlen(nick) + 2 + strlen(message) + 1];
|
||||
sprintf(buf, "%s%s, %s, %s", str, barejid, nick, message);
|
||||
prof_win_show(plugin_win, buf);
|
||||
}
|
||||
|
||||
@@ -1027,11 +1027,11 @@ prof_on_chat_win_focus(const char *const barejid)
|
||||
}
|
||||
|
||||
void
|
||||
prof_on_room_win_focus(const char *const roomjid)
|
||||
prof_on_room_win_focus(const char *const barejid)
|
||||
{
|
||||
prof_win_create(plugin_win, handle_win_input);
|
||||
char *str = "fired -> prof_on_room_win_focus: ";
|
||||
char buf[strlen(str) + strlen(roomjid) + 1];
|
||||
sprintf(buf, "%s%s", str, roomjid);
|
||||
char buf[strlen(str) + strlen(barejid) + 1];
|
||||
sprintf(buf, "%s%s", str, barejid);
|
||||
prof_win_show(plugin_win, buf);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user