Daemon HMailer v2 by Phatty - Page 2
 

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

Daemon HMailer v2 by Phatty

Started by pHaTTy, 28 March, 2004, 09:11:44

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

UwV?

#25
will test it first thing tommorow :0)

i have already send all users the next message earlyer ..


@hmail username welcome

____________   new @ Space-Network.. SpaceMail  !!________________

   why? because it is FUN   :0)

   For who? ..    for ALL!!
   How much?    for FREE !!

   The commands ?

--  @hmail    - Send a message to a user
--  @send          - Confirm the message to be sent from outbox!
--  @read             - Lists your inbox
--  @read       - Reads a message from inbox!
--  @del       - Delete a message from inbox!
--  @help             - This  stupid help!

               ALL commands must be send to this mailbot in a PM ..  

    N.B.
    MinD The CaSE ...  mail to 'uWv'  will not arrive to me ..
    mail to: "UwV" will ..    
_____________________________________________________________

   p.s.
    Little bugs are still in the script ..
    like.. maybe you noticed you see you have 1 mail but your inbox total will say 0


so all you little buggies be awared.. for the motto is :
we will, we will,...  catch you! , catch you! ;)  
 
Music = Love
                              &
                   plop rulez
                          (feed [en]danger[ed][ous] things so they will grow!!)  

spurlos

char case in nick name cause a problem.
If message was send to "spUrloS", spurlos receive confirmation of message recieve, but if try to read message it say, that is no new messages..
i add strlower function on any user var..

example:

function NewUserConnected(user)

   if Inbox[strlower(user.sName)] then
      local sumit = 0



and so on..

UwV?

Who's fastest ?
Phatty is ! ..  ....  ;0)
Music = Love
                              &
                   plop rulez
                          (feed [en]danger[ed][ous] things so they will grow!!)  

jsjen

Im running robocop should I change this to gekko?

I just get errors

pHaTTy

little update, fixed some bugs and added massmail for ppl that have accounts will receive only

--//Mail Bot by Phatty v2.04.5
--//Please dont remove credits, you may use in you script package as loing as u follow the conditions
--//This bot comes as is...
--//Credits must be given...
--//Give me more time i got more commands to ad :-P
--//date variable prob found by spurlos corrected
--//Spurlos - bot email, desc, speed and share added, some debbugging - yepyepyep4711 28/04/2004 --//Obselete, no tabs retabbed and redone-Phatty
--//GRRRRRR RETABBED!!!! for debugging - Phatty
--//Fixed and added tablefile check -- // Phatty
--//Fixed Nick trick --//Phatty
--//Fixed few bugs and added massmail   -- // Phatty



Mail = "-HotMail-" -- // BotNAme
mcmd = "!" -- // Command prefix


MaxMails = 10; -- // Max mail per user

HMailAdmin = {"phatty","someoneelse","maybesomeoneelse"}

MailsMail = "me@hubmail.hub" 
MailSpeed = "SnailMail"
MailDesc = "!help as pm for the help"  


filecheckx = openfile("table.txt", "r")
if filecheckx then
	assert(dofile("table.txt"))
else
	Inbox = {}
end
closefile(filecheckx)


function Main()
	Outbox = {}
	frmHub:UnregBot(Mail)
	frmHub:RegBot(Mail)
	MailInfoString = "$MyINFO $ALL "..Mail.." "..MailDesc.."$ $"..MailSpeed..strchar(1).."$"..MailsMail.."$".."0".."$" 
end


function OnExit()
	save() -- // Save mails b4 script totally clears memory
end

OpConnected = NewUserConnected; function NewUserConnected(user)
	user:SendData(MailInfoString)

	if Inbox[user.sName] then
		local sumit = 0;
		for i,v in Inbox[user.sName] do
			sumit = sumit + 1;
			user:SendPM(Mail,"You have "..sumit.." message(s) - type !read to learn more")
			break; end
		local sumit = 0;
	end;
end;


