From b03b8dda6a611e21b9e3d9c632c9a5fd68c36129 Mon Sep 17 00:00:00 2001 From: minima Date: Mon, 7 Mar 2005 23:27:13 +0000 Subject: [PATCH] make sure group is set up correctly --- perl/Thingy.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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}; -- 2.34.1