Added chanstatus-based permissions. This works via user:chanstatus.
It doesn't work well yet because we're not updating status.
This commit is contained in:
1 parent
ae9a1eeed6
commit
a3b4bdd812
3 files changed
+21
-1
No files matched your search
@@ -3,6 +3,8 @@ Auto IRC Bot 3.0: Change Log
|
||||
|
||||
3.0 Indev
|
||||
==================================================================
|
||||
* Added chanstatus-based permissions. This works via
|
||||
user:chanstatus.
|
||||
* Catch __WARN__ and __DIE__, logging to file.
|
||||
* Added Spanish translations.
|
||||
* Added EightBall module.
|
||||
|
||||
@@ -61,6 +61,9 @@ if (defined $ARGV[0]) {
|
||||
elsif ($_ eq "--enable-sasl") {
|
||||
$features .= " sasl";
|
||||
}
|
||||
elsif ($_ eq "--enable-ssl") {
|
||||
$features .= " ssl";
|
||||
}
|
||||
else {
|
||||
println "Warning: Unknown option '".$_."'";
|
||||
}
|
||||
@@ -113,7 +116,8 @@ println "\0";
|
||||
println "--- CPAN Modules ---";
|
||||
modfind("Mouse");
|
||||
modfind("Class::Unload");
|
||||
modfind("MIME::Base64") if ($features =~ /sasl/);
|
||||
modfind("IO::Socket::SSL") if $features =~ /ssl/;
|
||||
modfind("MIME::Base64") if $features =~ /sasl/;
|
||||
|
||||
# Create build.
|
||||
println "\0";
|
||||
|
||||
@@ -372,6 +372,20 @@ sub match_user
|
||||
return $userkey;
|
||||
}
|
||||
}
|
||||
elsif ($uhk eq "chanstatus" and defined $ulhp{'net'}) {
|
||||
my ($ccst, $ccnm) = split(':', ($ulhp{$uhk})[0][0]);
|
||||
my $svr = $ulhp{net}[0];
|
||||
if (defined $Auto::SOCKET{$svr}) {
|
||||
foreach my $bcj (@{ $Parser::IRC::botchans{$svr} }) {
|
||||
if (API::IRC::match_mask($bcj, $ccnm)) {
|
||||
API::IRC::names($svr, $bcj);
|
||||
if (defined $Parser::IRC::chanusers{$svr}{$bcj}{$user{nick}}) {
|
||||
return $userkey if $Parser::IRC::chanusers{$svr}{$bcj}{$user{nick}} =~ m/($ccst)/;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user