projects
/
spider.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
5fc468a
)
make sure group is set up correctly
author
minima
<minima>
Mon, 7 Mar 2005 23:27:13 +0000
(23:27 +0000)
committer
minima
<minima>
Mon, 7 Mar 2005 23:27:13 +0000
(23:27 +0000)
perl/Thingy.pm
patch
|
blob
|
history
diff --git
a/perl/Thingy.pm
b/perl/Thingy.pm
index 0ab70dcf95359b0bb792b012eabeee19009492f0..efacdbb3219f0864a587098e841229abd404ee8a 100644
(file)
--- a/
perl/Thingy.pm
+++ b/
perl/Thingy.pm
@@
-43,11
+43,12
@@
use DXUtil;
sub new
{
my $class = shift;
sub new
{
my $class = shift;
+ my $pkg = ref $class || $class;
my $thing = {@_};
$thing->{origin} ||= $main::mycall;
my $thing = {@_};
$thing->{origin} ||= $main::mycall;
- bless $thing, $
class
;
+ bless $thing, $
pkg
;
return $thing;
}
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};
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};
} 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};
} elsif ($thing->{touser} && DXChannel::get($thing->{touser})) {
$out = $thing->new(user => $thing->{touser});
$out->{group} = $thing->{group};