script yo message T1 and T3
 

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

script yo message T1 and T3

Started by Pedro, 29 February, 2004, 17:24:33

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Pedro

Hi, I am looking for a script that will mass message only users with T1 and T3 connestions only..

I hope this is possible, knowing you guys anything is possible..


HAPPY DAYS
if it aint broke, open it up and find out why...

nErBoS

Hi,

Hope it helps..

--Requested by Pedro
--Made by nErBoS

Bot = "PMer-LAN"

function Main() 
	frmHub:RegBot(Bot) 
end 

function DataArrival(user, data) 
if (strsub(data,1,1)=="<") or (strsub(data,1,5+strlen(Bot))=="$To: "..Bot) then
	data=strsub(data,1,strlen(data)-1)
	s,e,cmd = strfind(data,"%b<>%s+(%S+)")
		if (cmd=="!mmlan") then
			local s,e,msg = strfind(data,"%b<>%s+%S+%s+(.*)")
			if (msg ~= nil) then
				if (user.sMyInfoString ~= nil) then
				local s,e,speed = strfind(user.sMyInfoString, "$MyINFO $ALL [^$]+$ $([^$]*)$[^$]*$[^$]+")
				if (speed ~= nil) then
					speed = strsub(speed,1,strlen(speed)-1)
					if( speed == "LAN(T1)" or speed == "LAN(T3)") then
						SendPmToAll(Bot, msg)
						user:SendPM(Bot, "Mensege sent.")
					else
					end
				else
				end
				else
				end
			else
			user:SendPM(Bot "Sytanx error, !mmlan .")
			end
			return 1
		end
end
end

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

tezlo

#2
that will allow only people on T1/T3 to mass message everyone
speeders = {}

function NewUserConnected(user)
	if strfind(user.sMyInfoString, "^%$MyINFO %$ALL %S+ .-%$ %$LAN%(T[13]%).%$") then
		speeders[user.sName] = 1
	end
end

function UserDisconnected(user)
	speeders[user.sName] = nil
end

OpConnected = NewUserConnected
OpDisconnected = UserDisconnected

function DataArrival(user, data)
	if user.bOperator and strsub(data, 1, 1) == "<" then
		local s, e, msg = strfind(data, "^%b<> %!mms (.+)%|$")
		if s then
			msg = " "..msg
			for nick, tmp in speeders do
				SendToNick(nick, msg)
			end
		end
	end
end

!mms

note.. only sends to users who have entered the hub _after script restart

nErBoS

Hi,

I made a bad read on the request, thanks tezlo :)

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

Pedro

Thanx tezlo, it was the script from nerbos I needed, I needed script so I could pm T1 and T3 users..


Thanx nerbos m8, will let you know if it works ok...
if it aint broke, open it up and find out why...

nErBoS

Hi,

My script is wrong because it only allows people with T1 and T3 to send a mass message to everybody, the rigth script it's from tezlo that send a mass message to all users with T1 and T3.

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

Pedro

I stand corrected.

I would like to thank you both for your time and effort to help us lesser beings with our scripts.

HAPPY DAYS
if it aint broke, open it up and find out why...

SMF spam blocked by CleanTalk