Chatrooms - 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

Chatrooms

Started by NemeziS, 14 November, 2004, 00:53:23

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

nErBoS

#25
Hi,

I have made the request you made, just download from the link i have gave it on the first page.

--## CHAT ROOMS CREATOR BOT 1.0
--## Requested by NemeziS
--## Some BUGs corrected
--## Added the command +chathelp
--## Little modification on the interaction of the commands
--## Made by nErBoS
--## Commands:
--##
--##	ONLY FOR MASTERS:
--##	+addchat  		- Creates a chat room with a motd (must be used in main or in PM with sBot)
--##	+delchat 		- Deletes a chat room (must be used in main or in PM with sBot)
--##	+addmoderator 			- Adds a Moderator to the chat room
--##	+delmoderator 			- Removes a Moderator from the chat room
--##
--##	ONLY FOR MASTERS, OPS AND MODERATOR:
--##	+changemotd 			- Change the chat room motd
--##	+showusers				- Show the chat room users logged in
--##	+gag 				- Gags a user from speaking on the Chat
--##	+ungag 				- UnGags a user from speaking on the Chat
--##
--##	FOR ALL USERS:
--##	+showmoderator				- Show the list of moderators of the chat room
--##	+join					- Joins a chat room
--##	+leave					- Leaves a chat room
--##	+chathelp				- Shows the commands to use in Chats

Best regards, nErBoS
--## nErBoS Spot ##--

Themaster

#26
why just write +join in main ??
 
peace out...and love to your all scripter..that do the hard work  :D And all thx to your all there are here 2 help!!! :]

blade.lir.dk

NemeziS

#27
Thanx, nErBoS!

Excuse me, I had no access to Internet for a long time, so I have not seen the script yet.

I will test it in a few days.  :)

I've already asked you about: What can you tell about this? link

Is it possible to write a script like that? I need it very much.  :(

If you have some free time, plese look what you can do.  ;)

Best regards,
NemeziS
--LUA forever! =)

Herodes

Nemezis good to have you online again ...
plop has offered to help you along as you built your script ..I think help is all around ... never fear to try ... but DO try ;)

exlepra

Nerbos the link to the script is broken.

I'd really like to try that srcipt, most of the scripts I saw here needed an invite by an op, I like that any user can join.
thx

nErBoS

Hi,

Sorry forgot to fix this one, link fixed  :))

Best regards, nErBoS
--## nErBoS Spot ##--

Themaster

#31
Hello..
I just have try it out...but there a bug with join chatroom it do not work
peace out...and love to your all scripter..that do the hard work  :D And all thx to your all there are here 2 help!!! :]

blade.lir.dk

exlepra

Thx nerbos, works perfectly for me.

nErBoS

Hi,

Ok, i need more info in that bug. Did the script editor gave you any error ?? Show me how did you used the join command.

Best regards, nErBoS
--## nErBoS Spot ##--

Themaster

#34
i just creat a room and then i wright +join room....but i don't got a join message or a error ...
it only pass +join room
peace out...and love to your all scripter..that do the hard work  :D And all thx to your all there are here 2 help!!! :]

blade.lir.dk

nErBoS

Hi,

The command has to be typed in the room, that was the last update.

Best regards, nErBoS
--## nErBoS Spot ##--

Themaster

hehe Ok...My fall Sry M8
peace out...and love to your all scripter..that do the hard work  :D And all thx to your all there are here 2 help!!! :]

blade.lir.dk

TTB

Idea...

if someone has joined a chatroom, and enters nothing for xx period... it will be disconnected from the chatroom.

Is this easy to make?
TTB

(? ?.??.-> Admin @ Surfnet hubs <-.??.???)

nErBoS

Hi,

It would only take more resources, no need for that, the user only occupies a position in the table of the chat-room, nothing more.

Best regards, nErBoS
--## nErBoS Spot ##--

koji_nanami

Hi nerbos,

