Oops - spotted a small error in that conditional: if ($stanza->isa("DJabberd::Message") && ref $stanza->{children}[0] && $stanza->{children}[0]{element} eq 'x' && ref $stanza->{children}[0]{children}[0] && $stanza->{children}[0]{children}[0]{element} eq 'invite') { Appears to be fine now. Probably. Heh. cLive ;-)