PtokaX forum

Archive => Archived 5.0 boards => Finished Scripts => Topic started by: Cêñoßy†ê on 03 November, 2005, 05:06:59

Title: Modem killer
Post by: Cêñoßy†ê on 03 November, 2005, 05:06:59
Something to kill modem connections..
28.8Kbps/33.6Kbps/56Kbps

-- Modem connection killer bot 0.1
-- By: C??o?y?? 03.11.2005
-- Profilecheck on/off
-- Option to choose what should bot do (1/tempban 2/disconnect 3/inform OP's)
-- Option to set time for tempban (PtokaX 0.3.3.21f or newer)

Bot = "Connection_Checker" -- Botname
Time = 5 -- TimeBan time in minutes
ToDo = 1 -- What should bot do (1/tempban 2/disconnect 3/inform OP's)

ToCheck = {
[0] = 0, --Master 1/yes 0/no
[1] = 0, --Operator 1/yes 0/no
[2] = 1, --Vip 1/yes 0/no
[3] = 1, --Reg 1/yes 0/no
[4] = 0, --Moderator 1/yes 0/no
[5] = 0, --NetFounder 1/yes 0/no
[-1] = 1, --Unregistered 1/yes 0/no
}

MyINFOArrival = function(User,data)
if ToCheck[User.iProfile] == 1 then -- Profilecheck
if User.sConnection and string.find(User.sConnection,"28.8Kbps") or string.find(User.sConnection,"33.6Kbps") or string.find(User.sConnection,"56Kbps") then -- Checks connection
if ToDo == 1 then
SendToOps(Bot, ""..User.sName.." from IP "..User.sIP.." tembanned because Connection: "..User.sConnection) -- Message to OP's
User:SendData(Bot, "You have been Tempbanned for "..Time.." minutes because we dont allow Modem users. Found: "..User.sConnection) -- Message to user  
--User:TempBan(Time,"Bad connection: "..User.sConnection.."",Bot,0) -- Tempban (time,reason,by who,permanent(1/yes 0/no)) undo if using PtokaX 0.3.3.21f or newer
User:TempBan()
end
if ToDo == 2 then
SendToOps(Bot, ""..User.sName.." from IP "..User.sIP.." disconnected because Connection: "..User.sConnection)
User:SendData(Bot, "You have been disconnected because we dont allow Modem connections. Found: "..User.sConnection)  
User:Disconnect()
end
if ToDo == 3 then
SendToOps(Bot, ""..User.sName.." from IP "..User.sIP.." connected with Connection: "..User.sConnection)
end
end
end
end
Title:
Post by: Corayzon on 03 November, 2005, 05:17:14
Whats wrong with clients on connections that require modulating?
Title:
Post by: Dessamator on 03 November, 2005, 09:41:39
Maybe he doesnt like them.
Title:
Post by: Cêñoßy†ê on 03 November, 2005, 10:16:09
QuoteOriginally posted by Dessamator
Maybe he doesnt like them.
:P  hehe... nothing against them.. was only requested from me and tought to post it here :))