!pm script
 

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

!pm script

Started by Tom, 28 January, 2005, 19:48:16

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Tom

Hi,

I need a script to send a PM with command !pm.

For example - !pm


 Thank you!!!!

??????Hawk??????

#1
hi m8  

try this

-- pm-to by ??????Hawk??????
-- simple pm to bot 
-- 28-01-2005
-- Command   !pm      


bot = "PM-to"
function Main()
	frmHub:RegBot(bot)
end

function DataArrival(user, data)
	if strsub(data,1,1) == "<" then
		data = strsub(data, 1, (strlen(data)-1))
		local s,e,command,sUser,msg = strfind(data, "%b<>%s+(%S+)%s*(%S*)%s*(.*)")
			if command == "!pm"  then 
				if sUser ~= nil and msg ~= nil then
					SendToNick(sUser, "$To: "..sUser.." From: "..bot.." $<"..bot.."> "..msg)
					return 1
				else
					user.SendData(bot,"Command is !pm [user] [text]")
					return 1
				end 
       			end
	end
end



??????Hawk??????

??????Hawk??????

#2
hi m8


try this  ..  i dont know if it will work as  ive got no way of testing it..  
but hopefully someone who can test it  will maby help you  ...





-- pm-to by ??????Hawk??????
-- simple pm to bot 
-- 28-01-2005
-- Command   !pm      


bot = "PM-to"
function Main()
	frmHub:RegBot(bot)
end

function DataArrival(user, data)
	if string.sub(data,1,1) == "<" then
		data = string.sub(data, 1, (string.len(data)-1))
		local s,e,command,sUser,msg = string.find(data, "%b<>%s+(%S+)%s*(%S*)%s*(.*)")
			if command == "!pm"  then 
				if sUser ~= nil and msg ~= nil then
					SendToNick(sUser, "$To: "..sUser.." From: "..bot.." $<"..bot.."> "..msg)
					return 1
				else
					user.SendData(bot,"Command is !pm [user] [text]")
					return 1
				end 
       			end
	end
end


you may want to try using this function instead of DataArrival

ChatArrival(user, data)



??????Hawk??????

Tom

Hi,

 thank you very much for your scripts!!!

But I have one request up to you.

Can you give me or convert, the !pm script in Lua 5?, because I  have new PtokaX in betatest and the this script didn't work.


 Thank you in advance!

Quattro

"new ptokax" define new
quattro-place.no-ip.com:1418
PtokaX DC Hub 0.3.3.0 build 17.09 Not Running :(
wdp10.no-ip.info:1412
DCH++ v1.0-Release (Plugin API v1.0) Special Quattro? Build
For DCH scripting and plugins

Tom

QuoteOriginally posted by Quattro
"new ptokax" define new
New PtokaX -> PPK's PtokaX devel build ;)

Tom

OK I test your convert script Mutor.

 And thank you very much Mutor!

plop

try /pm [message]
build-in dc++.

plop
http://www.plop.nl lua scripts/howto\'s.
http://www.thegoldenangel.net
http://www.vikingshub.com
http://www.lua.org

>>----> he who fights hatred with hatred, drives the spreading of hatred <----<<

SMF spam blocked by CleanTalk