File: [local] / botnow / Help.pm (download)
Revision 1.1.1.1 (vendor branch), Sat May 15 15:12:32 2021 UTC (3 years, 1 month ago) by bountyht
Branch: ircnow, MAIN
CVS Tags: start, HEAD Changes since 1.1: +0 -0 lines
Second import
|
#!/usr/bin/perl
package Help;
use strict;
use warnings;
use OpenBSD::Pledge;
use OpenBSD::Unveil;
my %conf = %main::conf;
my $chans = $conf{chans};
my $teamchans = $conf{teamchans};
my @teamchans = split /[,\s]+/m, $teamchans;
my $staff = $conf{staff};
my $terms = $conf{terms};
my $time = "600";
main::cbind("pub", "-", "help", \&help);
main::cbind("msg", "-", "help", \&help);
main::cbind("pub", "-", "request", \&help);
sub init {
}
sub help {
my ($bot, $nick, $host, $hand, @args) = @_;
my ($chan, $text);
my $msg = <<"EOF";
$terms
To request a free bouncer, type !bnc <username> <email>. For example, !bnc john john\@example.com.
To request a free shell account, type !shell <username> <email>. For example, !shell john john\@example.com.
EOF
#To request a free email account, type !email <username> <email>. For example, !email john john\@example.com.
#To request a free VPN account, type !vpn <username> <email>. For example, !vpn john john\@example.com.
if (main::isstaff($bot, $nick)) {
$msg .= <<"EOF";
To delete a bouncer, type !bnc delete <username>
To verify a captcha, type !bnc captcha <username>
To recreate cloneuser, type !bnc cloneuser
To get a list of usernames that match IPs, type !regex ips <ips>
To get a list of IPs that match usernames, type !regex users <usernames>
To regex search znc.log and output to the terminal, type !regex <regex>
To delete a shell account, type !shell delete <username>
To verify a captcha, type !shell captcha <username>
EOF
#To get a list of usernames that match IPs, type !shell regex ips <ips>
#To get a list of IPs that match usernames, type !shell regex users <usernames>
#To regex search znc.log and output to the terminal, type !shell regex <regex>
}
if (@args == 2) {
($chan, $text) = ($args[0], $args[1]);
if ($chans =~ $chan) {
main::putserv($bot, "PRIVMSG $chan :$nick: Please see private message.");
}
} else {
$text = $args[0];
}
main::putserv($bot, "PRIVMSG $nick :$msg");
foreach my $chan (@teamchans) {
main::putservlocalnet($bot, "PRIVMSG $chan :Help *$nick* on ".$bot->{name});
}
}
1; # MUST BE LAST STATEMENT IN FILE