Added prof_on_disconnect hook to test plugins
This commit is contained in:
@@ -18,6 +18,11 @@ module RubyTest
|
|||||||
Prof::cons_show("RubyTest: on_connect, " + account_name + ", " + fulljid)
|
Prof::cons_show("RubyTest: on_connect, " + account_name + ", " + fulljid)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def self.prof_on_disconnect(account_name, fulljid)
|
||||||
|
Prof::cons_show("RubyTest: on_disconnect, " + account_name + ", " + fulljid)
|
||||||
|
Prof::log_info("RubyTest: on_disconnect, " + account_name + ", " + fulljid)
|
||||||
|
end
|
||||||
|
|
||||||
def self.prof_on_message_received(jid, message)
|
def self.prof_on_message_received(jid, message)
|
||||||
Prof::cons_show("RubyTest: on_message_received, " + jid + ", " + message)
|
Prof::cons_show("RubyTest: on_message_received, " + jid + ", " + message)
|
||||||
Prof::cons_alert
|
Prof::cons_alert
|
||||||
|
|||||||
@@ -15,6 +15,10 @@ def prof_on_start():
|
|||||||
def prof_on_connect(account_name, fulljid):
|
def prof_on_connect(account_name, fulljid):
|
||||||
prof.cons_show("python-test: on_connect, " + account_name + ", " + fulljid)
|
prof.cons_show("python-test: on_connect, " + account_name + ", " + fulljid)
|
||||||
|
|
||||||
|
def prof_on_disconnect(account_name, fulljid):
|
||||||
|
prof.cons_show("python-test: on_disconnect, " + account_name + ", " + fulljid)
|
||||||
|
prof.log_info("python-test: on_disconnect, " + account_name + ", " + fulljid)
|
||||||
|
|
||||||
def prof_on_message_received(jid, message):
|
def prof_on_message_received(jid, message):
|
||||||
prof.cons_show("python-test: on_message_received, " + jid + ", " + message)
|
prof.cons_show("python-test: on_message_received, " + jid + ", " + message)
|
||||||
prof.cons_alert()
|
prof.cons_alert()
|
||||||
|
|||||||
@@ -66,6 +66,16 @@ prof_on_connect(const char * const account_name, const char * const fulljid)
|
|||||||
prof_cons_show(buf);
|
prof_cons_show(buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
prof_on_disconnect(const char * const account_name, const char * const fulljid)
|
||||||
|
{
|
||||||
|
char *start = "c-test: on_disconnect, ";
|
||||||
|
char buf[strlen(start) + strlen(account_name) + 2 + strlen(fulljid) + 1];
|
||||||
|
sprintf(buf, "%s%s, %s", start, account_name, fulljid);
|
||||||
|
prof_cons_show(buf);
|
||||||
|
prof_log_info(buf);
|
||||||
|
}
|
||||||
|
|
||||||
char *
|
char *
|
||||||
prof_on_message_received(const char * const jid, const char *message)
|
prof_on_message_received(const char * const jid, const char *message)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user