1 use App::Clifton::Tower::Jabber
2 my $hearts = $_SERVER->current_config->bridges->get({ name => 'hearts' });
3 my $j = $_SERVER->_new_child('App::Clifton::Tower::Jabber', { server => $_SERVER, bridge_name => 'hearts', jabber_config => $hearts->jabber, irc_config => $hearts->irc });
4 $j->userconfig_set->add($_SERVER->current_config->users->get({ name => 'mst@corvina.org' });
5 my $xmpp = $j->xmpp_client;
6 $xmpp->compose(to => 'mst@corvina.org', body => 'hi')->send
7 $xmpp->configure(on_message => $j->_replace_weakself('handle_message'));