Commit Diff


commit - edcb1b2b0cbd67fbcfcdf615e3ab137b1b702d8d
commit + a58e176adaaa59ec2b49c2dc146fd00592bb23a1
blob - e0916b6e10ddf428620b26e57b7fe9090a02812c
blob + be3c6aec6cf5715734ac15fd026dfe8fedc66a00
--- Help.pm
+++ Help.pm
@@ -24,24 +24,41 @@ 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.
-To request a free email account, type !mail <username> <email>. For example, !mail john john\@example.com.
-EOF
-#To request a free VPN account, type !vpn <username> <email>. For example, !vpn john john\@example.com.
-	if (main::isstaff($bot, $nick)) {
-		$msg .= <<"EOF";
+	my $mod_msgs= {
+		BNC => "To request a free bouncer, type !bnc <username> <email>. For example, !bnc john john\@example.com.",
+		Shell => "To request a free shell account, type !shell <username> <email>. For example, !shell john john\@example.com.)",
+		Mail => "To request a free email account, type !mail <username> <email>. For example, !mail john john\@example.com.)",
+		VPN => "To request a free VPN account, type !vpn <username> <email>. For example, !vpn john john\@example.com.)"
+	};
+	my $msg = $terms."\n";
+	for my $mod (split ' ',$conf{modules}) {
+		if (exists $mod_msgs->{$mod}) {
+			$msg.=$mod_msgs->{$mod}."\n";
+		}
+	}
+
+	my $mod_admin_msgs={
+			BNC =>  <<"EOF",
 To delete a bouncer, type !bnc delete <username>
 To verify a captcha, type !bnc captcha <username>
 To approve a bouncer, type !bnc approve <username>
 To recreate cloneuser, type !bnc cloneuser
+EOF
+			Shell => <<"EOF",
+To delete a shell account, type !shell delete <username>
+To verify a captcha, type !shell captcha <username>
+EOF
+	};
+	if (main::isstaff($bot, $nick)) {
+		for my $mod (split ' ',$conf{modules}) {
+			if (exists $mod_admin_msgs->{$mod}) {
+				$msg.=$mod_admin_msgs->{$mod};
+			}
+		}
+		$msg .=<<"EOF";
 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>