PtokaX forum

Archive => Archived 5.0 boards => Finished Scripts => Topic started by: -RICK- on 12 March, 2005, 20:50:41

Title: redirect users with a raw command
Post by: -RICK- on 12 March, 2005, 20:50:41
-- Lua 5
-- Redirect a user with a raw command By -RICK-
-- Raw to use (in your client) = $To: %[nick] From: %[mynick] $<%[mynick]> You are being rederected because: %[cheatingdescription]| <%[mynick]> !rederect %[nick]||
-- Don't Edit below this point if you don't now what you are doing       
----------------------------------------------------
sDefHub = "magmar.mine.nu"
sBot = "NoPorn"
---------------------------------------------------
function Main()
   frmHub:RegBot(sBot)
end
-------------------------------------------------

function ChatArrival(curUser, sData)
local s, e, cmd, sUser = string.find(sData,"%b<> (%S+) (%S+)%|$");
if(cmd == "!rederect") then
if (curUser.bOperator ~= nil) then
if (string.find(sUser, "[%c|\n\r]")) then
curUser:SendData(sBot, "didnt found a nick.")
else
local victim = GetItemByName(sUser)

if (victim ~= nil) then
victim:SendData(sBot, "redirecting you to another hub for sharing porn>>>> no porn allowed in this hub.<<<<|".."$ForceMove "..sDefHub.."|")
                SendToOps(sBot, curUser.sName..": removed: "..sUser.."  for sharing porn                                                                                                                                                                - <%[mynick]> is kicking %[nick] because:")
                  else
               curUser:SendData(sBot, "You aren't aloud to use this.")
  end
                        return 1;
  end
             end
         end
   end