1 # Nexuiz rcon2irc plugin by Merlijn Hofstra licensed under GPL - showlogins.pl
2 # Place this file inside the same directory as rcon2irc.pl and add the full filename to the plugins.
8 ); $store{plugin_showlogins} = \%sl; }
15 if ($store{plugin_showlogins}->{failed_attempts}) {
18 my @hostmasks = grep !$temp{$_}++, @{ $store{plugin_showlogins}->{failed_attempts} };
20 foreach my $mask (@hostmasks) {
22 foreach (@{ $store{plugin_showlogins}->{failed_attempts} }) {
23 $count++ if ($_ eq $mask);
26 out irc => 0, "PRIVMSG $config{irc_channel} :\00305* login failed\017 \00304$mask\017 tried to become an IRC admin \00304$count\017 times";
29 $store{plugin_showlogins}->{failed_attempts} = undef;
31 schedule $timer => $store{plugin_showlogins}->{failed_interval};;
34 [ irc => q{:(([^! ]*)![^ ]*) (?i:PRIVMSG) [^&#%]\S* :(.*)} => sub {
35 my ($hostmask, $nick, $command) = @_;
36 my $sl = $store{plugin_showlogins};
38 if ($command eq "login $config{irc_admin_password}") {
39 out irc => 0, "PRIVMSG $config{irc_channel} :\00310* login\017 $nick is now logged in as an IRC admin" if ($sl->{show_success});
43 if ($command =~ m/^login/i && $sl->{show_failed}) {
44 push @{ $store{plugin_showlogins}->{failed_attempts} }, $hostmask;