Chatrooms - Page 3
 

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

Chatrooms

Started by jiten, 25 March, 2006, 18:24:22

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

jiten

First post has been updated with some changes in the code.

JueLz

I am owner of the MzDistortion? Empire
the addy to my hub is mzdistortion.no-ip.org
____________________________________________
--=                        [HT 500]                          =--

speedX

hey jiten....hi....i would like an addition to this script....can u add +help command to the chatroom....so tht when a user creates or joins a chatroom.....he doesn kno all the commands....so he will type +help and u get the commands......like this..
Quote
+help                to get this help menu
+set1                to make chatroom public
+set2                to make chatroom private
+members          to check the status of the chatroom
and one more thing....when a user creates or type's anything for the first time in a chatroom....he shoud get this message...
Quote
Type +help for available commands

thank u....
Thanking You,

speedX

jiten

Quote from: speedX on 29 September, 2006, 19:33:56
can u add +help command to the chatroom...
when a user creates or type's anything for the first time in a chatroom....he shoud get this message...

Yes, this can be done.

Shouldn't take long to add that :P

speedX

hm..thanks....so by when would u finish making it???
Thanking You,

speedX

jiten

Quote from: speedX on 30 September, 2006, 12:04:13
hm..thanks....so by when would u finish making it???

I'm not sure, but, probably this weekend.

jiten

First post has been updated with a new update.

speedX

hey thanx jiten.....gd work......i would like one more addition tht if a user types any command in tht chatroom....all shud be able to see tht command along wid da result.....means if a user type !members ...all shud be able to see not only tht command even da result i.e the online users and offline users....
Thanking You,

speedX

jiten

Quote from: speedX on 01 October, 2006, 16:06:37
if a user types any command in tht chatroom....all shud be able to see tht command along wid da result.....

In your ToArrival function, search for this:

return tCommands[cmd].fFunction(user,data,tmp,to,args), 1


and replace it with:

return tCommands[cmd].fFunction(user,data,tmp,to,args)


Quote from: speedX on 01 October, 2006, 16:06:37
all shud be able to see not only tht command even da result i.e the online users and offline users....

I don't recommend this option as the rooms would get messy.

However, if that's what you really need, under your tCommands table replace occurrences like:

user:SendPM(to, "message")


with:

tmp:chat("message", to)


Beware :P

speedX

nope dude i didn find the second command......srrry but can u plzzz add it and post it here....
hey but i would like a few more additions if possible........can u make a separate help table in the script so tht i can edit tht and put in the commands to be displayed...
Thanking You,

speedX

jiten

Quote from: speedX on 02 October, 2006, 18:41:33
nope dude i didn find the second command......srrry but can u plzzz add it and post it here....

I'll show how you can do it by yourself.

Here's a small example: if you want everyone to see the output of the !members command, look for this under [Commands.Members]'s table:

user:SendPM(to,"\r\n\r\n\t"..on.."\r\n\r\n\t"..offline.."\r\n\r\n\t"..away..
"\r\n\r\n\t"..na.."/"..n.." active members.\r\n\tNote: "..sType)


and replace it with:

tmp:chat("\r\n\r\n\t"..on.."\r\n\r\n\t"..offline.."\r\n\r\n\t"..away..
"\r\n\r\n\t"..na.."/"..n.." active members.\r\n\tNote: "..sType, to)


Quote from: speedX on 02 October, 2006, 18:41:33
hey but i would like a few more additions if possible........can u make a separate help table in the script so tht i can edit tht and put in the commands to be displayed...

You can customize the text shown with the help command in each command's tRC array.
However, I'm not sure if you have noticed that the commands are only shown if the user has permisson [which you can set].

speedX

ya thts wat....if i give permission to lock or unlock thn any user can give and if i disable it thn only owner can.....but when he type !roomhelp tht commmand doesn come.....so how will he come to kno?? thts y i would like a separate help able if possible....
Thanking You,

speedX

jiten

Quote from: speedX on 03 October, 2006, 15:34:30
ya thts wat....if i give permission to lock or unlock thn any user can give and if i disable it thn only owner can.....but when he type !roomhelp tht commmand doesn come.....so how will he come to kno?? thts y i would like a separate help able if possible....

After having a look at the code, I noticed that I missed something in the help function. Replace it with this one:

fFunction = function(user, data, tmp, to)
	-- Header
	local sMsg = "\r\n\r\n\t\t\t"..string.rep("=", 75).."\r\n"..string.rep("\t", 6).."Chatrooms v."..
	tSettings.iVersion.." by jiten; Based on tezlo's\t\t\t\r\n\t\t\t"..string.rep("-", 150)..
	"\r\n\t\t\tAvailable Commands:\r\n\r\n"
	-- Loop through table
	for i, v in pairs(tCommands) do
		-- If user has permission
		if v.tLevels[user.iProfile] and v.tLevels[user.iProfile] == 1 then
			-- Populate
			sMsg = sMsg.."\t\t\t!"..i.."\t\t"..v.tRC[1].."\r\n"
		end
	end
	-- Send
	user:SendPM(to, sMsg.."\t\t\t"..string.rep("-", 150));
end,

speedX

but wat is the use thn??  the commands to wich permission is givin only tht command come in help....but the owner of chatroom (even if reg user) has all tht commands.......so how will he come to those commands as they r not displayed.....
Thanking You,

speedX

jiten

There's no point in showing commands in the help menu to a user that doesn't have permission to use them.
As I've explained before the command will only appear if you allow it to.

