OpChat++ - Page 5
 

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

OpChat++

Started by jiten, 01 April, 2005, 13:53:24

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Dessamator

QuoteOriginally posted by Krysalis
ah...then i know...and now i know also my ProfileNrs....but dont know the right way to find aut which profile is which profile nr.
Can u exlain me this? I would not only bring this to work, i try to understand...but i dont find anything where i can read which Profile has which nr.
Find out with Upgrade script from madman, but this can?t be the right way *g*

Greets

try this :
function Main()
	for i,v in GetProfiles() do	
		SendToAll("Profile Name: "..v.."\t\Profile Number : "..GetProfileIdx(v))
	end
	
end


it should show you all ur profile names and the corresponding profile numbers
Ignorance is Bliss.

jiten

QuoteOriginally posted by Krysalis
ah...then i know...and now i know also my ProfileNrs....but dont know the right way to find aut which profile is which profile nr.
Can u exlain me this? I would not only bring this to work, i try to understand...but i dont find anything where i can read which Profile has which nr.
Find out with Upgrade script from madman, but this can?t be the right way *g*

Greets
Check Dessamator's post ;)
QuoteThats cool. Can i update with change only some parts?
Or are there more changes?
Well, delete the arrOpLevel table and replace your Refresh() function with this one:
Refresh = function() 
	local i,usr
	for i,usr in frmHub:GetOperators() do
		usr = usr.sNick
		if (arrLog[usr] == nil) then 
			arrLog[usr] = {} 
			if (GetItemByName(usr) == nil) then 
				arrLog[usr]["Mode"] = "offline" 
			else 
				arrLog[usr]["Mode"] = "online" 
			end 
			arrLog[usr]["Talk"] = "" 
		elseif (GetItemByName(usr) == nil) then		
			arrLog[usr]["Mode"] = "offline" 
		else 
			arrLog[usr]["Mode"] = "online" 
		end 
	end 
	SaveToFile(sFolder.."/"..fLog , arrLog , "arrLog") 
end
Best regards

Krysalis

#102
Have a urgend wish ;-)
It is to realize to enter adreeses with spacedirs with +add. Maybe with a Special  signed start and end.

As this

+add [Rolling Stones] ftp://00.00.00.00/  / / /  t@/  /

If i typed in this add the moment entry will only be

[Rolling
Stones]
Addy by Krysalis at Date

Would be have like this
[Rolling Stones]
ftp://00.00.00.00/  / / /  t@/  /

Is this possible in any way, jiten?

jiten

QuoteOriginally posted by Krysalis
Have a urgend wish ;-)
It is to realize to enter adreeses with spacedirs with +add. Maybe with a Special  signed start and end.

As this

+add [Rolling Stones] ftp://00.00.00.00/  / / /  t@/  /

If i typed in this add the moment entry will only be

[Rolling
Stones]
Addy by Krysalis at Date

Would be have like this
[Rolling Stones]
ftp://00.00.00.00/  / / /  t@/  /

Is this possible in any way, jiten?
Yes, it is. Last script updated.
Btw, change your add function to this:
["add"]	=	function(user,data)
						local s,e,rel,desc = string.find(data, "%b<>%s+%S+%s+(.*)%s+(ftp+.*)")
						if rel == nil or desc == nil then
							user:SendData(sBot,"*** Error: Type +add  
") else table.insert( Releases, { user.sName, rel, desc, os.date(), } ) SaveToFile(sFolder.."/"..fRelease,Releases,"Releases") SendToAll(sBot, user.sName.." added a new Address: "..rel..". For more details type: +read") end end,
Best regards

Krysalis

you are the best ;-)

Greets

Krysalis

Sorry for taking your time again....why i can change this that only Invitet users can see. no ops and uninvitet.

SendPmToOps(sOpChat, ""..nick.." 's wurde ausgeladen von Master "..user.sName)

and
SendToAll(sBot, user.sName.."  hat : "..rel.." eingetragen")


Please help;-)

jiten

Try using this:
for usr, aux in arrInvite do 
	if (GetItemByName(usr) ~= nil) then 
		SendToNick(GetItemByName(usr).sName, "$To: "..GetItemByName(usr).sName.." From: "..x.." $<"..x.."> "msg".") 
	end 
end
Where "x" is the sender's nick (sOpChat or sBot) and "msg" is the message sent to them.

Best regards

Krysalis

Many thanx, m8. Now i got it ;-)

Krysalis

