BanME Lua5
 

News:

29 December 2022 - PtokaX 0.5.3.0 (20th anniversary edition) released...
11 April 2017 - PtokaX 0.5.2.2 released...
8 April 2015 Anti child and anti pedo pr0n scripts are not allowed anymore on this board!
28 September 2015 - PtokaX 0.5.2.1 for Windows 10 IoT released...
3 September 2015 - PtokaX 0.5.2.1 released...
16 August 2015 - PtokaX 0.5.2.0 released...
1 August 2015 - Crowdfunding for ADC protocol support in PtokaX ended. Clearly nobody want ADC support...
30 June 2015 - PtokaX 0.5.1.0 released...
30 April 2015 Crowdfunding for ADC protocol support in PtokaX
26 April 2015 New support hub!
20 February 2015 - PtokaX 0.5.0.3 released...
13 April 2014 - PtokaX 0.5.0.2 released...
23 March 2014 - PtokaX testing version 0.5.0.1 build 454 is available.
04 March 2014 - PtokaX.org sites were temporary down because of DDOS attacks and issues with hosting service provider.

Main Menu

BanME Lua5

Started by TTB, 26 March, 2005, 19:45:17

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

TTB

Hi,

v. 3.1 converted into LUA5 >> that will make it v. 4.1 (why, don't know)  :]


Here again the script for users who like to ban themselves...

-- -----------------------------------------------------------------------
-- BANME script by TTB
-- -----------------------------------------------------------------------
-- OPs get also notification by PM (if enabled)
-- v4.1  26-03-05
-- Also thanx to Piderman & Tejo
-- -----------------------------------------------------------------------
-- Converted into LUA 5
-- ------------------------------------------------------------------------
-- NOTE: If opNote = "2" your BOT (regmybot setting) won't be registered!!
-- ------------------------------------------------------------------------

-- ## Change this to what you like ## --

-->> Bot & Hubname
Bot = "[BOT]PLAY"		-- NAME of your BANME bot  >:)
hubname = "Dutch DVD hub"	-- NAME of your wonderful hub

-->> Your commands
Baninfocmd = "#banhelp"		-- info "how do I get banned?!"
Bancmd = "#banme"		-- your BANME command
Disconnectcmd = "#disconnect"	-- your disconnect command
Killcmd = "#killme"		-- your KILL command

-->> OP Notification
opNote = "2"			-- "0" no notification to OP's
				-- "1" notification to your defined Bot (1st setting)
				-- "2" notification to OP-Chat

-->> Time of your Timebans
minBan = 1			-- Default = 1 min. minimum Timeban. No quotes needed here
maxBan = 1440			-- 1440 min = 24 hours. No quotes needed here

-->> BE CAREFUL WITH THIS SETTING!
kill = "2"			-- "0" = disabled (default)
				-- "1" = enabled (user will be KILLED!!)
				-- "2" = disconnect the user (user will be shocked..)

-->> REG your bot if you don't use the name of a BOT that already exists!
regmybot = "0" 			-- REG your BANME bot? -> "1" (default) else "0"
				-- Please read the NOTE above!!!

-->> Now you are finished with the configuration :) 


-- ## Don't change below ## --

--> REGBOT <--
function Main()
 if (opNote ~= "2") then
  if (regmybot == "1") then
	frmHub:RegBot(Bot)
  end
 end
end

--> DATA <--
function ChatArrival(curUser, data)
   if (string.sub(data, 1, 1) == "<" ) then
    data=string.sub(data,1,string.len(data)-1)
    s,e,cmd = string.find(data,"%b<>%s+(%S+)")
    if (cmd == Baninfocmd) then
     if curUser.bOperator then
      curUser:SendData(Bot, Header..MainInfo..OPInfo)
     else
      curUser:SendData(Bot, Header..MainInfo)
     end
     return 1
    elseif (cmd == Disconnectcmd) then
     local s,e,reason= string.find(data,"%b<>%s+%S+%s+(.*)")
     DiscMe(curUser,reason,data)
     return 1
    elseif (cmd == Killcmd) then
     KillMe(curUser)
     return 1
    elseif (cmd == Bancmd) then
     local s,e,time= string.find(data,"%b<>%s+%S+%s+(%A+)")
      if time == nil then
       curUser:SendData(Bot, "Syntax error! Please use: "..Bancmd.." 
TTB

(? ?.??.-> Admin @ Surfnet hubs <-.??.???)

SMF spam blocked by CleanTalk