Author Topic: Clean main chat  (Read 1984 times)

0 Members and 1 Guest are viewing this topic.

Offline malhi

  • Junior Member
  • **
  • Posts: 17
  • Karma: +0/-1
Clean main chat
« on: 12 January, 2015, 14:58:00 »
HI
im using one Cleanmain chat script but it only clean at my end not the all users end, i want when i use command it should clear main chat for all users also not only at my end, how i can do that ? and which script i need to clean main chat ?

please help

PtokaX forum

Clean main chat
« on: 12 January, 2015, 14:58:00 »

Offline the-master

  • Triple Ace
  • **
  • Posts: 218
  • Karma: +10/-15
Re: Clean main chat
« Reply #1 on: 12 January, 2015, 21:57:27 »
Ptokax script? post it, see what we can do.
keep on sharing :)
dchub://kickincountryhub.no-ip.org

Offline malhi

  • Junior Member
  • **
  • Posts: 17
  • Karma: +0/-1
Re: Clean main chat
« Reply #2 on: 13 January, 2015, 02:04:48 »
--[[
   For new API
   
   HillyBilly   26 sept 07
   
   Took some bits and parts from
    CrazyGuy and American Idiot Lua 5.1.x and credits to them.
   
   28 sept 07   
   added Cleaners table who may or may not clean.   -   speedX
   
--]]

cmdClean = "cleanmain"
soapwater = 100 -- For more or less soap and water

tCleaners = {
      [-1] = 0,   -- Unreg Users
      
  • = 1,   -- Masters
  • [1] = 1,   -- Operators
          [2] = 0,   -- VIPs
          [3] = 0,   -- Regs
    }
          
    ChatArrival = function(User,Data)
       if tCleaners
[User.iProfile] == 1 then
      local _,_,cmd = string.find(Data, "%b<>%s%p(%S+)|")
      if cmd and (cmd == cmdClean) then
         local str = "\n\n"..string.rep("\t",3).." "..
            User.sNick.." is clearing Main Chat...  ???"..
            string.rep("\n",soapwater)..string.rep("\t",3).."Main Chat Has "..
            "Been Cleared By: "..User.sNick.."   ???\n\n"
            Core.SendToAll(str)
            return true
         else
            return "Clear Main Chat","",""
         end
      end
   end
   

Offline the-master

  • Triple Ace
  • **
  • Posts: 218
  • Karma: +10/-15
Re: Clean main chat
« Reply #3 on: 13 January, 2015, 17:15:34 »
script is running fine, try less soapwater, perhaps your flooding clients  :(
keep on sharing :)
dchub://kickincountryhub.no-ip.org

Offline the-master

  • Triple Ace
  • **
  • Posts: 218
  • Karma: +10/-15
Re: Clean main chat
« Reply #4 on: 13 January, 2015, 18:01:39 »
Only issue I found was a missing Bot.. some clients send those messages to kickbar, try this:
Code: [Select]
--[[
   For new API
   
   HillyBilly   26 sept 07
   Added Botname By The-Master 13 jan 2015
   Took some bits and parts from
    CrazyGuy and American Idiot Lua 5.1.x and credits to them.
   
   28 sept 07   
   added Cleaners table who may or may not clean.   -   speedX
   
--]]
Bot = "Whiper"
cmdClean = "cleanmain"
soapwater = 100 -- For more or less soap and water

tCleaners = {
      [-1] = 0,   -- Unreg Users
      [0] = 1,   -- Masters
  [1] = 1,   -- Operators
      [2] = 0,   -- VIPs
      [3] = 0,   -- Regs
}
     
ChatArrival = function(User,Data)
   if tCleaners[User.iProfile] == 1 then
      local _,_,cmd = string.find(Data, "%b<>%s%p(%S+)|")
      if cmd and (cmd == cmdClean) then
         local str = "<"..Bot..">\n\n"..string.rep("\t",3).." "..
            User.sNick.." is clearing Main Chat...  ???"..
            string.rep("\n",soapwater)..string.rep("\t",3).."Main Chat Has "..
            "Been Cleared By: "..User.sNick.."   ???\n\n"
            Core.SendToAll(str)
            return true
         else
            return "Clear Main Chat","",""
         end
      end
   end
keep on sharing :)
dchub://kickincountryhub.no-ip.org

Offline malhi

  • Junior Member
  • **
  • Posts: 17
  • Karma: +0/-1
Re: Clean main chat
« Reply #5 on: 14 January, 2015, 22:44:03 »
thanks working fine :D

Offline Cêñoßy†ê

  • Scripter
  • Triple Ace
  • ******
  • Posts: 190
  • Karma: +31/-3
Re: Clean main chat
« Reply #6 on: 07 May, 2015, 21:06:21 »
Couldnt resist to touch it little :P  here is my version  :yes:

Code: Lua
  1. --[[
  2.    For new API
  3.    
  4.    HillyBilly   26 sept 07
  5.    Added Botname By The-Master 13 jan 2015
  6.    Took some bits and parts from
  7.     CrazyGuy and American Idiot Lua 5.1.x and credits to them.
  8.    
  9.    28 sept 07  
  10.    added Cleaners table who may or may not clean.   -   speedX
  11.    
  12.   07.05.2015
  13.   Removed Cleaners table and made it work only for users with key.
  14.   Cleaned code little - Cêñoßy†ê
  15.    
  16. --]]
  17. Bot = "Whiper"
  18. cmdClean = "cleanmain"
  19. soapwater = 1000 -- For more or less soap and water
  20.      
  21. function ChatArrival(user,data)
  22.         if Core.GetUserData(user,11) then
  23.                 local _,_,cmd = data:find("%b<>%s%p(%S+)|")
  24.                 if cmd and cmd == cmdClean then
  25.                         local str = "<"..Bot..">\n\n"..string.rep("\t",3).." "..
  26.                         user.sNick.." is clearing Main Chat..."..
  27.                         string.rep("\n",soapwater)..string.rep("\t",3).."Main Chat Has "..
  28.                         "Been Cleaned By: "..user.sNick.."\n\n"
  29.                         return Core.SendToAll(str),true
  30.                 end
  31.         end
  32. end
***********************
Powered By Leviathan v5.2 ;)

PtokaX forum

Re: Clean main chat
« Reply #6 on: 07 May, 2015, 21:06:21 »