[BACK]Return to Help.pm CVS log [TXT][DIR] Up to [local] / botnow

Annotation of botnow/Help.pm, Revision 1.1

1.1     ! bountyht    1: #!/usr/bin/perl
        !             2:
        !             3: package Help;
        !             4:
        !             5: use strict;
        !             6: use warnings;
        !             7: use OpenBSD::Pledge;
        !             8: use OpenBSD::Unveil;
        !             9:
        !            10: my %conf = %main::conf;
        !            11: my $chans = $conf{chans};
        !            12: my $teamchans = $conf{teamchans};
        !            13: my @teamchans = split /[,\s]+/m, $teamchans;
        !            14: my $staff = $conf{staff};
        !            15: my $terms = $conf{terms};
        !            16: my $time = "600";
        !            17: main::cbind("pub", "-", "help", \&help);
        !            18: main::cbind("msg", "-", "help", \&help);
        !            19: main::cbind("pub", "-", "request", \&help);
        !            20:
        !            21: sub init {
        !            22: }
        !            23:
        !            24: sub help {
        !            25:        my ($bot, $nick, $host, $hand, @args) = @_;
        !            26:        my ($chan, $text);
        !            27:        my $msg = <<"EOF";
        !            28: $terms
        !            29: To request a free bouncer, type !bnc <username> <email>. For example, !bnc john john\@example.com.
        !            30: To request a free shell account, type !shell <username> <email>. For example, !shell john john\@example.com.
        !            31: EOF
        !            32: #To request a free email account, type !email <username> <email>. For example, !email john john\@example.com.
        !            33: #To request a free VPN account, type !vpn <username> <email>. For example, !vpn john john\@example.com.
        !            34:        if (main::isstaff($bot, $nick)) {
        !            35:                $msg .= <<"EOF";
        !            36: To delete a bouncer, type !bnc delete <username>
        !            37: To verify a captcha, type !bnc captcha <username>
        !            38: To recreate cloneuser, type !bnc cloneuser
        !            39: To get a list of usernames that match IPs, type !regex ips <ips>
        !            40: To get a list of IPs that match usernames, type !regex users <usernames>
        !            41: To regex search znc.log and output to the terminal, type !regex <regex>
        !            42: To delete a shell account, type !shell delete <username>
        !            43: To verify a captcha, type !shell captcha <username>
        !            44: EOF
        !            45: #To get a list of usernames that match IPs, type !shell regex ips <ips>
        !            46: #To get a list of IPs that match usernames, type !shell regex users <usernames>
        !            47: #To regex search znc.log and output to the terminal, type !shell regex <regex>
        !            48:        }
        !            49:        if (@args == 2) {
        !            50:                ($chan, $text) = ($args[0], $args[1]);
        !            51:                if ($chans =~ $chan) {
        !            52:                        main::putserv($bot, "PRIVMSG $chan :$nick: Please see private message.");
        !            53:                }
        !            54:        } else {
        !            55:                $text = $args[0];
        !            56:        }
        !            57:        main::putserv($bot, "PRIVMSG $nick :$msg");
        !            58:        foreach my $chan (@teamchans) {
        !            59:                main::putservlocalnet($bot, "PRIVMSG $chan :Help *$nick* on ".$bot->{name});
        !            60:        }
        !            61: }
        !            62:
        !            63: 1; # MUST BE LAST STATEMENT IN FILE

CVSweb