function Error(user,arg,arg2,msg,date1)
	if nil == arg or "" == arg then
		arg = "Please enter a user to send to!"
	end;
	if nil == arg2 or "" == arg2 then
		arg2 = "Please enter a hmail name!"
	end
	if nil == msg or "" == msg then
		msg = "Please enter a message to send!"
	end
	if nil == date1 then
		date1 = "unknown"
	end
	local tmp = "\r\n\r\n"
	tmp = tmp.."\tTo: "..arg.."\r\n"
	tmp = tmp.."\tDate/Time: "..date1.."\r\n"
	tmp = tmp.."\tThread: "..arg2.."\r\n"
	tmp = tmp.."\tMessage: "..msg.."\r\n"

	user:SendPM(Mail,tmp)
	return 1;
end;



function DataArrival(user,data)
	if strsub(data, 1, 5) == "$To: " then
		local s,e,whoto,from,data = strfind(data, "$To:%s+(%S+)%s+From:%s+(%S+)%s+(.*)") 
		local s,e,data = strfind(data, "%S+>(.*)") -- // old becomes obselete
		
		if Mail == whoto then
			data=strsub(data,1,strlen(data)-1) 
			local s,e,cmd = strfind(data,"(%S+)") 
			if cmd == mcmd.."hmail" then
				local loweruser = strlower(user.sName)
				--arg = "Please enter a user to send it to!"
				local s,e,arg,arg2,msg = strfind(data,"%s+%S+%s+(%S+)%s+(%S+)%s+(.*)")
				if nil == arg or nil == arg2 or nil == msg then
					user:SendPM(Mail,"Syntax: "..mcmd.."hmail usersnick msgname message")
					return 1;
				end
				local arg = strlower(arg)
				Error(user,arg,arg2,msg,date())
				Outbox[loweruser] = {arg2,msg,arg,date()}
				user:SendPM(Mail,"Confirm and send by typing !send")
				return 1;
			elseif cmd == mcmd.."send" then
				local loweruser = strlower(user.sName)
				towho = Outbox[loweruser][3]
				mail = Outbox[loweruser][2]
				thread = Outbox[loweruser][1]
				date1 = Outbox[loweruser][4]
				towho = strlower(towho)
				if Inbox[towho] then
					local count = 0;
					for i,v in Inbox[towho] do
						count = count + 1;
					end;
					if count < MaxMails then
						Inbox[towho][thread] = {loweruser,mail,date1}
					else
						local thread = "inboxfull"
						Inbox[towho][thread] = {"HubMaster","You have reached your inbox limit, please delete some hmails",date()}
						user:SendPM(Mail,"Sorry the user you tried to mail has not enough room to recieve the mail, please try again soon")
						return 1;
					end;
				else
					Inbox[towho] = {}
					Inbox[towho][thread] = {loweruser,mail,date1}
				end
				user:SendPM(Mail,"Message has been confirmed and sent")
				if GetItemByName(towho) then
					item = GetItemByName(towho)
					item:SendPM(Mail,"You have received a hmail from: "..user.sName..", type !read "..thread.." to view it")
				end
			elseif cmd == mcmd.."read" then
				local loweruser = strlower(user.sName)
				if Inbox[loweruser] then
					local s,e,arg,argx = strfind(data,"(%S+)%s+(%S+)")
					if argx == nil then
						user:SendPM(Mail,"Message Names are as follows:")
						local sumit = 0;
						for i,v in Inbox[loweruser] do
							sumit = sumit + 1;
							user:SendPM(Mail,sumit.." - "..i)
						end;
						local sumit = 0;
						user:SendPM(Mail,"Syntax: !read ")
					elseif Inbox[loweruser][argx] then
						local dFrom = Inbox[loweruser][argx][1]
						local dMessage = Inbox[loweruser][argx][2]
						local dDate = Inbox[loweruser][argx][3]
						ShowMail(user,dFrom,argx,dMessage,dDate)
					else
						user:SendPM(Mail,"Message Names are as follows:")
						local sumit = 0
						for i,v in Inbox[loweruser] do
							sumit = sumit + 1;
							user:SendPM(Mail,sumit.." - "..i)
						end;
						local sumit = 0;
						user:SendPM(Mail,"Syntax: !read ")
					end;
				else
					user:SendPM(Mail,"You have 0 Mail")
				end
			elseif cmd == mcmd.."del" then
				local loweruser = strlower(user.sName)
				if Inbox[loweruser] then
					local s,e,arg,argx = strfind(data,"(%S+)%s+(%S+)")
					if argx == nil then
						user:SendPM(Mail,"What do you want to erase?")
					elseif Inbox[loweruser][argx] then
						Inbox[loweruser][argx] = {}
						Inbox[loweruser][argx] = nil
						user:SendPM(Mail,"Succesfully deleted: "..argx.." from your inbox!")
					else
						user:SendPM(Mail,"Message Names are as follows:")
						for i,v in Inbox[loweruser] do
							user:SendPM(Mail,i)
						end;
						user:SendPM(Mail,"Syntax: !read ")
					end;
				else
					user:SendPM(Mail,"You have 0 Mail")
				end
			elseif cmd == mcmd.."help" then
				local tmp = "\r\n\r\n"
				tmp = tmp.."\t!hmail    - Send a message to a user\r\n"
				tmp = tmp.."\t!send - Confirm the message to be sent from outbox!\r\n"
				tmp = tmp.."\t!read - Lists your inbox\r\n"
				tmp = tmp.."\t!read  - Reads a message from inbox!\r\n"
				tmp = tmp.."\t!del  - Delete a message from inbox!\r\n"
				tmp = tmp.."\t!help - This help stupid!\r\n"
				user:SendPM(Mail,tmp)
			elseif cmd == mcmd.."massmail" then
				if HMailAdmin[user.sName] then
					local s,e,arg,msg = strfind(data,"%s+%S+%s+(%S+)%s+(.*)") -- // messagename/message
					if nil == arg or nil == msg then
						user:SendPM(Mail,"Syntax: "..mcmd.."massmail msgname message")
						return 1;
					end
					Error(user,"All users",arg,msg,date())
					for muh,hah in Inbox do
						Inbox[muh][arg] = {strlower(user.sName),msg,date()}
						SendPmToNick(Inbox[muh][arg],Mail,"You have received a mass hmail from: "..user.sName..", type !read "..arg.." to view it")
					end;
					user:SendPM(Mail,"MassHMail successfully delivered to all known hmail accounts")
				else
					user:SendPM(Mail,"You do not own a HMailAdmin account")
				end;

			-- // elseif cmd == mcmd.."reply" then
			-- // 	This is invalid
			-- // 	if Inbox[user.sName] then
			-- // 		local s,e,arg,arg2,msg = strfind(data,"%s+%S+%s+(%S+)%s+(%S+)%s+(.*)")
			-- // 		if arg2 == nil then
			-- // 			user:SendPM(Mail,"What do you want to erase?")
			-- // 		elseif msg == nil then
			-- // 			user:SendPM(Mail,"Send What??")
			-- // 		else
			-- // 			Error(user,arg,arg2,msg)
			-- // 			Outbox[user.sName] = {arg2,msg,arg,"Not Implemented"}
			-- // 			user:SendPM(Mail,"Confirm and send by typing !send")
			-- // 		end;
			-- // 	end;