Be more clear and specific, as I still don't understand what's the problem with your code.

This is a custom permission table example:

tLevels = { [-1] = 1, [1] = 1, [5] = 1, },


If you want REGs [3] to access that command, the final result will be like this:

tLevels = { [-1] = 1, [1] = 1, [3] = 1, [5] = 1, },


However, if you don't want Operators [1], it will look like this:

tLevels = { [-1] = 1, [3] = 1, [5] = 1, },

speedX

#65
i think u didn understand wat m i asking.....sorry for confusing u...i have no prob with the permission table......see i want to change the Help menu of the room owner only......eg: if the lock mode is on....thn only owner of the room can invite ppl and remove etc.......but these commmands dont come in the help table of the owner so how will he come to kno..(when he type's !roomhelp).....if i want to display thm in the help table then i have to give permission to reg users also......due to wich even if the chatroom is in lock mode......any user can unlock it (wich i would not like).....
Thanking You,

speedX

jiten

Quote from: speedX on 04 October, 2006, 13:13:01
thn only owner of the room can invite ppl and remove etc.......but these commmands dont come in the help table of the owner so how will he come to kno..(when he type's !roomhelp).....

What is the profile number of the owner? 6 [Leviathan's profile]?

Quoteif i want to display thm in the help table then i have to give permission to reg users also......due to wich even if the chatroom is in lock mode......any user can unlock it (wich i would not like).....

Why do you have to give permission to reg [3] users, if you only want the owner [6?] to access it?
It doesn't make sense.

speedX

owner = owner of chatroom not the hub owner......
Thanking You,

speedX

jiten

Quote from: jiten on 04 October, 2006, 14:37:51
What is the profile number of the owner? 6 [Leviathan's profile]?

I didn't ask if he was the owner of the room, the hub or anything else, did I? :P

Anyway, what you're reporting isn't a script-related problem. I've had a look at the code a couple of times and everything is ok.

From my point of view, you haven't set up the script properly [according to your needs].

speedX

#69
no...the script is just fine....i would an addition.....a help table only for room owner wich i can edit.....only if possible.....or add !invite and !lock command to the help menu of room owner "ONLY".....i'l show u one example.....

Quote
help menu of room owner:

Available Commands:

         !away      Set yourself away
                                      !invite                  to invite a user
                                      !lock <on/off>        to make room private or public
         !mkchat      Create Room
         !members      Show room members
         !leave      Leave room
         !roomhelp   Help menu


and help menu of invited user:

Available Commands:

         !away      Set yourself away
         !mkchat      Create Room
         !members      Show room members
         !leave      Leave room
         !roomhelp   Help menu


hope i have not confused u this time..... ;)
Thanking You,

speedX

jiten

There's no need for an extra help table, as the default !roomhelp command already does that automatically.

However, it probably needs a tweak, so that room owners [such as when it's a REG user [3]] do see every command.

Open your script and replace your [Commands.Help]'s function with this one:

fFunction = function(user, data, tmp, to)
	-- Header
	local sMsg = "\r\n\r\n\t\t\t"..string.rep("=", 75).."\r\n"..string.rep("\t", 6).."Chatrooms v."..
	tSettings.iVersion.." by jiten; Based on tezlo's\t\t\t\r\n\t\t\t"..string.rep("-", 150)..
	"\r\n\t\t\tAvailable Commands:\r\n\r\n"
	-- Loop through table
	for i, v in pairs(tCommands) do
		-- If user has permission
		if v.tLevels[user.iProfile] or string.lower(tmp.owner) == string.lower(user.sName) then
			-- Populate
			sMsg = sMsg.."\t\t\t!"..i.."\t\t"..v.tRC[1].."\r\n"
		end
	end
	-- Send
	user:SendPM(to, sMsg.."\t\t\t"..string.rep("-", 150));
end,

speedX

perfect.....atlast u understood my post.......thank u....this is only wat i watd....sorry for confusing u dude....
Thanking You,

speedX

JueLz

Jiten the command !delchat Seems not to be working...
Could you help me?
I am owner of the MzDistortion? Empire
the addy to my hub is mzdistortion.no-ip.org
____________________________________________
--=                        [HT 500]                          =--

Herodes

#73
Quote from: speedX on 05 October, 2006, 15:43:08
perfect.....atlast u understood my post.......thank u....this is only wat i watd....sorry for confusing u dude....
Someone in their right minds would have written:
Quote from: speedXPerfect! At last you understood my post, thank you. This is only what I wanted. Sorry for confusing you dude..

The "series-of-dots"( .......... ) formatting of yours isn't helping for understanding or even reading!
You have been advised against it lots of time, from me, Psycho, even other ppl. Stop it. Just one dot will do!
Also I noticed you are not using any Capitals! This is why we see you so interested into making all the scripts you are using case in-sensitive. This is the second time that I mention it... Don't post like the way you are chatting! The forum is not a chat! It is a discussion forum! That means we post whole messages, to communicate, think them through before you type them, then make them look good with the formatting (bold, italic, font etc) that is available in the forum package if needed.[/u]

God I have occupied my self with your matter for a quite long time. Be very careful pls...

JueLz

Could anyone else help me?
Posted on: 11 October 2006, 21:23:37
Doesn't this script work with robocop?
I am owner of the MzDistortion? Empire
the addy to my hub is mzdistortion.no-ip.org
____________________________________________
--=                        [HT 500]                          =--

SMF spam blocked by CleanTalk