From: minima Date: Mon, 7 Mar 2005 23:27:13 +0000 (+0000) Subject: make sure group is set up correctly X-Git-Tag: R_1_52~120 X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=b03b8dda6a611e21b9e3d9c632c9a5fd68c36129;p=spider.git make sure group is set up correctly --- diff --git a/perl/Thingy.pm b/perl/Thingy.pm index 0ab70dcf..efacdbb3 100644 --- a/perl/Thingy.pm +++ b/perl/Thingy.pm @@ -43,11 +43,12 @@ use DXUtil; sub new { my $class = shift; + my $pkg = ref $class || $class; my $thing = {@_}; $thing->{origin} ||= $main::mycall; - bless $thing, $class; + bless $thing, $pkg; return $thing; } @@ -241,9 +242,11 @@ sub new_reply if ($thing->{group} eq $main::mycall) { $out = $thing->new; $out->{touser} = $thing->{user} if $thing->{user}; + $out->{group} = $thing->{origin}; } elsif (DXChannel::get($thing->{group})) { $out = $thing->new(user => $thing->{group}); $out->{touser} = $thing->{user} if $thing->{user}; + $out->{group} = $thing->{origin}; } elsif ($thing->{touser} && DXChannel::get($thing->{touser})) { $out = $thing->new(user => $thing->{touser}); $out->{group} = $thing->{group};