end;	end;	end;	end;

function ShowMail(user,arg,arg2,msg,date1)
	local tmp = "\r\n\r\n"
	tmp = tmp.."\tFrom: "..arg.."\r\n"
	tmp = tmp.."\tTime/Date: "..date1.."\r\n"
	tmp = tmp.."\tThread: "..arg2.."\r\n"
	tmp = tmp.."\tMessage: "..msg.."\r\n"
	user:SendPM(Mail,tmp)
	return 1;
end;

function save()
	writeto("table.txt")
	write("Inbox = {\n")
	for a,b in Inbox do
	write("\t[\""..a.."\"] = {\n")
	for c,d in Inbox[a] do
		write("\t\t[\""..c.."\"] = {")
		for e,f in Inbox[a][c] do
			write("\""..f.."\",")
		end;
		write("},\n")
	end;
	write("\t},\n")
	end;
	write("}")
	writeto()
end;
Resistance is futile!

jsjen

ok ok I give up

what files should I have to run this script?
I have ptokax3.2.6 td4 and the hotmail.lua and table.txt

I had to create table.txt myself (I thought that must have been right cause the error stops)

I then do this

[17:25] !hmail sid testing sending a test message
[17:25] <-HotMail->

   To: sid
   Date/Time: 05/17/04 17:25:05
   Thread: testing
   Message: sending a test message

