From 04f624729affb0276a0d3e81706595bcf79f4b25 Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Sun, 9 Feb 2020 20:55:30 -0800 Subject: [PATCH] Users: `my` command now properly finds user account in other channels --- PBot/Users.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/PBot/Users.pm b/PBot/Users.pm index 898eb5d4..5eb87cf1 100644 --- a/PBot/Users.pm +++ b/PBot/Users.pm @@ -566,7 +566,8 @@ sub mycmd { } my ($found_channel, $found_hostmask) = $self->find_user_account($channel, $hostmask); - $found_channel = $channel if not defined $found_channel; # let DualIndexHashObject disambiguate + ($found_channel, $found_hostmask) = $self->find_user_account('.*', $hostmask) if not defined $found_channel; + return "No user account found in $channel." if not defined $found_channel; $result .= $self->{users}->set($found_channel, $found_hostmask, $key, $value); $result =~ s/^password => .*;?$/password => ;/m; return $result;