I'm trying your script since i'd like to do the following thing and I'd like to ask you if it's already possible with it or it need a modded one

1: it's possible to create a chat so that it starts already created when the hub starts or restarts? (resident channels?)

2: how can i do to make ppl join a chat created in this way as soon as they join the hub and for category? ie. I want a resident newbie chat and that unregged join it in auto as soon as they join the hub.

3: I'm using chatblocker for unregged and unregged cannot pm the chatbot .... how can avoid it???

Thanks,

koji

nErBoS

Hi,

1. No need to worry about that, when you create a chat the chat will stay there until you remove it;

2. The script needs a modification to do that (i will do it as soon as i can);

3. The script that blocks the unregged user has to be change to allow the user to talk in the chat, post here the script that you are using please.

Best regards, nErBoS
--## nErBoS Spot ##--

koji_nanami

Thanks for the fast reply.

For point 1: I've created a chatroom but it doesn't stay! As soon as I halt and restart the server the added room are gone.

For point 2: hope to get that mod THANKS!

For point 3: here is the script... can you check also why it doesn't allow also the PM???

here is the code...

--- --- --- --- --- --- --- --- --- --- ---

--- MainStop v 1

--- by Herodes

--- --- --- --- --- --- --- --- --- --- ---

---- Look at the NOTES of this script

--- stops mainchat for selected users or whole profiles

--- remembers state after hub restarts..

--- protects profiles ( set the priorities correctly look at the notes below .. )

--- --- --- --- --- --- --- --- --- --- ---

   --- NOTES:

--- Put this file in your scripts folder of Ptokax and then Start and Stop the Hub ...

--- Then go and open the File MainStop-Profiles.dat with Notepad.exe

--- explanation of contents follows ...

--

--   tProfiles = {

--      ["1"] = { --- this is the profile number for which the following settings apply ...

--         [1] = 1, ---  [1] = 0 means no chat, no scripts commands, 1 chat, no script commands, 2 both chat and command use allowed

--         [2] = 2, --- [2] = is the priority number .. the lower the better .. ( no negative values pls ... )

--         [3] = "Operator",

--      },   --- end for the settings of profile number : "1"

--      ["0"] = {

--         [1] = 2,

--         [2] = 1,

--         [3] = "Master",

--      },

--   }

--

--- --- --- --- --- --- --- --- --- --- ---

---- !!!!! Look at the NOTES of this script !!!!!!

cmdclist = "!lschat"

cmdcstop = "!chat"

cmdchelp = "!chelp"

cmdcprof = "!cprofile"

FiletoSaveNoChatNicks = "MainStop-Nicks.dat"

FiletoSaveNoChatProfiles = "MainStop-Profiles.dat"

tUsrs = {}



function Main()

   LoadFromFile(FiletoSaveNoChatNicks)

   if readfrom(FiletoSaveNoChatProfiles) == nil then

      tProfiles = {}

      local nu = 0

      for i, v in GetProfiles() do

         nu = nu + 1

         tProfiles[""..i..""] = { 1, nu, v }

      end

      tProfiles["-1"] = { 1, nu + 1, "Unregs" }

      SaveToFile(FiletoSaveNoChatProfiles , tProfiles , "tProfiles")

      readfrom()

   end

   readfrom()

   LoadFromFile(FiletoSaveNoChatProfiles)

end



function UserConnected(user)

   if tUsrs[user.sName] == 1 or tProfiles[""..user.iProfile..""][1] == 0 then

      user:SendData("MainChatBlocker", "You cant use the mainchat for now. ...")

   end

end



