Browse Source

Moderation - Added Auto Banning command to moderation module.

master
Teknikode 6 years ago
parent
commit
7a5cbb75cd
  1. 1
      .gitignore
  2. 6
      Combot/CreateTable.sql
  3. 2
      Combot/Logger.cs
  4. 17
      Modules/Moderation/CreateTable.sql
  5. 232
      Modules/Moderation/Moderation.cs
  6. 8
      Modules/Moderation/Moderation.csproj
  7. 377
      Modules/Moderation/Module.Default.json

1
.gitignore vendored

@ -217,3 +217,4 @@ Packages.dgml @@ -217,3 +217,4 @@ Packages.dgml
Release/
Combot.zip
.vs/config/applicationhost.config
/Combot 3.1.2.0.zip

6
Combot/CreateTable.sql

@ -19,7 +19,8 @@ CREATE TABLE IF NOT EXISTS `channels` ( @@ -19,7 +19,8 @@ CREATE TABLE IF NOT EXISTS `channels` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`server_id` int(11) NOT NULL,
`name` varchar(50) NOT NULL,
PRIMARY KEY (`id`)
PRIMARY KEY (`id`),
UNIQUE KEY `server_channel` (`server_id`, `name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=0 ;
--
@ -30,7 +31,8 @@ CREATE TABLE IF NOT EXISTS `nicks` ( @@ -30,7 +31,8 @@ CREATE TABLE IF NOT EXISTS `nicks` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`server_id` int(11) NOT NULL,
`nickname` varchar(50) NOT NULL,
PRIMARY KEY (`id`)
PRIMARY KEY (`id`),
UNIQUE KEY `server_channel` (`server_id`, `nickname`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=0 ;
--

2
Combot/Logger.cs

@ -34,7 +34,7 @@ namespace Combot @@ -34,7 +34,7 @@ namespace Combot
private static void TrimLogFile(string logDir, string fileName, int maxSize)
{
string logFile = Path.Combine(logDir, fileName);
string logFile = Path.Combine(logDir, fileName + Constants.LOGFILEEXT);
FileInfo file = new FileInfo(logFile);
long fileSize = file.Length;
if (fileSize > maxSize)

17
Modules/Moderation/CreateTable.sql

@ -0,0 +1,17 @@ @@ -0,0 +1,17 @@
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
--
-- Table structure for table `messages`
--
CREATE TABLE IF NOT EXISTS `autobans` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`server_id` int(11) NOT NULL,
`channel_id` int(11) NOT NULL,
`nick_id` int(11) NOT NULL,
`request_nick_id` int(11) NOT NULL,
`reason` text NOT NULL,
`date_added` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=0 ;

232
Modules/Moderation/Moderation.cs

@ -4,6 +4,8 @@ using System.Linq; @@ -4,6 +4,8 @@ using System.Linq;
using System.Threading;
using Combot.IRCServices;
using Timer = System.Timers.Timer;
using System.IO;
using Combot.IRCServices.Messaging;
namespace Combot.Modules.Plugins
{
@ -14,9 +16,19 @@ namespace Combot.Modules.Plugins @@ -14,9 +16,19 @@ namespace Combot.Modules.Plugins
public override void Initialize()
{
string sqlPath = Path.Combine(Directory.GetCurrentDirectory(), ConfigPath, "CreateTable.sql");
if (File.Exists(sqlPath))
{
string query = File.ReadAllText(sqlPath);
Bot.Database.Execute(query);
}
unbanTimers = new List<Timer>();
listLock = new ReaderWriterLockSlim();
Bot.CommandReceivedEvent += HandleCommandEvent;
Bot.IRC.Message.JoinChannelEvent += HandleJoinEvent;
Bot.IRC.Message.ChannelMessageReceivedEvent += HandleChannelMessageEvent;
Bot.IRC.Message.ChannelNoticeReceivedEvent += HandleChannelNoticeEvent;
}
public override void ParseCommand(CommandMessage command)
@ -69,6 +81,7 @@ namespace Combot.Modules.Plugins @@ -69,6 +81,7 @@ namespace Combot.Modules.Plugins
case "AVoice":
ModifyAutoUserPrivilege("VOP", command, ChannelMode.v);
break;
// Channel Moderation
case "Mode":
ModifyChannelModes(foundCommand, command);
break;
@ -78,6 +91,9 @@ namespace Combot.Modules.Plugins @@ -78,6 +91,9 @@ namespace Combot.Modules.Plugins
case "Invite":
InviteNick(foundCommand, command);
break;
case "Auto Ban":
AutoBan(foundCommand, command);
break;
case "Ban":
BanNick(true, foundCommand, command);
break;
@ -121,6 +137,42 @@ namespace Combot.Modules.Plugins @@ -121,6 +137,42 @@ namespace Combot.Modules.Plugins
}
}
private void HandleJoinEvent(object sender, JoinChannelInfo info)
{
if (Enabled
&& !Bot.ServerConfig.ChannelBlacklist.Contains(info.Channel)
&& !Bot.ServerConfig.NickBlacklist.Contains(info.Nick.Nickname)
&& !ChannelBlacklist.Contains(info.Channel)
&& !NickBlacklist.Contains(info.Nick.Nickname))
{
ProcessAutoBan(info.Channel, info.Nick.Nickname);
}
}
private void HandleChannelMessageEvent(object sender, ChannelMessage info)
{
if (Enabled
&& !Bot.ServerConfig.ChannelBlacklist.Contains(info.Channel)
&& !Bot.ServerConfig.NickBlacklist.Contains(info.Sender.Nickname)
&& !ChannelBlacklist.Contains(info.Channel)
&& !NickBlacklist.Contains(info.Sender.Nickname))
{
ProcessAutoBan(info.Channel, info.Sender.Nickname);
}
}
private void HandleChannelNoticeEvent(object sender, ChannelNotice info)
{
if (Enabled
&& !Bot.ServerConfig.ChannelBlacklist.Contains(info.Channel)
&& !Bot.ServerConfig.NickBlacklist.Contains(info.Sender.Nickname)
&& !ChannelBlacklist.Contains(info.Channel)
&& !NickBlacklist.Contains(info.Sender.Nickname))
{
ProcessAutoBan(info.Channel, info.Sender.Nickname);
}
}
private void ModifyUserPrivilege(bool set, CommandMessage command, ChannelMode mode)
{
string channel = command.Arguments.ContainsKey("Channel") ? command.Arguments["Channel"] : command.Location;
@ -258,6 +310,55 @@ namespace Combot.Modules.Plugins @@ -258,6 +310,55 @@ namespace Combot.Modules.Plugins
}
}
private void AutoBan(Command curCommand, CommandMessage command)
{
int timeToBan = 1;
int.TryParse(GetOptionValue("Seconds To Ban").ToString(), out timeToBan);
string channel = command.Arguments.ContainsKey("Channel") ? command.Arguments["Channel"] : command.Location;
bool hasNick = command.Arguments.ContainsKey("Nickname");
string nickname = hasNick ? command.Arguments["Nickname"] : string.Empty;
string method = command.Arguments["Method"];
if (Bot.CheckChannelAccess(channel, command.Nick.Nickname, curCommand.AllowedAccess) && (!hasNick || Bot.CheckNickAccess(channel, command.Nick.Nickname, nickname)))
{
command.Arguments.Add("Time", timeToBan.ToString());
switch (method.ToLower())
{
case "add":
// Set the auto ban
AddAutoBan(command);
// Process the auto ban now that we added it
if (command.Arguments.ContainsKey("Reason"))
{
command.Arguments["Reason"] = string.Format("[Auto Ban] {0}", command.Arguments["Reason"].ToString());
}
else
{
command.Arguments.Add("Reason", "[Auto Ban] No Reason Specified");
}
TimedBan(curCommand, command);
KickNick(curCommand, command);
break;
case "delete":
case "del":
// Remove the auto-ban
DeleteAutoBan(command);
// Force an unban in case they are still banned
BanNick(false, curCommand, command);
break;
case "view":
ViewAutoBan(command);
break;
}
}
else
{
string noAccessMessage = string.Format("You do not have access to {0} an auto ban for \u0002{1}\u000F on \u0002{2}\u000F.", method, command.Arguments["Nickname"], channel);
SendResponse(command.MessageType, command.Location, command.Nick.Nickname, noAccessMessage, true);
}
}
private void BanNick(bool set, Command curCommand, CommandMessage command)
{
string channel = command.Arguments.ContainsKey("Channel") ? command.Arguments["Channel"] : command.Location;
@ -403,5 +504,136 @@ namespace Combot.Modules.Plugins @@ -403,5 +504,136 @@ namespace Combot.Modules.Plugins
SendResponse(command.MessageType, command.Location, command.Nick.Nickname, noAccessMessage, true);
}
}
private void ProcessAutoBan(string channel, string nickname)
{
int timeToBan = 1;
int.TryParse(GetOptionValue("Seconds To Ban").ToString(), out timeToBan);
// Handle Auto Bans
List<Dictionary<string, object>> results = GetAutoBanList(channel, nickname);
if (results.Any())
{
foreach (Dictionary<string, object> result in results)
{
// temp ban/kick them
CommandMessage newMsg = new CommandMessage();
newMsg.Arguments.Add("Channel", channel);
newMsg.Arguments.Add("Nickname", nickname);
newMsg.Arguments.Add("Time", timeToBan.ToString());
newMsg.Arguments.Add("Reason", string.Format("[Auto Ban] {0}", result["Reason"].ToString()));
newMsg.Nick = new Nick() { Nickname = Bot.IRC.Nickname };
Command foundCommand = Commands.Find(c => c.Name == "Auto Ban");
TimedBan(foundCommand, newMsg);
KickNick(foundCommand, newMsg);
}
}
}
private void AddAutoBan(CommandMessage command)
{
string channel = command.Arguments.ContainsKey("Channel") ? command.Arguments["Channel"] : command.Location;
string nickname = command.Arguments["Nickname"];
string reason = command.Arguments.ContainsKey("Reason") ? command.Arguments["Reason"] : "No Reason Specified";
List<Dictionary<string, object>> results = GetAutoBanList(channel, nickname);
if (!results.Any())
{
AddChannel(channel);
AddNick(command.Nick);
AddNick(new Nick() { Nickname = nickname });
string query = "INSERT INTO `autobans` SET " +
"`server_id` = (SELECT `id` FROM `servers` WHERE `name` = {0}), " +
"`channel_id` = (SELECT `channels`.`id` FROM `channels` INNER JOIN `servers` ON `servers`.`id` = `channels`.`server_id` WHERE `servers`.`name` = {1} && `channels`.`name` = {2}), " +
"`nick_id` = (SELECT `nicks`.`id` FROM `nicks` INNER JOIN `servers` ON `servers`.`id` = `nicks`.`server_id` WHERE `servers`.`name` = {3} && `nickname` = {4}), " +
"`request_nick_id` = (SELECT `nicks`.`id` FROM `nicks` INNER JOIN `servers` ON `servers`.`id` = `nicks`.`server_id` WHERE `servers`.`name` = {5} && `nickname` = {6}), " +
"`reason` = {7}, " +
"`date_added` = {8}";
Bot.Database.Execute(query, new object[] { Bot.ServerConfig.Name, Bot.ServerConfig.Name, channel, Bot.ServerConfig.Name, nickname, Bot.ServerConfig.Name, command.Nick.Nickname, reason, command.TimeStamp });
string introMessage = string.Format("Added Auto Ban for {0}.", nickname);
SendResponse(command.MessageType, command.Location, command.Nick.Nickname, introMessage);
}
else
{
string maxMessage = string.Format("There is already an Auto Ban set for {0}.", command.Nick.Nickname);
SendResponse(command.MessageType, command.Location, command.Nick.Nickname, maxMessage, true);
}
}
private void DeleteAutoBan(CommandMessage command)
{
string channel = command.Arguments.ContainsKey("Channel") ? command.Arguments["Channel"] : command.Location;
string nickname = command.Arguments["Nickname"];
List<Dictionary<string, object>> results = GetAutoBanList(channel, nickname);
if (results.Any())
{
foreach (Dictionary<string, object> result in results)
{
int id = Convert.ToInt32(result["BanID"]);
string query = "DELETE FROM `autobans` " +
"WHERE `id` = {0}";
Bot.Database.Execute(query, new object[] { id });
string introMessage = string.Format("Auto Ban has been deleted for: {0}", nickname);
SendResponse(command.MessageType, command.Location, command.Nick.Nickname, introMessage);
}
}
else
{
string invalid = string.Format("No Auto Ban exists for: {0}", nickname);
SendResponse(command.MessageType, command.Location, command.Nick.Nickname, invalid, true);
}
}
private void ViewAutoBan(CommandMessage command)
{
string channel = command.Arguments.ContainsKey("Channel") ? command.Arguments["Channel"] : command.Location;
List<Dictionary<string, object>> results = command.Arguments.ContainsKey("Nickname") ? GetAutoBanList(channel, command.Arguments["Nickname"]) : GetAutoBanList(channel);
if (results.Any())
{
for (int i = 0; i < results.Count; i++)
{
int nickID = 0;
int requestID = 0;
int.TryParse(results[i]["NickID"].ToString(), out nickID);
int.TryParse(results[i]["RequestID"].ToString(), out requestID);
DateTime addedTime = DateTime.Now;
DateTime.TryParse(results[i]["DateAdded"].ToString(), out addedTime);
string introMessage = string.Format("Auto Ban #\u0002{0}\u0002 by {1} on {2} for reason: {3}", GetNickname(nickID), GetNickname(requestID), addedTime.ToString("G"), results[i]["Reason"]);
SendResponse(command.MessageType, command.Location, command.Nick.Nickname, introMessage, true);
}
}
else
{
string invalid = "No Auto Bans Available.";
SendResponse(command.MessageType, command.Location, command.Nick.Nickname, invalid, true);
}
}
private List<Dictionary<string, object>> GetAutoBanList(string channel, string nickname)
{
// Check to see if they have reached the max number of introductions
string search = "SELECT `autobans`.`id` AS `BanID`, `autobans`.`nick_id` AS `NickID`, `autobans`.`request_nick_id` AS `RequestID`, `autobans`.`reason` AS `Reason`, `autobans`.`date_added` AS `DateAdded` FROM `autobans` " +
"INNER JOIN `nicks` " +
"ON `autobans`.`nick_id` = `nicks`.`id` " +
"INNER JOIN `channels` " +
"ON `autobans`.`channel_id` = `channels`.`id` " +
"INNER JOIN `servers` " +
"ON `autobans`.`server_id` = `servers`.`id` " +
"WHERE `servers`.`name` = {0} AND `channels`.`name` = {1} AND `nicks`.`nickname` = {2}";
return Bot.Database.Query(search, new object[] { Bot.ServerConfig.Name, channel, nickname });
}
private List<Dictionary<string, object>> GetAutoBanList(string channel)
{
// Check to see if they have reached the max number of introductions
string search = "SELECT `autobans`.`id` AS `BanID`, `autobans`.`nick_id` AS `NickID`, `autobans`.`request_nick_id` AS `RequestID`, `autobans`.`reason` AS `Reason`, `autobans`.`date_added` AS `DateAdded` FROM `autobans` " +
"INNER JOIN `channels` " +
"ON `autobans`.`channel_id` = `channels`.`id` " +
"INNER JOIN `servers` " +
"ON `autobans`.`server_id` = `servers`.`id` " +
"WHERE `servers`.`name` = {0} AND `channels`.`name` = {1}";
return Bot.Database.Query(search, new object[] { Bot.ServerConfig.Name, channel });
}
}
}

8
Modules/Moderation/Moderation.csproj

@ -93,11 +93,17 @@ @@ -93,11 +93,17 @@
<Install>false</Install>
</BootstrapperPackage>
</ItemGroup>
<ItemGroup>
<Content Include="CreateTable.sql">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>md "$(SolutionDir)$(ConfigurationName)\Modules\$(TargetName)"
copy /Y "$(TargetPath)" "$(SolutionDir)$(ConfigurationName)\Modules\$(TargetName)"
copy /Y "$(TargetDir)Module.Default.json" "$(SolutionDir)$(ConfigurationName)\Modules\$(TargetName)"</PostBuildEvent>
copy /Y "$(TargetDir)Module.Default.json" "$(SolutionDir)$(ConfigurationName)\Modules\$(TargetName)"
copy /Y "$(TargetDir)CreateTable.sql" "$(SolutionDir)$(ConfigurationName)\Modules\$(TargetName)"</PostBuildEvent>
</PropertyGroup>
<Import Project="..\..\packages\GitVersionTask.2.0.1\Build\GitVersionTask.targets" Condition="Exists('..\..\packages\GitVersionTask.2.0.1\Build\GitVersionTask.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">

377
Modules/Moderation/Module.Default.json

@ -9,8 +9,8 @@ @@ -9,8 +9,8 @@
"Name": "Founder",
"Description": "Sets the specified nick as Founder of the channel.",
"Enabled": true,
"ChannelBlacklist": [],
"NickBlacklist": [],
"ChannelBlacklist": [ ],
"NickBlacklist": [ ],
"Triggers": [
"founder"
],
@ -18,7 +18,7 @@ @@ -18,7 +18,7 @@
{
"Name": "Nickname",
"Description": "The nickname that is being set to Founder status.",
"AllowedValues": [],
"AllowedValues": [ ],
"MessageTypes": [
0,
1,
@ -29,7 +29,7 @@ @@ -29,7 +29,7 @@
{
"Name": "Channel",
"Description": "The channel the mode is being set on. If none is specified, uses the current channel.",
"AllowedValues": [],
"AllowedValues": [ ],
"MessageTypes": [
0
],
@ -38,7 +38,7 @@ @@ -38,7 +38,7 @@
{
"Name": "Channel",
"Description": "The channel the mode is being set on.",
"AllowedValues": [],
"AllowedValues": [ ],
"MessageTypes": [
1,
2
@ -62,8 +62,8 @@ @@ -62,8 +62,8 @@
"Name": "Remove Founder",
"Description": "Removes the specified nick as Founder of the channel.",
"Enabled": true,
"ChannelBlacklist": [],
"NickBlacklist": [],
"ChannelBlacklist": [ ],
"NickBlacklist": [ ],
"Triggers": [
"defounder"
],
@ -71,7 +71,7 @@ @@ -71,7 +71,7 @@
{
"Name": "Nickname",
"Description": "The nickname that is being removed of Founder status.",
"AllowedValues": [],
"AllowedValues": [ ],
"MessageTypes": [
0,
1,
@ -82,7 +82,7 @@ @@ -82,7 +82,7 @@
{
"Name": "Channel",
"Description": "The channel the mode is being set on. If none is specified, uses the current channel.",
"AllowedValues": [],
"AllowedValues": [ ],
"MessageTypes": [
0
],
@ -91,7 +91,7 @@ @@ -91,7 +91,7 @@
{
"Name": "Channel",
"Description": "The channel the mode is being set on.",
"AllowedValues": [],
"AllowedValues": [ ],
"MessageTypes": [
1,
2
@ -115,8 +115,8 @@ @@ -115,8 +115,8 @@
"Name": "SOP",
"Description": "Sets the specified nick as Super Operator of the channel.",
"Enabled": true,
"ChannelBlacklist": [],
"NickBlacklist": [],
"ChannelBlacklist": [ ],
"NickBlacklist": [ ],
"Triggers": [
"sop"
],
@ -124,7 +124,7 @@ @@ -124,7 +124,7 @@
{
"Name": "Nickname",
"Description": "The nickname that is being set to Super Operator status.",
"AllowedValues": [],
"AllowedValues": [ ],
"MessageTypes": [
0,
1,
@ -135,7 +135,7 @@ @@ -135,7 +135,7 @@
{
"Name": "Channel",
"Description": "The channel the mode is being set on. If none is specified, uses the current channel.",
"AllowedValues": [],
"AllowedValues": [ ],
"MessageTypes": [
0
],
@ -144,7 +144,7 @@ @@ -144,7 +144,7 @@
{
"Name": "Channel",
"Description": "The channel the mode is being set on.",
"AllowedValues": [],
"AllowedValues": [ ],
"MessageTypes": [
1,
2
@ -169,8 +169,8 @@ @@ -169,8 +169,8 @@
"Name": "Remove SOP",
"Description": "Removes the specified nick as Super Operator of the channel.",
"Enabled": true,
"ChannelBlacklist": [],
"NickBlacklist": [],
"ChannelBlacklist": [ ],
"NickBlacklist": [ ],
"Triggers": [
"desop"
],
@ -178,7 +178,7 @@ @@ -178,7 +178,7 @@
{
"Name": "Nickname",
"Description": "The nickname that is being removed of Super Operator status.",
"AllowedValues": [],
"AllowedValues": [ ],
"MessageTypes": [
0,
1,
@ -189,7 +189,7 @@ @@ -189,7 +189,7 @@
{
"Name": "Channel",
"Description": "The channel the mode is being set on. If none is specified, uses the current channel.",
"AllowedValues": [],
"AllowedValues": [ ],
"MessageTypes": [
0
],
@ -198,7 +198,7 @@ @@ -198,7 +198,7 @@
{
"Name": "Channel",
"Description": "The channel the mode is being set on.",
"AllowedValues": [],
"AllowedValues": [ ],
"MessageTypes": [
1,
2
@ -223,8 +223,8 @@ @@ -223,8 +223,8 @@
"Name": "OP",
"Description": "Sets the specified nick as Operator of the channel.",
"Enabled": true,
"ChannelBlacklist": [],
"NickBlacklist": [],
"ChannelBlacklist": [ ],
"NickBlacklist": [ ],
"Triggers": [
"op"
],
@ -232,7 +232,7 @@ @@ -232,7 +232,7 @@
{
"Name": "Nickname",
"Description": "The nickname that is being set to Operator status.",
"AllowedValues": [],
"AllowedValues": [ ],
"MessageTypes": [
0,
1,
@ -243,7 +243,7 @@ @@ -243,7 +243,7 @@
{
"Name": "Channel",
"Description": "The channel the mode is being set on. If none is specified, uses the current channel.",
"AllowedValues": [],
"AllowedValues": [ ],
"MessageTypes": [
0
],
@ -252,7 +252,7 @@ @@ -252,7 +252,7 @@
{
"Name": "Channel",
"Description": "The channel the mode is being set on.",
"AllowedValues": [],
"AllowedValues": [ ],
"MessageTypes": [
1,
2
@ -278,8 +278,8 @@ @@ -278,8 +278,8 @@
"Name": "Remove OP",
"Description": "Removes the specified nick as Operator of the channel.",
"Enabled": true,
"ChannelBlacklist": [],
"NickBlacklist": [],
"ChannelBlacklist": [ ],
"NickBlacklist": [ ],
"Triggers": [
"deop"
],
@ -287,7 +287,7 @@ @@ -287,7 +287,7 @@
{
"Name": "Nickname",
"Description": "The nickname that is being removed of Operator status.",
"AllowedValues": [],
"AllowedValues": [ ],
"MessageTypes": [
0,
1,
@ -298,7 +298,7 @@ @@ -298,7 +298,7 @@
{
"Name": "Channel",
"Description": "The channel the mode is being set on. If none is specified, uses the current channel.",
"AllowedValues": [],
"AllowedValues": [ ],
"MessageTypes": [
0
],
@ -307,7 +307,7 @@ @@ -307,7 +307,7 @@
{
"Name": "Channel",
"Description": "The channel the mode is being set on.",
"AllowedValues": [],
"AllowedValues": [ ],
"MessageTypes": [
1,
2
@ -333,8 +333,8 @@ @@ -333,8 +333,8 @@
"Name": "HOP",
"Description": "Sets the specified nick as Half Operator of the channel.",
"Enabled": true,
"ChannelBlacklist": [],
"NickBlacklist": [],
"ChannelBlacklist": [ ],
"NickBlacklist": [ ],
"Triggers": [
"hop"
],
@ -342,7 +342,7 @@ @@ -342,7 +342,7 @@
{
"Name": "Nickname",
"Description": "The nickname that is being set to Half Operator status.",
"AllowedValues": [],
"AllowedValues": [ ],
"MessageTypes": [
0,
1,
@ -353,7 +353,7 @@ @@ -353,7 +353,7 @@
{
"Name": "Channel",
"Description": "The channel the mode is being set on. If none is specified, uses the current channel.",
"AllowedValues": [],
"AllowedValues": [ ],
"MessageTypes": [
0
],
@ -362,7 +362,7 @@ @@ -362,7 +362,7 @@
{
"Name": "Channel",
"Description": "The channel the mode is being set on.",
"AllowedValues": [],
"AllowedValues": [ ],
"MessageTypes": [
1,
2
@ -389,8 +389,8 @@ @@ -389,8 +389,8 @@
"Name": "Remove HOP",
"Description": "Removes the specified nick as Half Operator of the channel.",
"Enabled": true,
"ChannelBlacklist": [],
"NickBlacklist": [],
"ChannelBlacklist": [ ],
"NickBlacklist": [ ],
"Triggers": [
"dehop"
],
@ -398,7 +398,7 @@ @@ -398,7 +398,7 @@
{
"Name": "Nickname",
"Description": "The nickname that is being removed of Half Operator status.",
"AllowedValues": [],
"AllowedValues": [ ],
"MessageTypes": [
0,
1,
@ -409,7 +409,7 @@ @@ -409,7 +409,7 @@
{
"Name": "Channel",
"Description": "The channel the mode is being set on. If none is specified, uses the current channel.",
"AllowedValues": [],
"AllowedValues": [ ],
"MessageTypes": [
0
],
@ -418,7 +418,7 @@ @@ -418,7 +418,7 @@
{
"Name": "Channel",
"Description": "The channel the mode is being set on.",
"AllowedValues": [],
"AllowedValues": [ ],
"MessageTypes": [
1,
2
@ -445,8 +445,8 @@ @@ -445,8 +445,8 @@
"Name": "Voice",
"Description": "Sets the specified nick as Voiced in the channel.",
"Enabled": true,
"ChannelBlacklist": [],
"NickBlacklist": [],
"ChannelBlacklist": [ ],
"NickBlacklist": [ ],
"Triggers": [
"voice"
],
@ -454,7 +454,7 @@ @@ -454,7 +454,7 @@
{
"Name": "Nickname",
"Description": "The nickname that is being set to Voice status.",
"AllowedValues": [],
"AllowedValues": [ ],
"MessageTypes": [
0,
1,
@ -465,7 +465,7 @@ @@ -465,7 +465,7 @@
{
"Name": "Channel",
"Description": "The channel the mode is being set on. If none is specified, uses the current channel.",
"AllowedValues": [],
"AllowedValues": [ ],
"MessageTypes": [
0
],
@ -474,7 +474,7 @@ @@ -474,7 +474,7 @@
{
"Name": "Channel",
"Description": "The channel the mode is being set on.",
"AllowedValues": [],
"AllowedValues": [ ],
"MessageTypes": [
1,
2
@ -501,8 +501,8 @@ @@ -501,8 +501,8 @@
"Name": "Remove Voice",
"Description": "Removes the specified nick as Voiced of the channel.",
"Enabled": true,
"ChannelBlacklist": [],
"NickBlacklist": [],
"ChannelBlacklist": [ ],
"NickBlacklist": [ ],
"Triggers": [
"devoice"
],
@ -510,7 +510,7 @@ @@ -510,7 +510,7 @@
{
"Name": "Nickname",
"Description": "The nickname that is being removed of Voice status.",
"AllowedValues": [],
"AllowedValues": [ ],
"MessageTypes": [
0,
1,
@ -521,7 +521,7 @@ @@ -521,7 +521,7 @@
{
"Name": "Channel",
"Description": "The channel the mode is being set on. If none is specified, uses the current channel.",
"AllowedValues": [],
"AllowedValues": [ ],
"MessageTypes": [
0
],
@ -530,7 +530,7 @@ @@ -530,7 +530,7 @@
{
"Name": "Channel",
"Description": "The channel the mode is being set on.",
"AllowedValues": [],
"AllowedValues": [ ],
"MessageTypes": [
1,
2
@ -557,8 +557,8 @@ @@ -557,8 +557,8 @@
"Name": "ASOP",
"Description": "Modifies the ChanServ Auto Super Operators list for the specified nick.",
"Enabled": true,
"ChannelBlacklist": [],
"NickBlacklist": [],
"ChannelBlacklist": [ ],
"NickBlacklist": [ ],
"Triggers": [
"asop"
],
@ -580,7 +580,7 @@ @@ -580,7 +580,7 @@
{
"Name": "Nickname",
"Description": "The nickname that is being modified in the Auto Super Operator's list.",
"AllowedValues": [],
"AllowedValues": [ ],
"MessageTypes": [
0,
1,
@ -591,7 +591,7 @@ @@ -591,7 +591,7 @@
{
"Name": "Channel",
"Description": "The channel the mode is being set on. If none is specified, uses the current channel.",
"AllowedValues": [],
"AllowedValues": [ ],
"MessageTypes": [
0
],
@ -600,7 +600,7 @@ @@ -600,7 +600,7 @@
{
"Name": "Channel",
"Description": "The channel the mode is being set on.",
"AllowedValues": [],
"AllowedValues": [ ],
"MessageTypes": [
1,
2
@ -624,8 +624,8 @@ @@ -624,8 +624,8 @@
"Name": "AOP",
"Description": "Modifies the ChanServ Auto Operators list for the specified nick.",
"Enabled": true,
"ChannelBlacklist": [],
"NickBlacklist": [],
"ChannelBlacklist": [ ],
"NickBlacklist": [ ],
"Triggers": [
"aop"
],
@ -647,7 +647,7 @@ @@ -647,7 +647,7 @@
{
"Name": "Nickname",
"Description": "The nickname that is being modified in the Auto Operator's list.",
"AllowedValues": [],
"AllowedValues": [ ],
"MessageTypes": [
0,
1,
@ -658,7 +658,7 @@ @@ -658,7 +658,7 @@
{
"Name": "Channel",
"Description": "The channel the mode is being set on. If none is specified, uses the current channel.",
"AllowedValues": [],
"AllowedValues": [ ],
"MessageTypes": [
0
],
@ -667,7 +667,7 @@ @@ -667,7 +667,7 @@
{
"Name": "Channel",
"Description": "The channel the mode is being set on.",
"AllowedValues": [],
"AllowedValues": [ ],
"MessageTypes": [
1,
2
@ -692,8 +692,8 @@ @@ -692,8 +692,8 @@
"Name": "AHOP",
"Description": "Modifies the ChanServ Auto Half Operators list for the specified nick.",
"Enabled": true,
"ChannelBlacklist": [],
"NickBlacklist": [],
"ChannelBlacklist": [ ],
"NickBlacklist": [ ],
"Triggers": [
"ahop"
],
@ -715,7 +715,7 @@ @@ -715,7 +715,7 @@
{
"Name": "Nickname",
"Description": "The nickname that is being modified in the Auto Half Operator's list.",
"AllowedValues": [],
"AllowedValues": [ ],
"MessageTypes": [
0,
1,
@ -726,7 +726,7 @@ @@ -726,7 +726,7 @@
{
"Name": "Channel",
"Description": "The channel the mode is being set on. If none is specified, uses the current channel.",
"AllowedValues": [],
"AllowedValues": [ ],
"MessageTypes": [
0
],
@ -735,7 +735,7 @@ @@ -735,7 +735,7 @@
{
"Name": "Channel",
"Description": "The channel the mode is being set on.",
"AllowedValues": [],
"AllowedValues": [ ],
"MessageTypes": [
1,
2
@ -761,8 +761,8 @@ @@ -761,8 +761,8 @@
"Name": "AVoice",
"Description": "Modifies the ChanServ Auto Voice list for the specified nick.",
"Enabled": true,
"ChannelBlacklist": [],
"NickBlacklist": [],
"ChannelBlacklist": [ ],
"NickBlacklist": [ ],
"Triggers": [
"avoice"
],
@ -784,7 +784,7 @@ @@ -784,7 +784,7 @@
{
"Name": "Nickname",
"Description": "The nickname that is being modified in the Auto Voice's list.",
"AllowedValues": [],
"AllowedValues": [ ],
"MessageTypes": [
0,
1,
@ -795,7 +795,7 @@ @@ -795,7 +795,7 @@
{
"Name": "Channel",
"Description": "The channel the mode is being set on. If none is specified, uses the current channel.",
"AllowedValues": [],
"AllowedValues": [ ],
"MessageTypes": [
0
],
@ -804,7 +804,7 @@ @@ -804,7 +804,7 @@
{
"Name": "Channel",
"Description": "The channel the mode is being set on.",
"AllowedValues": [],
"AllowedValues": [ ],
"MessageTypes": [
1,
2
@ -831,8 +831,8 @@ @@ -831,8 +831,8 @@
"Name": "Mode",
"Description": "Changes the channel mode with optional parameters.",
"Enabled": true,
"ChannelBlacklist": [],
"NickBlacklist": [],
"ChannelBlacklist": [ ],
"NickBlacklist": [ ],
"Triggers": [
"mode"
],
@ -840,7 +840,7 @@ @@ -840,7 +840,7 @@
{
"Name": "Channel",
"Description": "The channel the modes are being changed on.",
"AllowedValues": [],
"AllowedValues": [ ],
"MessageTypes": [
1,
2
@ -850,7 +850,7 @@ @@ -850,7 +850,7 @@
{
"Name": "Modes",
"Description": "The modes to be changed.",
"AllowedValues": [],
"AllowedValues": [ ],
"MessageTypes": [
0,
1,
@ -861,7 +861,7 @@ @@ -861,7 +861,7 @@
{
"Name": "Parameters",
"Description": "Parameters that go with the modes changed.",
"AllowedValues": [],
"AllowedValues": [ ],
"MessageTypes": [
0,
1,
@ -888,8 +888,8 @@ @@ -888,8 +888,8 @@
"Name": "Topic",
"Description": "Changes the channel topic.",
"Enabled": true,
"ChannelBlacklist": [],
"NickBlacklist": [],
"ChannelBlacklist": [ ],
"NickBlacklist": [ ],
"Triggers": [
"topic"
],
@ -897,7 +897,7 @@ @@ -897,7 +897,7 @@
{
"Name": "Channel",
"Description": "The channel the topic is being changed on.",
"AllowedValues": [],
"AllowedValues": [ ],
"MessageTypes": [
1,
2
@ -907,7 +907,7 @@ @@ -907,7 +907,7 @@
{
"Name": "Message",
"Description": "The message for the topic.",
"AllowedValues": [],
"AllowedValues": [ ],
"MessageTypes": [
0,
1,
@ -934,8 +934,8 @@ @@ -934,8 +934,8 @@
"Name": "Invite",
"Description": "Invites the specified nick to the channel.",
"Enabled": true,
"ChannelBlacklist": [],
"NickBlacklist": [],
"ChannelBlacklist": [ ],
"NickBlacklist": [ ],
"Triggers": [
"invite"
],
@ -943,7 +943,7 @@ @@ -943,7 +943,7 @@
{
"Name": "Nickname",
"Description": "The nick to be invited.",
"AllowedValues": [],
"AllowedValues": [ ],
"MessageTypes": [
0,
1,
@ -954,7 +954,7 @@ @@ -954,7 +954,7 @@
{
"Name": "Channel",
"Description": "The channel the nick will be invited to.",
"AllowedValues": [],
"AllowedValues": [ ],
"MessageTypes": [
0
],
@ -963,7 +963,7 @@ @@ -963,7 +963,7 @@
{
"Name": "Channel",
"Description": "The channel the nick will be invited to.",
"AllowedValues": [],
"AllowedValues": [ ],
"MessageTypes": [
1,
2
@ -985,12 +985,125 @@ @@ -985,12 +985,125 @@
"ShowHelp": true,
"SpamCheck": true
},
{
"Name": "Auto Ban",
"Description": "Allows adding nicknames to an autoban list for channels.",
"Enabled": true,
"ChannelBlacklist": [ ],
"NickBlacklist": [ ],
"Triggers": [
"ab",
"aban",
"autoban"
],
"Arguments": [
{
"Name": "Method",
"Description": "What you want to do with the auto ban.",
"AllowedValues": [
"Add",
"Del",
"Delete",
"View"
],
"MessageTypes": [
0,
1,
2
],
"Required": true
},
{
"Name": "Nickname",
"Description": "The nick to be auto banned.",
"AllowedValues": [ ],
"DependentArguments": [
{
"Name": "Method",
"Values": [
"Add",
"Del",
"Delete"
]
}
],
"MessageTypes": [
0,
1,
2
],
"Required": true
},
{
"Name": "Nickname",
"Description": "The nick to be auto banned.",
"AllowedValues": [ ],
"DependentArguments": [
{
"Name": "Method",
"Values": [
"View"
]
}
],
"MessageTypes": [
0,
1,
2
],
"Required": false
},
{
"Name": "Channel",
"Description": "The channel the nick will be auto banned from.",
"AllowedValues": [ ],
"MessageTypes": [
1,
2
],
"Required": true
},
{
"Name": "Reason",
"Description": "The reason the nick is being auto banned.",
"AllowedValues": [ ],
"DependentArguments": [
{
"Name": "Method",
"Values": [
"Add"
]
}
],
"MessageTypes": [
0,
1,
2
],
"Required": false
}
],
"AllowedMessageTypes": [
0,
1,
2
],
"AllowedAccess": [
2,
3,
4,
5,
6
],
"ShowHelp": true,
"SpamCheck": true
},
{
"Name": "Ban",
"Description": "Bans the specified nick from a channel.",
"Enabled": true,
"ChannelBlacklist": [],
"NickBlacklist": [],
"ChannelBlacklist": [ ],
"NickBlacklist": [ ],
"Triggers": [
"b",
"ban"
@ -999,7 +1112,7 @@ @@ -999,7 +1112,7 @@
{
"Name": "Nickname",
"Description": "The nick to be banned.",
"AllowedValues": [],
"AllowedValues": [ ],
"MessageTypes": [
0,
1,
@ -1010,7 +1123,7 @@ @@ -1010,7 +1123,7 @@
{
"Name": "Channel",
"Description": "The channel the nick will be banned from.",
"AllowedValues": [],
"AllowedValues": [ ],
"MessageTypes": [
0
],
@ -1019,7 +1132,7 @@ @@ -1019,7 +1132,7 @@
{
"Name": "Channel",
"Description": "The channel the nick will be banned from.",
"AllowedValues": [],
"AllowedValues": [ ],
"MessageTypes": [
1,
2
@ -1046,8 +1159,8 @@ @@ -1046,8 +1159,8 @@
"Name": "UnBan",
"Description": "UnBans the specified nick from a channel.",
"Enabled": true,
"ChannelBlacklist": [],
"NickBlacklist": [],
"ChannelBlacklist": [ ],
"NickBlacklist": [ ],
"Triggers": [
"ub",
"unban"
@ -1056,7 +1169,7 @@ @@ -1056,7 +1169,7 @@
{
"Name": "Nickname",
"Description": "The nick to be unbanned.",
"AllowedValues": [],
"AllowedValues": [ ],
"MessageTypes": [
0,
1,
@ -1067,7 +1180,7 @@ @@ -1067,7 +1180,7 @@
{
"Name": "Channel",
"Description": "The channel the nick will be unbanned from.",
"AllowedValues": [],
"AllowedValues": [ ],
"MessageTypes": [
0
],
@ -1076,7 +1189,7 @@ @@ -1076,7 +1189,7 @@
{
"Name": "Channel",
"Description": "The channel the nick will be unbanned from.",
"AllowedValues": [],
"AllowedValues": [ ],
"MessageTypes": [
1,
2
@ -1103,8 +1216,8 @@ @@ -1103,8 +1216,8 @@
"Name": "Kick Ban",
"Description": "Bans and then Kicks the specified nick from a channel.",
"Enabled": true,
"ChannelBlacklist": [],
"NickBlacklist": [],
"ChannelBlacklist": [ ],
"NickBlacklist": [ ],
"Triggers": [
"kb",
"kickban"
@ -1113,7 +1226,7 @@ @@ -1113,7 +1226,7 @@
{
"Name": "Nickname",
"Description": "The nick to be kick banned.",
"AllowedValues": [],
"AllowedValues": [ ],
"MessageTypes": [
0,
1,
@ -1124,7 +1237,7 @@ @@ -1124,7 +1237,7 @@
{
"Name": "Channel",
"Description": "The channel the nick will be kick banned from.",
"AllowedValues": [],
"AllowedValues": [ ],
"MessageTypes": [
1,
2
@ -1134,7 +1247,7 @@ @@ -1134,7 +1247,7 @@
{
"Name": "Reason",
"Description": "The reason the nick is being kick banned.",
"AllowedValues": [],
"AllowedValues": [ ],
"MessageTypes": [
0,
1,
@ -1162,8 +1275,8 @@ @@ -1162,8 +1275,8 @@
"Name": "Timed Ban",
"Description": "Bans the specified nick from a channel for a specified amount of time.",
"Enabled": true,
"ChannelBlacklist": [],
"NickBlacklist": [],
"ChannelBlacklist": [ ],
"NickBlacklist": [ ],
"Triggers": [
"tb",
"timedban"
@ -1172,7 +1285,7 @@ @@ -1172,7 +1285,7 @@
{
"Name": "Time",
"Description": "The time for the nick to be banned in seconds.",
"AllowedValues": [],
"AllowedValues": [ ],
"MessageTypes": [
0,
1,
@ -1183,7 +1296,7 @@ @@ -1183,7 +1296,7 @@
{
"Name": "Nickname",
"Description": "The nick to be banned.",
"AllowedValues": [],
"AllowedValues": [ ],
"MessageTypes": [
0,
1,
@ -1194,7 +1307,7 @@ @@ -1194,7 +1307,7 @@
{
"Name": "Channel",
"Description": "The channel the nick will be banned from.",
"AllowedValues": [],
"AllowedValues": [ ],
"MessageTypes": [
0
],
@ -1203,7 +1316,7 @@ @@ -1203,7 +1316,7 @@
{
"Name": "Channel",
"Description": "The channel the nick will be banned from.",
"AllowedValues": [],
"AllowedValues": [ ],
"MessageTypes": [
1,
2
@ -1230,8 +1343,8 @@ @@ -1230,8 +1343,8 @@
"Name": "Timed Kick Ban",
"Description": "Bans and Kicks the specified nick from a channel for a specified amount of time.",
"Enabled": true,
"ChannelBlacklist": [],
"NickBlacklist": [],
"ChannelBlacklist": [ ],
"NickBlacklist": [ ],
"Triggers": [
"tkb",
"timedkickban"
@ -1240,7 +1353,7 @@ @@ -1240,7 +1353,7 @@
{
"Name": "Time",
"Description": "The time for the nick to be banned in seconds.",
"AllowedValues": [],
"AllowedValues": [ ],
"MessageTypes": [
0,
1,
@ -1251,7 +1364,7 @@ @@ -1251,7 +1364,7 @@
{
"Name": "Nickname",
"Description": "The nick to be kick banned.",
"AllowedValues": [],
"AllowedValues": [ ],
"MessageTypes": [
0,
1,
@ -1262,7 +1375,7 @@ @@ -1262,7 +1375,7 @@
{
"Name": "Channel",
"Description": "The channel the nick will be kick banned from.",
"AllowedValues": [],
"AllowedValues": [ ],
"MessageTypes": [
1,
2
@ -1272,7 +1385,7 @@ @@ -1272,7 +1385,7 @@
{
"Name": "Reason",
"Description": "The reason the nick is being kick banned.",
"AllowedValues": [],
"AllowedValues": [ ],
"MessageTypes": [
0,
1,
@ -1300,8 +1413,8 @@ @@ -1300,8 +1413,8 @@
"Name": "Kick",
"Description": "Kicks the specified nick from a channel.",
"Enabled": true,
"ChannelBlacklist": [],
"NickBlacklist": [],
"ChannelBlacklist": [ ],