[17:25] <-HotMail-> Confirm and send by typing !send
[17:25] !send


then it doesnt send?????

whats missing?????? please :(

pHaTTy

hmmm well how many users in hub seems to slow the sending down....so give it some time, and dont restat scripts, remember td4 wont save the mail on reboot, i will add forcesave command for td4
Resistance is futile!

jsjen

Syntax Error: attempt to index global `Inbox' (a nil value)
Syntax Error: attempt to index global `Inbox' (a nil value)
Syntax Error: attempt to index global `Inbox' (a nil value)
Syntax Error: attempt to index global `Inbox' (a nil value)
Syntax Error: attempt to index global `Inbox' (a nil value)
Syntax Error: attempt to index global `Inbox' (a nil value)
Syntax Error: attempt to index global `Inbox' (a nil value)
Syntax Error: attempt to index global `Inbox' (a nil value)
Syntax Error: attempt to index global `Inbox' (a nil value)
Syntax Error: attempt to index global `Inbox' (a nil value)
Syntax Error: attempt to index global `Inbox' (a nil value)
Syntax Error: attempt to index global `Inbox' (a nil value)
Syntax Error: attempt to index global `Inbox' (a nil value)
Syntax Error: attempt to index global `Inbox' (a nil value)
Syntax Error: attempt to index global `Inbox' (a nil value)
Syntax Error: attempt to index global `Inbox' (a nil value)
Syntax Error: attempt to index global `Inbox' (a nil value)
Syntax Error: attempt to index global `Inbox' (a nil value)
Syntax Error: attempt to index global `Inbox' (a nil value)
Syntax Error: attempt to index global `Inbox' (a nil value)
Syntax Error: attempt to index global `Inbox' (a nil value)
Syntax Error: attempt to index global `Inbox' (a nil value)


this is after waiting 15 minutes. I dont understand it.

pHaTTy

hmm ok lets try inbox in function then

--//Mail Bot by Phatty v2.04.5
--//Please dont remove credits, you may use in you script package as loing as u follow the conditions
--//This bot comes as is...
--//Credits must be given...
--//Give me more time i got more commands to ad :-P
--//date variable prob found by spurlos corrected
--//Spurlos - bot email, desc, speed and share added, some debbugging - yepyepyep4711 28/04/2004 --//Obselete, no tabs retabbed and redone-Phatty
--//GRRRRRR RETABBED!!!! for debugging - Phatty
--//Fixed and added tablefile check -- // Phatty
--//Fixed Nick trick --//Phatty
--//Fixed few bugs and added massmail   -- // Phatty



Mail = "-HotMail-" -- // BotNAme
mcmd = "!" -- // Command prefix


MaxMails = 10; -- // Max mail per user

HMailAdmin = {"phatty","someoneelse","maybesomeoneelse"}

MailsMail = "me@hubmail.hub" 
MailSpeed = "SnailMail"
MailDesc = "!help as pm for the help"  



function Main()
	local filecheckx = openfile("table.txt", "r")
	if filecheckx then
		assert(dofile("table.txt"))
	else
		Inbox = {}
	end
	closefile(filecheckx)

	Outbox = {}

	frmHub:UnregBot(Mail)
	frmHub:RegBot(Mail)

	MailInfoString = "$MyINFO $ALL "..Mail.." "..MailDesc.."$ $"..MailSpeed..strchar(1).."$"..MailsMail.."$".."0".."$" 
end


function OnExit()
	save() -- // Save mails b4 script totally clears memory
end

OpConnected = NewUserConnected; function NewUserConnected(user)
	user:SendData(MailInfoString)

	if Inbox[user.sName] then
		local sumit = 0;
		for i,v in Inbox[user.sName] do
			sumit = sumit + 1;
			user:SendPM(Mail,"You have "..sumit.." message(s) - type !read to learn more")
			break; end
		local sumit = 0;
	end;
end;


function Error(user,arg,arg2,msg,date1)
	if nil == arg or "" == arg then
		arg = "Please enter a user to send to!"
	end;
	if nil == arg2 or "" == arg2 then
		arg2 = "Please enter a hmail name!"
	end
	if nil == msg or "" == msg then
		msg = "Please enter a message to send!"
	end
	if nil == date1 then
		date1 = "unknown"
	end
	local tmp = "\r\n\r\n"
	tmp = tmp.."\tTo: "..arg.."\r\n"
	tmp = tmp.."\tDate/Time: "..date1.."\r\n"
	tmp = tmp.."\tThread: "..arg2.."\r\n"
	tmp = tmp.."\tMessage: "..msg.."\r\n"

	user:SendPM(Mail,tmp)
	return 1;
end;



function DataArrival(user,data)
	if strsub(data, 1, 5) == "$To: " then
		local s,e,whoto,from,data = strfind(data, "$To:%s+(%S+)%s+From:%s+(%S+)%s+(.*)") 
		local s,e,data = strfind(data, "%S+>(.*)") -- // old becomes obselete
		
		if Mail == whoto then
			data=strsub(data,1,strlen(data)-1) 
			local s,e,cmd = strfind(data,"(%S+)") 
			if cmd == mcmd.."hmail" then
				local loweruser = strlower(user.sName)
				--arg = "Please enter a user to send it to!"
				local s,e,arg,arg2,msg = strfind(data,"%s+%S+%s+(%S+)%s+(%S+)%s+(.*)")
				if nil == arg or nil == arg2 or nil == msg then
					user:SendPM(Mail,"Syntax: "..mcmd.."hmail usersnick msgname message")
					return 1;
				end
				local arg = strlower(arg)
				Error(user,arg,arg2,msg,date())
				Outbox[loweruser] = {arg2,msg,arg,date()}
				user:SendPM(Mail,"Confirm and send by typing !send")
				return 1;
			elseif cmd == mcmd.."send" then
				local loweruser = strlower(user.sName)
				towho = Outbox[loweruser][3]
				mail = Outbox[loweruser][2]
				thread = Outbox[loweruser][1]
				date1 = Outbox[loweruser][4]
				towho = strlower(towho)
				if Inbox[towho] then
					local count = 0;
					for i,v in Inbox[towho] do
						count = count + 1;
					end;
					if count < MaxMails then
						Inbox[towho][thread] = {loweruser,mail,date1}
					else
						local thread = "inboxfull"
						Inbox[towho][thread] = {"HubMaster","You have reached your inbox limit, please delete some hmails",date()}
						user:SendPM(Mail,"Sorry the user you tried to mail has not enough room to recieve the mail, please try again soon")
						return 1;
					end;
				else
					Inbox[towho] = {}
					Inbox[towho][thread] = {loweruser,mail,date1}
				end
				user:SendPM(Mail,"Message has been confirmed and sent")
				if GetItemByName(towho) then
					item = GetItemByName(towho)
					item:SendPM(Mail,"You have received a hmail from: "..user.sName..", type !read "..thread.." to view it")
				end
			elseif cmd == mcmd.."read" then
				local loweruser = strlower(user.sName)
				if Inbox[loweruser] then
					local s,e,arg,argx = strfind(data,"(%S+)%s+(%S+)")
					if argx == nil then
						user:SendPM(Mail,"Message Names are as follows:")
						local sumit = 0;
						for i,v in Inbox[loweruser] do
							sumit = sumit + 1;
							user:SendPM(Mail,sumit.." - "..i)
						end;
						local sumit = 0;
						user:SendPM(Mail,"Syntax: !read ")
					elseif Inbox[loweruser][argx] then
						local dFrom = Inbox[loweruser][argx][1]
						local dMessage = Inbox[loweruser][argx][2]
						local dDate = Inbox[loweruser][argx][3]
						ShowMail(user,dFrom,argx,dMessage,dDate)
					else
						user:SendPM(Mail,"Message Names are as follows:")
						local sumit = 0
						for i,v in Inbox[loweruser] do
							sumit = sumit + 1;
							user:SendPM(Mail,sumit.." - "..i)
						end;
						local sumit = 0;
						user:SendPM(Mail,"Syntax: !read ")
					end;
				else
					user:SendPM(Mail,"You have 0 Mail")
				end
			elseif cmd == mcmd.."del" then
				local loweruser = strlower(user.sName)
				if Inbox[loweruser] then
					local s,e,arg,argx = strfind(data,"(%S+)%s+(%S+)")
					if argx == nil then
						user:SendPM(Mail,"What do you want to erase?")
					elseif Inbox[loweruser][argx] then
						Inbox[loweruser][argx] = {}
						Inbox[loweruser][argx] = nil
						user:SendPM(Mail,"Succesfully deleted: "..argx.." from your inbox!")
					else
						user:SendPM(Mail,"Message Names are as follows:")
						for i,v in Inbox[loweruser] do
							user:SendPM(Mail,i)
						end;
						user:SendPM(Mail,"Syntax: !read ")
					end;
				else
					user:SendPM(Mail,"You have 0 Mail")
				end
			elseif cmd == mcmd.."help" then
				local tmp = "\r\n\r\n"
				tmp = tmp.."\t!hmail    - Send a message to a user\r\n"
				tmp = tmp.."\t!send - Confirm the message to be sent from outbox!\r\n"
				tmp = tmp.."\t!read - Lists your inbox\r\n"
				tmp = tmp.."\t!read  - Reads a message from inbox!\r\n"
				tmp = tmp.."\t!del  - Delete a message from inbox!\r\n"
				tmp = tmp.."\t!help - This help stupid!\r\n"
				user:SendPM(Mail,tmp)
			elseif cmd == mcmd.."massmail" then
				if HMailAdmin[user.sName] then
					local s,e,arg,msg = strfind(data,"%s+%S+%s+(%S+)%s+(.*)") -- // messagename/message
					if nil == arg or nil == msg then
						user:SendPM(Mail,"Syntax: "..mcmd.."massmail msgname message")
						return 1;
					end
					Error(user,"All users",arg,msg,date())
					for muh,hah in Inbox do
						Inbox[muh][arg] = {strlower(user.sName),msg,date()}
						SendPmToNick(Inbox[muh][arg],Mail,"You have received a mass hmail from: "..user.sName..", type !read "..arg.." to view it")
					end;
					user:SendPM(Mail,"MassHMail successfully delivered to all known hmail accounts")
				else
					user:SendPM(Mail,"You do not own a HMailAdmin account")
				end;

			-- // elseif cmd == mcmd.."reply" then
			-- // 	This is invalid
			-- // 	if Inbox[user.sName] then
			-- // 		local s,e,arg,arg2,msg = strfind(data,"%s+%S+%s+(%S+)%s+(%S+)%s+(.*)")
			-- // 		if arg2 == nil then
			-- // 			user:SendPM(Mail,"What do you want to erase?")
			-- // 		elseif msg == nil then
			-- // 			user:SendPM(Mail,"Send What??")
			-- // 		else
			-- // 			Error(user,arg,arg2,msg)
			-- // 			Outbox[user.sName] = {arg2,msg,arg,"Not Implemented"}
			-- // 			user:SendPM(Mail,"Confirm and send by typing !send")
			-- // 		end;
			-- // 	end;
end;	end;	end;	end;

function ShowMail(user,arg,arg2,msg,date1)
	local tmp = "\r\n\r\n"
	tmp = tmp.."\tFrom: "..arg.."\r\n"
	tmp = tmp.."\tTime/Date: "..date1.."\r\n"
	tmp = tmp.."\tThread: "..arg2.."\r\n"
	tmp = tmp.."\tMessage: "..msg.."\r\n"
	user:SendPM(Mail,tmp)
	return 1;
end;

function save()
	writeto("table.txt")
	write("Inbox = {\n")
	for a,b in Inbox do
	write("\t[\""..a.."\"] = {\n")
	for c,d in Inbox[a] do
		write("\t\t[\""..c.."\"] = {")
		for e,f in Inbox[a][c] do
			write("\""..f.."\",")
		end;
		write("},\n")
	end;
	write("\t},\n")
	end;
	write("}")
	writeto()
end;
Resistance is futile!

jsjen

Syntax Error: attempt to index global `Inbox' (a nil value)

still the same error!

This came up aswell after 35 minutes

Syntax Error: bad argument #1 to `strfind' (string expected, got nil)

How can i help you work out the answer?

We really would like this to work.

pHaTTy

QuoteOriginally posted by jsjen
Syntax Error: attempt to index global `Inbox' (a nil value)

still the same error!

This came up aswell after 35 minutes

Syntax Error: bad argument #1 to `strfind' (string expected, got nil)

How can i help you work out the answer?

We really would like this to work.

try diable other scripts until ya have tested and if works tell me, and maybe i come by hub and take a look =)
Resistance is futile!

