Dark Mind problem
 

News:

29 December 2022 - PtokaX 0.5.3.0 (20th anniversary edition) released...
11 April 2017 - PtokaX 0.5.2.2 released...
8 April 2015 Anti child and anti pedo pr0n scripts are not allowed anymore on this board!
28 September 2015 - PtokaX 0.5.2.1 for Windows 10 IoT released...
3 September 2015 - PtokaX 0.5.2.1 released...
16 August 2015 - PtokaX 0.5.2.0 released...
1 August 2015 - Crowdfunding for ADC protocol support in PtokaX ended. Clearly nobody want ADC support...
30 June 2015 - PtokaX 0.5.1.0 released...
30 April 2015 Crowdfunding for ADC protocol support in PtokaX
26 April 2015 New support hub!
20 February 2015 - PtokaX 0.5.0.3 released...
13 April 2014 - PtokaX 0.5.0.2 released...
23 March 2014 - PtokaX testing version 0.5.0.1 build 454 is available.
04 March 2014 - PtokaX.org sites were temporary down because of DDOS attacks and issues with hosting service provider.

Main Menu

Dark Mind problem

Started by Twix, 06 November, 2003, 12:44:32

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Twix

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


Tuben

Can you uppload your hole script somwere so i can download it and see what is wrong ??
-Dark-Mind-[ DOWNLOAD ]

Twix

Try here

Thnx for the fast response

Twix

Tuben

-Dark-Mind-[ DOWNLOAD ]

Tuben

I have removed .. Search spam from dark mind ;)
-Dark-Mind-[ DOWNLOAD ]

Tuben

I have removed Search spam from dark mind..
And ?ll commands works in pm an in main..

[DOWNLOAD]
-Dark-Mind-[ DOWNLOAD ]

Twix

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

SMF spam blocked by CleanTalk