Author Topic: redirect users with a raw command  (Read 1572 times)

0 Members and 1 Guest are viewing this topic.

Offline -RICK-

  • Member
  • ***
  • Posts: 40
  • Karma: +5/-0
redirect users with a raw command
« on: 12 March, 2005, 20:50:41 »
Code: [Select]
-- 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
« Last Edit: 27 February, 2006, 01:56:55 by bastya_elvtars »

PtokaX forum

redirect users with a raw command
« on: 12 March, 2005, 20:50:41 »