Example #1
0
 /// <summary>Fired when server initalizes Terraria</summary>
 /// <param name="args">The EventArgs object</param>
 public void OnInitialize(EventArgs args)
 {
     //Initialize database
     cidrbans = new CIDRBanManager();
     //Adds CIDRBan command
     Commands.ChatCommands.Add(new Command("cidrbans.use", CIDRBanCommand, "cidrban")
     {
         HelpDesc = new[]
         {
             "{0}cidrban add <range> [reason] - Ban a CIDR range permanently.".SFormat(Commands.Specifier),
             "{0}cidrban addtemp <range> <time> [reason] - Ban a CIDR range temporarily.".SFormat(Commands.Specifier),
             "{0}cidrban del <ip/range> - Unban CIDR range or ranges that includes specified IP.".SFormat(Commands.Specifier),
             "{0}cidrban list - List all CIDR ranges banned in the system.".SFormat(Commands.Specifier)
         }
     });
 }
Example #2
0
 /// <summary>Fired when server initalizes Terraria</summary>
 /// <param name="args">The EventArgs object</param>
 public void OnInitialize(EventArgs args)
 {
     //Initialize database
     cidrbans = new CIDRBanManager();
     //Adds CIDRBan command
     Commands.ChatCommands.Add(new Command("cidrbans.use", CIDRBanCommand, "cidrban")
     {
         HelpDesc = new[]
         {
             "{0}cidrban add <range> [reason] - Ban a CIDR range permanently.".SFormat(Commands.Specifier),
             "{0}cidrban addtemp <range> <time> [reason] - Ban a CIDR range temporarily.".SFormat(Commands.Specifier),
             "{0}cidrban del <ip/range> - Unban CIDR range or ranges that includes specified IP.".SFormat(Commands.Specifier),
             "{0}cidrban list - List all CIDR ranges banned in the system.".SFormat(Commands.Specifier)
         }
     });
 }