#108
["add"]	=	function(user,data)
						local s,e,rel,desc = string.find(data, "%b<>%s+%S+%s+(.*)%s+(ftp+.*)")
						if rel == nil or desc == nil then
							user:SendData(sBot,"*** Error: Schreibe +add  ")
						else
							table.insert( Releases, { user.sName, rel, desc, os.date(), } )
							SaveToFile(sFolder.."/"..fRelease,Releases,"Releases")
						for usr, aux in arrInvite do 
						if (GetItemByName(usr) ~= nil) then 
		SendToNick(GetItemByName(usr).sName, "$To: "..GetItemByName(usr).sName.." From: "..sBot.." $<"..sBot.."> "Es wurde was neues eingetragen".") 
	end 
			end,


i don?t get it:( can you help me pleas??

Greets

jiten

Try this one:
["add"]	=	function(user,data)
			local s,e,rel,desc = string.find(data, "%b<>%s+%S+%s+(.*)%s+(ftp+.*)")
			if rel == nil or desc == nil then
				user:SendData(sBot,"*** Error: Schreibe +add  ")
			else
				table.insert( Releases, { user.sName, rel, desc, os.date(), } )
				SaveToFile(sFolder.."/"..fRelease,Releases,"Releases")
				for usr, aux in arrInvite do 
					if (GetItemByName(usr) ~= nil) then 
						SendToNick(GetItemByName(usr).sName, "$To: "..GetItemByName(usr).sName.." From: "..sBot.." $<"..sBot.."> Es wurde was neues eingetragen.") 
					end
				end
			end 
		end,

Cheers

Krysalis

Now its the Final Versio for me really. I thank you for your time you spend to help me :)

Greets

jiten

QuoteOriginally posted by Krysalis
Now its the Final Versio for me really. I thank you for your time you spend to help me :)

Greets
I'm really glad to know that it's the way you expected it to be :))

Cheers

kunal

[17:03] Syntax E:\pto\scripts\op++.lua:51: attempt to index field `?' (a nil value)
[17:03] Syntax E:\pto\scripts\op++.lua:47: attempt to index field `?' (a nil value)

i get this error
pls help

jiten

QuoteOriginally posted by kunal
[17:03] Syntax E:\pto\scripts\op++.lua:51: attempt to index field `?' (a nil value)
[17:03] Syntax E:\pto\scripts\op++.lua:47: attempt to index field `?' (a nil value)

i get this error
pls help
That error has been fixed ;)
Update to the last script I posted (look for it in the third page).

Cheers

gander

#114
Syntax E:\pto\scripts\op++.lua:47: attempt to index field `?' (a nil value)


is still popping up in my soft.... what version of ptokax is it intended with? maybe thats whats wrong

and yes i have used the cript on page 3...but the error still appares


Alexinno

there is a tricky way to name the bot OpChat or any name you want :)

-first you have to unregister the OpChat name in the Ptokax GUI and name it something else for ex. Op-Chat
then make this changes in the script
--## Settings ##-- 
sOpChat = "OpChat"					-- OpChat Bot Name (Set it to everything but "OpChat")
sBot = "OpChat"				-- Bot Name
sFolder = "Logs"					-- Folder where the .tbl files are stord
fInvite = "Invite.tbl"					-- File where the invited users are stored
fLog = "Log.tbl"					-- File where the chat logs are stored
fRelease = "Releases.tbl"				-- File where the Address File is stored
sendCustom = 1						-- 1 = Custom Message to invited user on Hub/Script Restart; 0 = Not
customMsg = "Esti invitat pe OpChat,Enjoy!"	-- Message sent to them

--## END ##--

arrInvite = {} arrLog = {} Releases = {}

Main = function() 
	frmHub:RegBot("OpChat")


-start the script
-change the name for the Opchat in the Ptokax GUI in OpChat and register it

it worked for me

Cheers


jiten

Quote from: Alexinno on 22 June, 2006, 15:13:13
there is a tricky way to name the bot OpChat or any name you want :)

This issue was solved in the latest version of this script.
However, I forgot to update it when the board "re-appeared".

Alexinno


jiten

Quote from: Alexinno on 22 June, 2006, 21:02:51
:P, do that now

As requested, I've updated the first post of this thread with the 'latest' LUA 5.0 OpChat++ version.

I saw the code after a while and have to admit that it requires a rewrite.
I'm planning to do it soon and will also update it to LUA 5.1.

Best regards

MetalPrincess

Erm I have probably a really stupid problem but none of the commands work. I'm trying to use the commands at the top of the script and I get nothing. What am I doing wrong? :(


MP

Dessamator

You have to send a pm to the bot you set in the settings, and type the commands there.
Ignorance is Bliss.

MetalPrincess

Thanks still does not seem to be working but I may see if I can test it out a bit more with the other OPS and stuff first. I'll post back if I still ahve a problem :D

MP

Dessamator

If it still doesnt work, try disabling the other scripts and running only that one.
Ignorance is Bliss.

MetalPrincess

Will it work without the other ops being around to answer pm's?

MP

SMF spam blocked by CleanTalk