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:
Elijah Perrault committed 2011-02-03 20:15:43 -07:00
1 parent ae9a1eeed6
commit a3b4bdd812
3 files changed
+21 -1

No files matched your search

+2
View File
@@ -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.
+5 -1
View File
@@ -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";
+14
View File
@@ -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)/;
}
}
}
}
}
}
}