A second chat on your hub.
 

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

A second chat on your hub.

Started by OpiumVolage, 10 October, 2003, 23:48:38

Previous topic - Next topic

0 Members and 13 Guests are viewing this topic.

OpiumVolage

botName = "SecondChat"
tabUsers = {}

function Main()	frmHub:RegBot(botName) end
function OpConnected(user, data) tinsert(tabUsers, user.sName) end
function OpDisConnected(user, data) tremove(tabUsers, user.sName) end
function NewUserConnected(user, data) tinsert(tabUsers, user.sName) end
function UserDisConnected(user, data) tremove(tabUsers, user.sName) end

function DataArrival(user, data)
	if strsub(data, 1, 3) == "$To" then
		local s, e, to, what = strfind(data, "^%$To: (%S+) From: %S+ %$(.*)")
		if s and to == botName then
			for i=1, getn(tabUsers) do
				if not (tabUsers[i] == user.sName) then
					SendToNick(tabUsers[i], "$To: "..tabUsers[i].." From: "..botName.." $"..what)
				end
			end
			return 1
		end
	end
end

piglja

hmm, Opium, and is it working when scripts are restarted?:)
Nice, Pink Piglet:))
:))  (I am a newbie here, so, plz be kind and soft to me ) :))  
And be carefull, I am haywire  :rolleyes:

OpiumVolage

No it doesn't work when scripts are restarted :)
Idea to do so whitout using a file, is to parse the $MyINFO's and $GetInfo seen on the hub, and update tabUsers. Do i need to say that an associative table seem more adapted to do this ? ;)

BlazeXxX

Hmm Is it possible ot make it , so Only ppl who types +join would enter this chat and +part would log off them from that chat..

someone did a chat like this b4, but it was only workin on TD versions :'( If possible, could you create one like that, that works in IceCube IV versions pls ?

Thx..

ptaczek

QuoteOriginally posted by BlazeXxX
Hmm Is it possible ot make it , so Only ppl who types +join would enter this chat and +part would log off them from that chat..

someone did a chat like this b4, but it was only workin on TD versions :'( If possible, could you create one like that, that works in IceCube IV versions pls ?

Thx..

Hi, do you have that script for TD4? I would like to see what's so special on it. Between TD4 a nd IceCube scripting API should not be so big difference.
-ptaczek-

This whole physical universe is a hologram.
[Cosmosis - Contact: The First Step]

BlazeXxX

Hmm Yea.. I tried with IceCube version and it was repeating msgs more than 5 times to each users, even if they reconnect..

I asked [asx] Wellx abt this, he said its only compatible with TD3 and 4..

If u want , pls leave a pm to me in forum.. I will send that script over :)

[ES]latinmusic

QuoteOriginally posted by BlazeXxX If u want , pls leave a pm to me in forum.. I will send that script over :)
Anw what about to post the script here, or is something classified?

SMF spam blocked by CleanTalk