- if ($dxchan && $dxchan->is_user) {
- $dxchan->talk($from, $to, $via, $text, $onode);
- return;
+ # check it...
+ if ($dxchan) {
+ if (ref $dxchan && $dxchan->isa('DXChannel')) {
+ if ($dxchan->is_user) {
+ $dxchan->talk($from, $to, $via, $text, $onode);
+ return;
+ }
+ } else {
+ dbg("ERROR: $to -> $dxchan is not a DXChannel! (local talk)");
+ }