-- BANME script by TTB -- OPs get also notification by PM (if enabled) -- v1.0 17-02-05 -- In v2 maybe a max. in the timeban?? If someone else likes to do that, be my guest! ---------------------------------------------------------------------------
-- ## Change this to what you like ## --
Bot = "[BOT]PLAY"-- NAME of your BANME bot >:) hubname = "Dutch DVD hub"-- NAME of your wonderfull hub --------------------------------------------------------------------------- Baninfocmd = "#banhelp"-- info "how do I get banned?!" Bancmd = "#banme"-- your BANME command Disconnectcmd = "#disconnect"-- your disconnect command opNote = "1"-- Send notification to OPs set "1" else "0"
-- NO KILL FUNCTION! You don't want your users killed...! You can do that by yourself ;-)
-- ## Don't change below ## --
function DataArrival(curUser, data) if (strsub(data, 1, 1) == "<" ) then data=strsub(data,1,strlen(data)-1) s,e,cmd = strfind(data,"%b<>%s+(%S+)") if (cmd == Baninfocmd) then curUser:SendData("<"..Bot..">\r\n\r\n\t--<>--------------------------------------------------------------------------------------------------------------------------------------------------------<>--\r\n\t\t\t [ BAN Help ]\t\t\t [ BAN Help ] \r\n\t--<>--------------------------------------------------------------------------------------------------------------------------------------------------------<>--\r\n\t\t "..Disconnectcmd.." \t\t\t=\tDisconnect yourself\r\n\t\t "..Bancmd.."
Title: v2
Post by: TTB on 17 February, 2005, 20:52:01
-- BANME script by TTB -- OPs get also notification by PM (if enabled) -- v2.0 17-02-05 -- Thanx to Piderman & Tejo, max with the timebans... ---------------------------------------------------------------------------
-- ## Change this to what you like ## --
Bot = "[BOT]PLAY"-- NAME of your BANME bot >:) hubname = "Dutch DVD hub"-- NAME of your wonderfull hub --------------------------------------------------------------------------- Baninfocmd = "#banhelp"-- info "how do I get banned?!" Bancmd = "#banme"-- your BANME command Disconnectcmd = "#disconnect"-- your disconnect command opNote = "1"-- Send notification to OPs set "1" else "0" maxBan = 1440-- 1440 min = 24 hours. No quotes needed here
-- NO KILL FUNCTION! You don't want your users killed...! You can do that by yourself ;-)
-- ## Don't change below ## --
function DataArrival(curUser, data) if (strsub(data, 1, 1) == "<" ) then data=strsub(data,1,strlen(data)-1) s,e,cmd = strfind(data,"%b<>%s+(%S+)") if (cmd == Baninfocmd) then curUser:SendData("<"..Bot..">\r\n\r\n\t--<>--------------------------------------------------------------------------------------------------------------------------------------------------------<>--\r\n\t\t\t [ BAN Help ]\t\t\t [ BAN Help ] \r\n\t--<>--------------------------------------------------------------------------------------------------------------------------------------------------------<>--\r\n\t\t "..Disconnectcmd.." \t\t\t=\tDisconnect yourself\r\n\t\t "..Bancmd.." \t\t\t=\tTimeban yourself in minutes\r\n\t\t "..Baninfocmd.."\t\t\t=\tShows you this help\r\n\t--<>--------------------------------------------------------------------------------------------------------------------------------------------------------<>--\r\n") return 1 elseif (cmd == Disconnectcmd) then local s,e,reason= strfind(data,"%b<>%s+%S+%s+(.*)") if reason == nil then curUser:SendData(Bot, "*** As you wish... 'DISCONNECTED from "..hubname.." ***") curUser:Disconnect() SendToAll(Bot, "*** The user: "..curUser.sName.." has disconnected himself/herself for unknown reason... asshole! ***") else curUser:SendData(Bot, "*** As you wish... 'DISCONNECTED from "..hubname.." ***") curUser:Disconnect() SendToAll(Bot, "*** The user: "..curUser.sName.." has disconnected himself/herself with the reason: "..reason.." ***") end return 1 elseif (cmd == "#killme") then -- ;) SendPmToOps(Bot, "*** The user "..curUser.sName.." has requested to kill him! Have mercy with this poor fella... ***") curUser:SendPM(Bot, "Your request has been send to all OPs!") elseif (cmd == Bancmd) then local s,e,time= strfind(data,"%b<>%s+%S+%s+(%A+)") if time == nil then curUser:SendData(Bot, "Syntax error! Please use: "..Bancmd.." to ban yourself! Min. timeban = 1 minute! Max timeban = "..maxBan.." minutes! Be careful with this command. Please don't spam us by e-mail with your own mistakes. We won't unban you! You knew the risks...!") else local time = tonumber(time) if (time >= maxBan) then time = maxBan end TrigBan(curUser,time,data) end return 1 end end end
function TrigBan(curUser,time) if (time >= 1) then curUser:SendPM(Bot, "You have banned yourself for "..time.." minutes! Hope to see you back again :) Please don't spam us by e-mail with your own mistakes. We won't unban you! You knew the risks...!") SendToAll(Bot, "*** The user: "..curUser.sName.." has banned himself/herself for "..time.." minutes...! ***") if (opNote == "1") then SendPmToOps(Bot, "*** The user "..curUser.sName.." has banned himself/herself for "..time.." minutes! ***") end curUser:TimeBan(time) else curUser:SendData(Bot, "Min. timeban = 1 minute! Max timeban = "..maxBan.." minutes! Be careful with this command.") end return 1 end
Title:
Post by: plop on 18 February, 2005, 17:43:46
QuoteOriginally posted by TTB Hi,
here a banme script... it's is useless... but somehow I like it
if you learn from it, it isn't useless.
plop
Title:
Post by: TTB on 18 February, 2005, 17:47:18
Hi
YEAH I LEARN! :D
I have also another script... you all gonna like it, I promise... but it isn't finished. I will post it when it is finished :D
Title: v2.1
Post by: TTB on 21 February, 2005, 00:07:04
v2.1 >>
New/modifications:
-- ------------------------------------------------------------------------ -- Bot will now be regged -- Menu fix, that will make v2.1 :) -- MORE TO COME! ---------------------------------------------------------------------------
-- BANME script by TTB -- OPs get also notification by PM (if enabled) -- v2.1 20-02-05 -- Thanx to Piderman & Tejo, max with the timebans... -- ------------------------------------------------------------------------ -- Bot will now be regged -- Menu fix, that will make v2.1 :) -- MORE TO COME! ---------------------------------------------------------------------------
-- ## Change this to what you like ## --
Bot = "[BOT]PLAY"-- NAME of your BANME bot >:) hubname = "Dutch DVD hub"-- NAME of your wonderfull hub --------------------------------------------------------------------------- Baninfocmd = "#banhelp"-- info "how do I get banned?!" Bancmd = "#banme"-- your BANME command Disconnectcmd = "#disconnect"-- your disconnect command opNote = "1"-- Send notification to OPs set "1" else "0" maxBan = 1440-- 1440 min = 24 hours. No quotes needed here
-- NO KILL FUNCTION! You don't want your users killed...! You can do that by yourself ;-)
-- ## Don't change below ## --
function Main() frmHub:RegBot(Bot) end
function DataArrival(curUser, data) if (strsub(data, 1, 1) == "<" ) then data=strsub(data,1,strlen(data)-1) s,e,cmd = strfind(data,"%b<>%s+(%S+)") if (cmd == Baninfocmd) then local line = "" curUser:SendData("<"..Bot..">\r\n\r\n\t--<>--------------------------------------------------------------------------------------------------------------------------------------------------------<>--" ..line.."\r\n\t\t\t [ BAN Help ]\t\t\t [ BAN Help ]\r\n\t" ..line.."--<>--------------------------------------------------------------------------------------------------------------------------------------------------------<>--" ..line.."\r\n\t\t "..Disconnectcmd.." \t\t=\tDisconnect yourself" ..line.."\r\n\t\t "..Bancmd.." \t\t\t=\tTimeban yourself in minutes" ..line.."\r\n\t\t "..Baninfocmd.."\t\t\t=\tShows you this help\r\n\t" ..line.."--<>--------------------------------------------------------------------------------------------------------------------------------------------------------<>--" ..line.."\r\n\t > NOTE: Max TIMEBAN = "..maxBan.." minutes! No reason by DISCONNECT will give standard reason >:) <" ..line.."\r\n\t > Please don't spam us by e-mail with your own mistakes. We won't unban you! You knew the risks...! <\r\n\t" ..line.."--<>--------------------------------------------------------------------------------------------------------------------------------------------------------<>--\r\n") return 1 elseif (cmd == Disconnectcmd) then local s,e,reason= strfind(data,"%b<>%s+%S+%s+(.*)") if reason == nil then curUser:SendData(Bot, "*** As you wish... DISCONNECTED from "..hubname.." ***") curUser:Disconnect() SendToAll(Bot, "*** The user: "..curUser.sName.." has disconnected himself/herself for unknown reason... asshole! ***") else curUser:SendData(Bot, "*** As you wish... DISCONNECTED from "..hubname.." ***") curUser:Disconnect() SendToAll(Bot, "*** The user: "..curUser.sName.." has disconnected himself/herself with the reason: "..reason.." ***") end return 1 elseif (cmd == "#killme") then -- ;) SendPmToOps(Bot, "*** The user "..curUser.sName.." has requested to kill him! Have mercy with this poor fella... ***") curUser:SendPM(Bot, "Your request has been send to all OPs!") elseif (cmd == Bancmd) then local s,e,time= strfind(data,"%b<>%s+%S+%s+(%A+)") if time == nil then curUser:SendData(Bot, "Syntax error! Please use: "..Bancmd.." to ban yourself! Min. timeban = 1 minute! Max timeban = "..maxBan.." minutes! Be careful with this command. Please don't spam us by e-mail with your own mistakes. We won't unban you! You knew the risks...!") else local time = tonumber(time) if (time >= maxBan) then time = maxBan end TrigBan(curUser,time,data) end return 1 end end end
function TrigBan(curUser,time) if (time >= 1) then curUser:SendPM(Bot, "You have banned yourself for "..time.." minutes! Hope to see you back again :) Please don't spam us by e-mail with your own mistakes. We won't unban you! You knew the risks...!") SendToAll(Bot, "*** The user: "..curUser.sName.." has banned himself/herself for "..time.." minutes...! ***") if (opNote == "1") then SendPmToOps(Bot, "*** The user "..curUser.sName.." has banned himself/herself for "..time.." minutes! ***") end curUser:TimeBan(time) else curUser:SendData(Bot, "Min. timeban = 1 minute! Max timeban = "..maxBan.." minutes! Be careful with this command.") end return 1 end
I try to build now v3.0, with these options:
Timeban with your own leave message (reason) Set the minimum of the ban Kill command by user (fake or real)
Title: v3.1
Post by: TTB on 28 February, 2005, 04:33:16
-- ----------------------------------------------------------------------- -- BANME script by TTB -- ----------------------------------------------------------------------- -- OPs get also notification by PM (if enabled) -- v3.1 28-02-05 -- Also thanx to Piderman & Tejo -- ----------------------------------------------------------------------- -- Added -> set the minimum of the ban -- Added -> Kill command by user (fake or real) -- Changed -> MENU :) -- Changed -> OP notification -- ------------------------------------------------------------------------ -- To do -> timeban with your own leave message (reason) -- ------------------------------------------------------------------------ -- 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 DataArrival(curUser, data) if (strsub(data, 1, 1) == "<" ) then data=strsub(data,1,strlen(data)-1) s,e,cmd = strfind(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= strfind(data,"%b<>%s+%S+%s+(.*)") DiscMe(curUser, data) return 1 elseif (cmd == Killcmd) then KillMe(curUser) return 1 elseif (cmd == Bancmd) then local s,e,time= strfind(data,"%b<>%s+%S+%s+(%A+)") if time == nil then curUser:SendData(Bot, "Syntax error! Please use: "..Bancmd.." to ban yourself! Min. timeban = "..minBan.." minute(s)! Max timeban = "..maxBan.." minutes! Be careful with this command. Please don't spam us by e-mail with your own mistakes. We won't unban you! You knew the risks...!") else TrigBan(curUser,time,data) end return 1 end end end
--> KILL/PERMBAN on NICK/IP! <-- function KillMe(curUser) if kill == "1" then curUser:SendPM(Bot, "YOU HAVE KILLED YOURSELF! Please don't spam us by e-mail with your own mistakes. We won't unban you! You knew the risks...!") curUser:Ban() SendToAll(Bot, "*** The user: "..curUser.sName.." has KILLED himself/herself! The stupid fucker doesn't know what he/she has done! ***") if (opNote == "1") then SendPmToOps(Bot, "*** The user "..curUser.sName.." has KILLED himself/herself! Let the fucker burn in hell! ***") elseif (opNote == "2") then SendPmToOps(frmHub:GetOpChatName(), "*** The user "..curUser.sName.." has KILLED himself/herself! Let the fucker burn in hell! ***") end elseif kill == "0" then if (opNote == "1") then SendPmToOps(Bot, "*** The user "..curUser.sName.." has requested to kill him! Have mercy with this poor fella... ***") elseif (opNote == "2") then SendPmToOps(frmHub:GetOpChatName(), "*** The user "..curUser.sName.." has requested to kill him! Have mercy with this poor fella... ***") end curUser:SendPM(Bot, "Your request has been send to all OPs!") elseif kill == "2" then if (opNote == "1") then SendPmToOps(Bot, "*** The user "..curUser.sName.." has requested to kill him! He/she is now disconnected, but please have mercy with this poor fella when he/she reconnects... ***") elseif (opNote == "2") then SendPmToOps(frmHub:GetOpChatName(), "*** The user "..curUser.sName.." has requested to kill him! He/she is now disconnected, but please have mercy with this poor fella when he/she reconnects... ***") end curUser:SendPM(Bot, "As you wish... You just KILLED yourself >:)") curUser:Disconnect() end end
--> DISCONNECT <-- function DiscMe(curUser) -- local s,e,reason= strfind(data,"%b<>%s+%S+%s+(.*)") if reason == nil then curUser:SendData(Bot, "*** As you wish... DISCONNECTED from "..hubname.." ***") curUser:Disconnect() SendToAll(Bot, "*** The user: "..curUser.sName.." has disconnected himself/herself for unknown reason... asshole! ***") else curUser:SendData(Bot, "*** As you wish... DISCONNECTED from "..hubname.." ***") curUser:Disconnect() SendToAll(Bot, "*** The user: "..curUser.sName.." has disconnected himself/herself with the reason: "..reason.." ***") end end
--> TEMPBAN <-- function TrigBan(curUser,time) local time = tonumber(time) if (time >= maxBan) then time = maxBan elseif (time <= minBan) then time = minBan end curUser:SendPM(Bot, "You have banned yourself for "..time.." minutes! Hope to see you back again :) Please don't spam us by e-mail with your own mistakes. We won't unban you! You knew the risks...!") SendToAll(Bot, "*** The user: "..curUser.sName.." has banned himself/herself for "..time.." minutes...! ***") if (opNote == "1") then SendPmToOps(Bot, "*** The user "..curUser.sName.." has banned himself/herself for "..time.." minutes! ***") elseif (opNote == "2") then SendPmToOps(frmHub:GetOpChatName(), "*** The user "..curUser.sName.." has banned himself/herself for "..time.." minutes! ***") end curUser:TimeBan(time) return 1 end
--> MENU <-- Header = ("\r\n\t\t\t\t\tBanME-script-by-TTB-v.3.1") MainInfo = ( "\r\n\t--<>--------------------------------------------------------------------------------------------------------------------------------------------------------<>--".. "\r\n\t\t\t [ BAN Help ]\t\t\t [ BAN Help ]\r\n\t".. "--<>--------------------------------------------------------------------------------------------------------------------------------------------------------<>--".. "\r\n\t\t "..Disconnectcmd.." \t\t=\tDisconnect yourself".. "\r\n\t\t "..Bancmd.." \t\t\t=\tTimeban yourself in minutes".. "\r\n\t\t "..Killcmd.."\t\t\t\t=\tKill yourself >:)".. "\r\n\t\t "..Baninfocmd.."\t\t\t=\tShows you this help\r\n\t".. "--<>--------------------------------------------------------------------------------------------------------------------------------------------------------<>--".. "\r\n\t > Min. TIMEBAN = "..minBan.." minute(s) / Max. TIMEBAN = "..maxBan.." minutes!".. "\r\n\t > No reason by DISCONNECT will give standard reason >:)".. "\r\n\t > Please don't spam us by e-mail with your own mistakes. We won't unban you! You knew the risks...!\r\n\t".. "--<>--------------------------------------------------------------------------------------------------------------------------------------------------------<>--") OPInfo = ("\r\n\t".. " > Kill mode = "..kill.." ----------> 0 = disabled (default) <-> 1 = enabled <-> 2 = disconnect mode\r\n\t".. "--<>--------------------------------------------------------------------------------------------------------------------------------------------------------<>--\r\n") The final version of this script will be also changed in LUA5... I have only one thing to do left, timeban with leave message. I hope I can make some time to make that.
Just wondering also who uses this script... I didn't get any reply's. I know the script is more funny then functional...