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