Hi
This is part of the Dark Minds script, its a seperate file thats called at the start of the main script, the op connect part works, but the user connect bit doesn't, any ideas as to why?
----------------------------------------------------- - Function NewUser Connected - -----------------------------------------------------
----------------------------------
function NewUserConnected(curUser)
---------------------------------
curUser:SendData(BOTS_INFO)
if SendMotd == 1 then
readfrom(MTODU)
local message = ""
while 1 do
local line = read()
if line == nil then break
else
message = message..line.."\r\n"
end
end
curUser:SendData(message)
end
curUser:SendData(Bot,"Write "..Prefix.."help to see the commands..!")
curUser:SendData(Bot,"Hello "..curUser.sName.."..! Welcome to "..frmHub:GetHubName().." !!!")
local _,_, share = strfind(curUser.sMyInfoString,"$.*$(%d+)")
for a,b in BadShare do
if share == b then
Fake[curUser.sName] = (curUser.sName.." have a wierd share ("..share..")..! His ip is "..curUser.sIP)
SendToAll(curUser.sName.." have a wierd share ("..share..")..! His ip is "..curUser.sIP)
end
end
DoAddLogg(curUser)
handle2=openfile("Dark-Minds-offline/"..curUser.sName..".msg","r")
if (handle2==nil) then
else
line = read(handle2,"*a")
line=strsub(line,1,strlen(line)-1)
linearray=tokenize(line,"?")
for i=1,linearray.n do
curUser:SendPM(Bot,""..linearray.."")
end
closefile(handle2)
end
a,b=remove("Dark-Minds-offline/"..curUser.sName..".msg")
frmHub:EnableSearchData(1)
if( Kicked[curUser.sName] == 1 ) then
Kicked[curUser.sName] = nil
end
for i,v in Files do
curUser:SendData("$Search Hub:"..Bot.." F?F?0?1?"..i)
end
if userArray[curUser.sName]== 1 then
SendToAll(Bot,"The user "..curUser.sName.." is back in the hub AT: "..date("%d").."/"..date("%m").."-"..date("%Y").." KL: "..date("%T").." ..!")
userArray[curUser.sName] = nil
end
end
----------------------------------------------------- -Function Op ConnEcted - -----------------------------------------------------
-----------------------------
function OpConnected(curUser)
-----------------------------
SendToAll(BOTS_INFO)
handle2=openfile("Dark-Minds-offline/"..curUser.sName..".msg","r")
if (handle2==nil) then
else
line = read(handle2,"*a")
line=strsub(line,1,strlen(line)-1)
linearray=tokenize(line,"?")
for i=1,linearray.n do
curUser:SendPM(Bot,""..linearray.."")
end
closefile(handle2)
end
a,b=remove("Dark-Minds-offline/"..curUser.sName..".msg")
DoAddLogg(curUser)
if SendMotd == 1 then
readfrom(MTODOP)
local message = ""
while 1 do
local line = read()
if line == nil then break
else
message = message..line.."\r\n"
end
end
curUser:SendData(message)
end
local messages = random(1,10)
if messages == 1 then
SendToAll(Bot,"The lovely "..curUser.sName.." is here to make you sorry you were ever born...!")
elseif messages == 2 then
SendToAll(Bot,"Obey the rules... "..curUser.sName.." is here..!")
elseif messages == 3 then
SendToAll(Bot,""..curUser.sName.." is here to kick some (fakers)ass..!")
elseif messages == 4 then
SendToAll(Bot,""..curUser.sName.." has entered...! Turn on your slotblocker if you are sharing something unlegal ;-)..!")
elseif messages == 5 then
SendToAll(Bot," Lets dance to celibrate that "..curUser.sName.." is here... \o/ \\o o// \o/!")
elseif messages == 6 then
SendToAll(Bot,""..curUser.sName.." has landed. quack quack!!")
elseif messages == 7 then
SendToAll(Bot,"\r\n\r\n \\ ~ ~ //\r\n ( 0-0 )\r\n----oOO-------(_)--------------------------\r\nI "..curUser.sName.." I\r\n I Is in Da House! I\r\n-------------------oOO----------------------\r\n I__I__I\r\n I I I I\r\n nooO Ooo")
elseif messages == 8 then
SendToAll(Bot,""..curUser.sName.." has entered the hub! Fakers, get lost or he'll ban your ass!!")
elseif messages == 9 then
SendToAll(Bot,"Don't abondon the hope... Our savior "..curUser.sName.." has descent from heaven!")
elseif messages == 10 then
SendToAll(Bot,"The "..GetProfileName(curUser.iProfile).." "..curUser.sName.." is entering the hub..!")
end
if userArray[curUser.sName]== 1 then
SendToAll(Bot,"The user "..curUser.sName.." is back in the hub AT: "..date("%d").."/"..date("%m").."-"..date("%Y").." KL: "..date("%T").." ..!")
userArray[curUser.sName] = nil
end
end
----------------------------------------------------- - Function Logs Visits - -----------------------------------------------------
function DoAddLogg(curUser)
if chArray[curUser.sName] == nil then
chArray[curUser.sName] = 1
else
chArray[curUser.sName] = chArray[curUser.sName] + 1
end
if infoArray[curUser.sName] == nil then
infoArray[curUser.sName] = "Visit-"..chArray[curUser.sName].." Name: "..curUser.sName.." AT: "..date("%d").."/"..date("%m").."-"..date("%Y").." KL: "..date("%T").." Ip: "..curUser.sIP.."."
else
infoArray[curUser.sName] = infoArray[curUser.sName].."\r\n".."Visit-"..chArray[curUser.sName].." Name: "..curUser.sName.." AT: "..date("%d").."/"..date("%m").."-"..date("%Y").." KL: "..date("%T").." Ip: "..curUser.sIP.."."
end
end
----------------------------------------------------- - Function User Disconnects - -----------------------------------------------------
function UserDisconnected(curUser)
if Fake[curUser.sName] ~= nil then
Fake[curUser.sName] = nil
end
end
Twix
Can you uppload your hole script somwere so i can download it and see what is wrong ??
Try here (http://www.btinternet.com/~movieswet/darkmindfinal.update.rar)
Thnx for the fast response
Twix
It works for me ?
I have removed .. Search spam from dark mind ;)
I have removed Search spam from dark mind..
And ?ll commands works in pm an in main..
[DOWNLOAD] (http://213.113.240.234/Dark-Mind.rar)
My mistake, I added a piece of code to check for certain words in the DC clients description, i added a second function newuserconnet, and it appears that this was the problem, fixed now, sorry about that.
Twix