hello
A want to disable !help i main
Anybody can help me?
Thank you!
Any script who have the command !help inside will disable the built in help. And for next version the stuf will be in the following way:
1. scripting commands have higher priority than textfiles
2. textfiles have higher priority than built-in commands
3. built-in commands take place if none of above overides it.
This is the only way to deactivate built in help.
you can take all scripts away, this !help is inside PtokaX hubbsoft. And a wanted Off
my problems is that error to krasch oDC++:
Runtime Error!
Program: C:\oDC\oDC.exe
This application has requsted the Runtime to terminate it in an unusual way.
Please contact the application's support for more information,
and that command really work's on other hub's not my :(
Thx....
I know this is more then what is nessisery to stop !help, but it is a good start for a script..
function DataArrival(tUser, sData)
if (strsub(sData, 1, 1) == "<" ) then
-- create a table
local tArgs = {}
-- Save sData in an array
tArgs = tHelpFunctions:GetArgs(sData)
-- Check if the user has used any of the hubprefixes
tArgs = tHelpFunctions:CheckIfHasPrefix(tArgs)
-- add sData as a variable to tArgs
tArgs.sData = sData
if tArgs.sPrefix then
tUser.SendMessage = tUser.SendData
local returnvalue = call(UserCommands[tArgs.sCmd],{UserCommands,tUser,tArgs}, "x", nil)
if returnvalue then
return returnvalue
else
return 0
end
else -- messages that isn't commands ends up here
end
end
end
tSettings = {
tCmdPrefixes = {"!","+","gs:","?","#","?"},
}
tHelpFunctions = {
CheckIfHasPrefix = function(self,tArgs)
sToCheck = tArgs.sCmd
local i
local err
for i = 1, getn(tSettings.tCmdPrefixes) do
if strsub(sToCheck, 1, strlen(tSettings.tCmdPrefixes[i])) == tSettings.tCmdPrefixes[i] then
tArgs.sCmd = strsub(sToCheck, strlen(tSettings.tCmdPrefixes[i])+1, strlen(sToCheck))
tArgs.sPrefix = tSettings.tCmdPrefixes[i]
break
end
end
return tArgs
end,
GetArgs = function(self,sData)
local tArgs = {}
_,_,sData = strfind(sData, "%b<>%s+(.+)|")
tArgs.sMessage = sData
sData = strlower(sData)
gsub(sData, "(%S+)", function (w) tinsert(%tArgs,w) end)
tArgs.sCmd = tArgs[1]
tremove(tArgs, 1)
return tArgs
end,
}
UserCommands = {
help = function(self, tUser, tArgs)-- for all users
-- Do your own help function here :)
return 1
end,
}
Nice one Skrollster, just a little hard to read ;)
alert:
Microsoft Visual C++ Runtime Library
You Wright !help in main in oDC++ and the client crasch!!!!
Somebody some have the same problems?
thx....
this is a client error, better ask around at the oDC++ forum or homepage (mail the creators)