Fixed a bug with multi-prefix support.
This commit is contained in:
1 parent
66cc08fd87
commit
c5f8a31bd0
3 files changed
+11
-3
No files matched your search
@@ -20,6 +20,7 @@ In this alpha6 release, we have added:
|
|||||||
Bug fixes:
|
Bug fixes:
|
||||||
|
|
||||||
* Fixed a bug that occurs when our configured nickname is in use.
|
* Fixed a bug that occurs when our configured nickname is in use.
|
||||||
|
* Fixed a bug with multi-prefix support.
|
||||||
|
|
||||||
Incompatibilities:
|
Incompatibilities:
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ Auto IRC Bot 3.0: Change Log
|
|||||||
|
|
||||||
3.0 Indev
|
3.0 Indev
|
||||||
===============================================================================
|
===============================================================================
|
||||||
|
* Fixed a bug with multi-prefix support.
|
||||||
* Added fpfmt() to API::Std.
|
* Added fpfmt() to API::Std.
|
||||||
* Auto::GR renamed to $Auto::VERGITREV.
|
* Auto::GR renamed to $Auto::VERGITREV.
|
||||||
* Bumped minimum version for API to 3.0.0a6.
|
* Bumped minimum version for API to 3.0.0a6.
|
||||||
|
|||||||
+9
-3
@@ -158,21 +158,27 @@ sub num353 {
|
|||||||
# Iterate through each user.
|
# Iterate through each user.
|
||||||
for (my $i = 5; $i < scalar(@ex); $i++) {
|
for (my $i = 5; $i < scalar(@ex); $i++) {
|
||||||
my $fi = 0;
|
my $fi = 0;
|
||||||
foreach (keys %{ $csprefix{$svr} }) {
|
PFITER: foreach (keys %{ $csprefix{$svr} }) {
|
||||||
# Check if the user has status in the channel.
|
# Check if the user has status in the channel.
|
||||||
if (substr($ex[$i], 0, 1) eq $csprefix{$svr}{$_}) {
|
if (substr($ex[$i], 0, 1) eq $csprefix{$svr}{$_}) {
|
||||||
# He/she does. Lets set that.
|
# He/she does. Lets set that.
|
||||||
if (defined $chanusers{$svr}{$ex[4]}{lc(substr($ex[$i], 1))}) {
|
if (defined $chanusers{$svr}{$ex[4]}{lc $ex[$i]}) {
|
||||||
# If the user has multiple statuses.
|
# If the user has multiple statuses.
|
||||||
$chanusers{$svr}{$ex[4]}{lc(substr($ex[$i], 1))} .= $_;
|
$chanusers{$svr}{$ex[4]}{lc(substr($ex[$i], 1))} = $chanusers{$svr}{$ex[4]}{lc $ex[$i]}.$_;
|
||||||
|
delete $chanusers{$svr}{$ex[4]}{lc $ex[$i]};
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
# Or not.
|
# Or not.
|
||||||
$chanusers{$svr}{$ex[4]}{lc(substr($ex[$i], 1))} = $_;
|
$chanusers{$svr}{$ex[4]}{lc(substr($ex[$i], 1))} = $_;
|
||||||
}
|
}
|
||||||
$fi = 1;
|
$fi = 1;
|
||||||
|
$ex[$i] = substr $ex[$i], 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
# Check if there's still a prefix.
|
||||||
|
foreach (keys %{$csprefix{$svr}}) {
|
||||||
|
if (substr($ex[$i], 0, 1) eq $csprefix{$svr}{$_}) { goto 'PFITER' }
|
||||||
|
}
|
||||||
# They had status, so go to the next user.
|
# They had status, so go to the next user.
|
||||||
next if $fi;
|
next if $fi;
|
||||||
# They didn't, set them as a normal user.
|
# They didn't, set them as a normal user.
|
||||||
|
|||||||
Reference in new issue
Block a user