Inflictor

Nice one Phatty Keep those scripts coming

 8)



Laterzzzzzz :o)
Devils Designs Web Templates, Forum Templates, Downloads are free[/color][/url]

jsjen

#37
I GOT IT. lol I sat and read the script for about 2 hours trying to work out what was going on.

and this was the key (lol)

function Main()
   local filecheckx = openfile("table.txt", "r")
   if filecheckx then
      assert(dofile("table.txt"))
   else
      Inbox = {}
   end
   closefile(filecheckx)

   Outbox = {}

in the table.txt I had to put Inbox = {} and Outbox = {}

is there anything else that is meant to be in that file?

are there meant to be other files apart from the -hotmail-.lua and table.txt



 I love it thanks mate

pHaTTy

yeh just Inbox, outbox is in script as its only temp storage for user
Resistance is futile!

jsjen

I was wondering. if they message were meant to be saved to the txt file

[NL]trucker

jsjen


i,m not sure if it is the meaning that the messages got saved to a txt file but it sure looks like it :-)


function save()
	writeto("table.txt")
	write("Inbox = {\n")
	for a,b in Inbox do
	write("\t[\""..a.."\"] = {\n")
	for c,d in Inbox[a] do
		write("\t\t[\""..c.."\"] = {")
		for e,f in Inbox[a][c] do
			write("\""..f.."\",")
		end;
		write("},\n")
	end;
	write("\t},\n")
	end;
	write("}")
	writeto()

but what i didnt saw was that the message was removed iafter they are read or that the mailbox was flushed after an certain period of time.

this looks something that needs looking after because if your users mail a lot  you get a huge filedatabase .
Owner of FunnyHub
 
Funyhub.no-ip.info
       Forum Master of


[NL]trucker

hmmm after reading the script a bit more carefull i noticed
a maximum amount of mails users can receive it was set to 10 after that when someone tries to mail that user
he gets a message that his mailbox was fulland the message couldnt be send :-) [nice work phatty]

and if i,m correct the users who mailbox was full gets a message that he needs to clean his messagebox.
Owner of FunnyHub
 
Funyhub.no-ip.info
       Forum Master of


SMF spam blocked by CleanTalk