diff --git a/tests/python-test.py b/tests/python-test.py index 590fd76..91fdab5 100644 --- a/tests/python-test.py +++ b/tests/python-test.py @@ -457,6 +457,13 @@ def prof_post_room_message_send(room, message): _create_win() prof.win_show(plugin_win, "fired -> prof_post_room_message_send: " + room + ", " + message) +def prof_on_room_history_message(room, nick, message, timestamp): + _create_win() + if timestamp: + prof.win_show(plugin_win, "fired -> prof_on_room_history_message: " + room + ", " + nick + ", " + message + ", " + timestamp) + else: + prof.win_show(plugin_win, "fired -> prof_on_room_history_message: " + room + ", " + nick + ", " + message) + def prof_pre_priv_message_display(room, nick, message): _create_win() prof.win_show(plugin_win, "fired -> prof_pre_priv_message_display: " + room + ", " + nick + ", " + message) diff --git a/tests/test-c-plugin/test-c-plugin.c b/tests/test-c-plugin/test-c-plugin.c index f6a1526..a5a3252 100644 --- a/tests/test-c-plugin/test-c-plugin.c +++ b/tests/test-c-plugin/test-c-plugin.c @@ -704,6 +704,23 @@ prof_post_room_message_send(const char * const room, const char *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) +{ + create_win(); + + 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); + 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); + prof_win_show(plugin_win, buf); + } +} + char * prof_pre_priv_message_display(const char * const room, const char * const nick, const char *message) {