function DataArrival(user, data)

   if strsub(data, 1,1) == "<" or "*" then

      if tUsrs[user.sName] == 1 or tProfiles[""..user.iProfile..""][1] == 0 then

         user:SendData("MainChatBlocker", "You cant chat in main...")

         return 1

      else

         if tProfiles[""..user.iProfile..""][1] == 2 then

            data = strsub(data, 1, -2)

            s,e,cmd,args = strfind(data, "%b<>%s+(%S+)%s*(%S*)")

            if cmd == cmdclist then

               local msg = "\r\n - The following users are gagged in mainchat\r\n"

               for nick, v in tUsrs do

                  msg = msg.."\t -- "..nick.."\r\n"

               end

               msg = msg.." - The profile permissions are as follows\r\n"

               msg = msg.." - \tProfile Name\tCmds/MainChat\r\n"

               local cmds, chat = "yes", "yes"

               for i,v in tProfiles do

                  if v[1] == 0 then

                     cmds, chat = "no", "no"

                  elseif v[1] == 1 then

                     cmds , chat = "no", "yes"

                  elseif v[1] == 2 then

                     cmds , chat = "yes", "yes"

                  end

                  local prstr = v[3].." ("..i..")"

                  if strlen(prstr) < 8 then

                     prstr = prstr.."\t"

                  end

                  msg = msg.."\t+ "..prstr.."\t   "..cmds.."/"..chat.."\r\n"

               end

               user:SendData("MainChatBlocker", msg)

               return 1

            elseif cmd == cmdcstop then

               if (not args) or (strlen(args) == 0) then

                  user:SendData("MainChatBlocker", "Syntax Error! Please Use like : "..cmdstop.." ")

               else

                  local usr = GetItemByName(args)

                  if tUsrs[usr.sName] then

                     tUsrs[usr.sName] = nil

                     usr.SendData("MainChatBlocker", GetProfileName(user.iProfile).." "..user.sName.." you are now able to chat in mainchat.")

                     user:SendData("MainChatBlocker", usr.sName.." now can chat in main")

                  else

                     if usr then

                        tUsrs[usr.sName] = 1

                        usr.SendData("MainChatBlocker", GetProfileName(user.iProfile).." "..user.sName.." has blocked your ability to chat in mainchat.")

                        user:SendData("MainChatBlocker", usr.sName.." now can't chat in main")

                     else

                        user:SendData("MainChatBlocker", "Error : "..args.." is not in the hub.")

                     end

                  end

               end

               SaveToFile(FiletoSaveNoChatNicks , tUsrs , "tUsrs")

            elseif cmd == cmdchelp then

               local msg = "\t\t--- MainChatBlocker Commands --- \r\n"

               msg = msg.."][\t "..cmdclist.."\t - lists the users that are blocked\r\n"

               msg = msg.."][\t "..cmdcstop.." \t - gags the mainchat of nick\r\n"

               msg = msg.."][\t "..cmdcprof.." \t - It toggles the permission to chat in main for the specified profile number\r\n"

               msg = msg.."][\t "..cmdchelp.."\t - shows this helpful text :P\r\n"

               user:SendData(msg)

            elseif cmd == cmdcprof then

               if (not args) or (strlen(args) == 0) then

                  user:SendData("MainChatBlocker", "Syntax Error! Please Use like : "..cmdcprof.." ")

               else

                  if args == "-1" then

                     if tProfiles[args][1] == 1 then

                        tProfiles[args][1] = 0

                        user:SendData("MainChatBlocker", "Normal Users now are unable to chat in mainchat")

                        SendToAll("MainChatBlocker", "Notice! : Normal Users now are unable to chat in mainchat")

                     elseif tProfiles[args][1] == 0 then

                        tProfiles[args][1] = 1

                        user:SendData("MainChatBlocker", "Normal Users now are able to chat in mainchat")

                        SendToAll("MainChatBlocker", "Notice: Normal Users now are able to chat in mainchat")

                     end

                  else

                     s,e,pr = strfind(args, "(%d+)")

                     pr = tonumber(pr)

                     if GetProfiles()[pr] then

                        if tProfiles[""..user.iProfile..""][2] < tProfiles[""..pr..""][2] then --- priority checking ..

                           if tProfiles[""..pr..""][1] == 0 then

                              tProfiles[""..pr..""][1] = 1

                              user:SendData("MainChatBlocker", GetProfileName(pr).."s now are unable to chat in mainchat")

                              SendToAll("MainChatBlocker", "Notice: "..GetProfileName(pr).."s now are unable to chat in mainchat")

                           elseif  tProfiles[""..pr..""][1] == 1 then

                              tProfiles[""..pr..""][1] = 0

                              user:SendData("MainChatBlocker", GetProfileName(pr).."s now are able to chat in mainchat")

                              SendToAll("MainChatBlocker", "Notice: "..GetProfileName(pr).."s now are able to chat in mainchat")

                           end

                        else

                           user:SendData("MainChatBlocker", "Error! : You are not allowed to block the mainchat of "..GetProfileName(pr).."s")

                           SendToOps("MainChatBlocker", "Mr."..user.sName.." behaves stupidly ...")

                        end

                     else

                        user:SendData("MainChatBlocker", "There is no such profile number")

                     end

                  end

                  SaveToFile(FiletoSaveNoChatProfiles , tProfiles , "tProfiles")

               end

            end

         end

      end

   end

