}
function connect() {
+
$connect_to = ($this->host) ? $this->host : $this->server;
$this->log(LOG_INFO, "Connecting to $connect_to on port $this->port");
if (!$this->conn) {
return false;
}
+
return !$this->conn->isDisconnected();
}
static $parts = array('message', 'presence',
'end_stream', 'session_start');
- while(!$this->conn->disconnected) {
+ while(!$this->conn->isDisconnected()) {
$payloads = $this->conn->processUntil($parts, 10);
return;
}
$notice->query('COMMIT');
- common_broadcast_notice($notice);
+ common_real_broadcast($notice);
$this->log(LOG_INFO,
'Added notice ' . $notice->id . ' from user ' . $user->nickname);
}
}
function confirmation_queue() {
- $this->clear_old_confirm_claims();
+ # $this->clear_old_confirm_claims();
$this->log(LOG_INFO, 'checking for queued confirmations');
do {
$confirm = $this->next_confirm();
$this->log(LOG_WARNING, 'Confirmation for unknown user ' . $confirm->user_id);
continue;
}
-
$success = jabber_confirm_address($confirm->code,
- $user->nickname,
- $jabber);
+ $user->nickname,
+ $confirm->address);
if (!$success) {
$this->log(LOG_ERROR, 'Confirmation failed for ' . $confirm->address);
# Just let the claim age out; hopefully things work then
function next_confirm() {
$confirm = new Confirm_address();
- $confirm->sent = NULL;
- $confirm->claimed = NULL;
+ $confirm->whereAdd('claimed IS NULL');
+ # XXX: eventually we could do other confirmations in the queue, too
+ $confirm->address_type = 'jabber';
$confirm->orderBy('modified DESC');
$confirm->limit(1);
if ($confirm->find(TRUE)) {