Author Topic: !clear function  (Read 2484 times)

0 Members and 1 Guest are viewing this topic.

Offline Spijker

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-1
!clear function
« on: 02 June, 2007, 11:31:28 »
Is it possible to get the !clear function working in Ptokax 0.3.6.0 with Lua 5.1?
We will update our hubsoft to this new ptokax but we need that function.
I hope someone can help me.
Thnx anyway

Spijker
 

PtokaX forum

!clear function
« on: 02 June, 2007, 11:31:28 »

Offline Psycho_Chihuahua

  • Systemspecialist IT
  • Emperor
  • **
  • Posts: 1 054
  • Karma: +112/-1
  • I am wherever i want to be
    • PtokaX Luaboard
Re: !clear function
« Reply #1 on: 02 June, 2007, 12:24:56 »
if you would have searched the forum you would have noticed a mainchat cleaner that works ;)

Code: [Select]
    --ScreenCleaner.lua 1.1 by yepyepyep4711 and ??????Hawk??????
    --!cls will wipe the main chat clean (does that remind you of something? ;) )
    --the command will be added to the rightclick menu of the OPs (optional)

CanDo = {
[0] = 1, -- Master
[1] = 1, -- Operator
[2] = 1, -- VIP
[3] = 0, -- Reg
[4] = 0, -- Moderator
[5] = 1, -- Netfounder
[-1] =0, -- User
}


function ChatArrival(curUser, sData)
    sData=string.sub(sData,1,string.len(sData)-1)
    local _,_,cmd = string.find(sData,"%b<>%s+(%S+)")
    if cmd and cmd=="!cls" and CanDo[curUser.iProfile] == 1 then
    SendToAll("Cleaner",string.rep("\r\n\r\n",2000))
return 1
end
end

function OpConnected(curUser)
    if CanDo[curUser.iProfile] == 1 then
    curUser:SendData("$UserCommand 255 7")
    curUser:SendData("$UserCommand 1 3 Clear Screen$<%[mynick]> !cls|")
    end
end
PtokaxWiki ?PtokaX Mirror + latest Libs

01100001011011000111001101101111001000000110101101101110011011110111011101101110001000000110000101110011001000000101010001101111011010110110111101101100011011110111001101101000

Offline Spijker

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-1
Re: !clear function
« Reply #2 on: 02 June, 2007, 14:55:39 »
Thnx Psycho_Chihuahua for youre support but that is not what I mean.
What I mean is the !clear function where you can clear users when they have been warned.
In our hub we use now Ptokax  0.3.3.21 but we want to update to the last one.
This is only possible if we have the !clear function work because we have a checker that warned users with old releases.

Spijker

Offline Psycho_Chihuahua

  • Systemspecialist IT
  • Emperor
  • **
  • Posts: 1 054
  • Karma: +112/-1
  • I am wherever i want to be
    • PtokaX Luaboard
Re: !clear function
« Reply #3 on: 02 June, 2007, 15:04:19 »
well then this thread --> http://forum.ptokax.org/index.php?topic=5935.0 <-- is probably what you were looking for. See what one finds when using the Search Function of this Forum  ;D
PtokaxWiki ?PtokaX Mirror + latest Libs

01100001011011000111001101101111001000000110101101101110011011110111011101101110001000000110000101110011001000000101010001101111011010110110111101101100011011110111001101101000

Offline Spijker

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-1
Re: !clear function
« Reply #4 on: 02 June, 2007, 15:23:34 »
I've been searching the forum also for what I'am looking for but can't find it.
The link you gave me is for clean all users at the same time.
What I'am looking for is cleaning a single user.
In the Ptokax witch we used now it is !clear <nick>
I hope you understand now what I'am looking for.
Thnx for you're support.

Spijker

Offline Spijker

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-1
Re: !clear function
« Reply #5 on: 02 June, 2007, 20:08:04 »
The strange thing is that if you do !shelp in Ptokax 0.3.6.0 with LUA 5.1 the function !clear is available.
Only this function don't work. You get the message "*** Command not available, it's being rewritten!".
Our hub runs now PtokaX 0.3.3.21 with LUA 5.02 and with Robocopv10.01e.
This is so far I know the latest version where the !clear <nick> function works.

Kevlin

PtokaX forum

Re: !clear function
« Reply #5 on: 02 June, 2007, 20:08:04 »