end



function Serialize(tTable, sTableName, sTab)

   assert(tTable, "tTable equals nil");

   assert(sTableName, "sTableName equals nil");



   assert(type(tTable) == "table", "tTable must be a table!");

   assert(type(sTableName) == "string", "sTableName must be a string!");



   sTab = sTab or "";

   sTmp = ""



   sTmp = sTmp..sTab..sTableName.." = {\n"



   for key, value in tTable do

      local sKey = (type(key) == "string") and format("[%q]",key) or format("[%d]",key);



      if(type(value) == "table") then

         sTmp = sTmp..Serialize(value, sKey, sTab.."\t");

      else

         local sValue = (type(value) == "string") and format("%q",value) or tostring(value);

         sTmp = sTmp..sTab.."\t"..sKey.." = "..sValue

      end



      sTmp = sTmp..",\n"

   end



   sTmp = sTmp..sTab.."}"

   return sTmp

end



function SaveToFile(file , table , tablename)

   writeto(file)

   write(Serialize(table, tablename))

   writeto()

end



function LoadFromFile(file)

   if (readfrom(file) ~= nil) then

      readfrom(file)

      dostring(read("*all"))

      readfrom()

   end

end

koji_nanami

Please Nerbos help me =)

nErBoS

Hi,

1. That should be a bad configuration of the script, which version of Ptokax are you using, what do you have in the option "uLaterPtokax =" in the script ??

2. Needs free time, something that i don't have in this next two weeks, because of universaty exams.

3. The script that you showed will gag a user in the main and in PM.

Best regards, nErBoS
--## nErBoS Spot ##--

koji_nanami

1- what you mean for uLaterPtokax?? i don't see it in the script or configfile. I'm using ptokax testdrive4 (there's a better version?)

2-  Hope you find soon time to help, no problems =)

3-  Maybe it will be better if the script advert user in pm only or in status bar.

thanks,

koji

nErBoS

Hi,

1- Have you check the script code ?? There is a part in the script code that starts as this "--## Configuration ##--" and ends like this "--## END ##--" in the midle of this you will find that configuration that i have talked about it.

Best regards, nErBoS
--## nErBoS Spot ##--

koji_nanami

Sorry i tought you were talking about the chatblock and not your script... found that part. Hope you'll work on the script soon. Thanks!!!

nErBoS

Hi,

My life its very complicated at this time, i will do it as soon as i can.

Best regards, nErBoS
--## nErBoS Spot ##--

NemeziS

Hi, nErBoS!

I have a little question.
When I write a command in a chatroom, all the users can see what command I've just written. I don't like this.

Is it possible to add some strings to a script (like a mod) or to write another script to disable this for "+" and "!" commands in chatrooms and in PM messages (In PMs users can also see what commands I use). I don't want them see this commands. Thanks a lot, my friend.  :))

Best regards,
NemeziS
--LUA forever! =)

SMF spam blocked by CleanTalk