send path in a PM
 

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

send path in a PM

Started by MrZ, 29 March, 2004, 17:12:34

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

MrZ

hia

strugeling with this,,,

curUser:SendData(BotName, "Path: "..path.. ".")

how do i send it in a PM to the user ??

tnx
Always remember that you are unique... just like everyone else :-D

pHaTTy

QuoteOriginally posted by MrZ
hia

strugeling with this,,,

curUser:SendData(BotName, "Path: "..path.. ".")

how do i send it in a PM to the user ??

tnx

curUser:SendPM(BotName, "Path: "..path.. ".")

optionally u cud do:

SendPmToNick(curUser.sName,BotName, "Path: "..path.. ".")


later,,
Resistance is futile!

MrZ

#2
tnx pth?tty, but still dont work.. it sends the pm to the bot, looks nice but the user wont see it :))

this is what im strugling with (dont laugh :))

-- Modified by nErBoS
-- Operators are now checked as normal users
-- Some extensions added
-- All known bugs fixed by ----------->>> OpiumVolage
 
BotName = "{BadFilesDetecter}"
MessageToSend = " are not allowed in this hub."
time = 3 --Value in minutes
addy = "countrystar.no-ip.com"
--"Wurlitzer.no-ip.com:4411"

Files = { 
[".txt"]="No pre-teen here!", 
["preteen"]="No pre-teen here!", 
["fuck"]="For sharing the word fuck in filenames or folders ! Remove or rename all those words and you're welcome back...",
["nigger"]="For sharing word like nigger in filenames or folders ! Remove or rename all those words and you're welcome back...",
["motherfucker"]="For sharing motherfuck word in filenames or folders ! Remove or rename all those words and you're welcome back...", 
[".shn"]="For sharing shn files ! Unshare all your .shn files and you're welcome.Inly .mp3 files allowed.",
[".dll"]="For sharing dll files ! Unshare all your .dll files and you're welcome. Only .mp3 files allowed.",
[".exe"]="For sharing exe files ! Unshare all your .exe files and you're welcome. Only .mp3 files allowed.",
}

function NewUserConnected(curUser)
	frmHub:EnableSearchData(1)
	for i,v in Files do
	curUser:SendData("$Search Hub:"..BotName..random(1, 100) .." F?F?0?1?"..i)
	end
end

function DataArrival(curUser, data)
	if( strsub(data, 1, 3) == "$SR" ) then
		_,_,nick = strfind( data, "\05(%S*)|$" )
		local s = 5 + strlen(curUser.sName)
		local e = strfind(data, "%d+%s%d+/%d+") - 2
		local path = strsub(data, s, e)
		local s = 5 + strlen(curUser.sName)
		Reason = FindWhat(curUser,data)
		if (Reason == "Other files") then return end
--		SendPmToNick(curUser.sName,BotName, "Redirecting.....", "Reason: "..Reason)
--		SendPmToNick(curUser.sName,BotName, "Reason: "..Reason)
--		SendPmToNick(curUser.sName,"Path: "..path.. ".")
		SendPmToNick(curUser.sName,BotName "Path: "..path.. ".") 
--		curUser:SendData(BotName, "Redirecting.....")
--		curUser:SendData(BotName, "Reason: "..Reason)
--		curUser:SendData(BotName, "Path: "..path.. ".")
--		SendPmToNick(BotName, "*** User "..curUser.sName.." kicked. Reason: "..Reason) 
		SendPmToNick(curUser.sName, "You were redirected. "..Reason, "You can come back when you have corrected the problem")
--		SendDataToNick(curUser.sName, "Path: "..path.. ".")
--		curUser:Disconnect()
--		curUser:TimeBan(time) --This line tempban a user for an specific amount of time in minutes, to incree/decrease the time change the value in variable 'time'
--		curUser:TempBan() --This line tempban a user for an specific amount of time pre-setted inside ptokax advanced settings, to make it work, uncomment this line and comment the line 

above
--SendPmToOps(BotName, "*** User "..curUser.sName.." redirected. Reason: "..Reason) 
curUser:SendData("$ForceMove "..addy)
	end
end

function FindWhat(curUser,data)
	for i,v in Files do
		if (strfind(strlower(data), "%"..i.."\005")) then
			return v
		end
	end
	return "Other files"
end

im trying to get a pm to the bot with the reason and a Pm to the user with the path and reason,, then i want him to be redirected.

sorry all for messing ur script up, it will be cleaned and notified

Z ya

edited: Yo to To was only a type failure
Always remember that you are unique... just like everyone else :-D

nErBoS

#3
Hi,

You are missing a ',' in..
SendPmToNick(curUser.sName,BotName "Path: "..path..".")

should be like this..

SendPmToNick(curUser.sName,BotName, "Path: "..path..".")

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

MrZ

#4
hi :)

Tnx a Lot for replying ... funny i missed that simple thing..
will try asap this eve :))

tnx again
Always remember that you are unique... just like everyone else :-D

MrZ

#5
Hia again

i got the path in a PM but no reason.... I now have this


SendPmToNick(curUser.sName,BotName, "You were redirected. "..Reason, "You can come back when you have corrected the problem")
		SendPmToNick(curUser.sName,BotName, "Path: "..path.. ".") 

curUser:SendData("$ForceMove "..addy)

any hints ?

Z ya

edited, oh i have tried moved then around whithout luck
Always remember that you are unique... just like everyone else :-D

NightLitch

QuoteOriginally posted by MrZ
Hia again

i got the path in a PM but no reason.... I now have this


SendPmToNick(curUser.sName,BotName, "You were redirected. "..Reason, "You can come back when you have corrected the problem")
		SendPmToNick(curUser.sName,BotName, "Path: "..path.. ".") 

curUser:SendData("$ForceMove "..addy)

any hints ?

Z ya

edited, oh i have tried moved then around whithout luck

Yes try this:

SendPmToNick(curUser.sName,BotName, "You were redirected. "..Reason..", "You can come back when you have corrected the problem")
		SendPmToNick(curUser.sName,BotName, "Path: "..path.. ".") 

curUser:SendData("$ForceMove "..addy)

you forgot .." after Reason.

/NL
//NL

MrZ

hia :))

tried that and even added a , instead of a . also a "

SendPmToNick(curUser.sName,BotName, "You were redirected", "..Reason..", "You can come back when you have corrected the problem")

still dont give me any path
Always remember that you are unique... just like everyone else :-D

nErBoS

Hi,

Try this one..

SendPmToNick(curUser.sName,BotName, "You were redirected. "..Reason.." You can come back when you have corrected the problem")
		SendPmToNick(curUser.sName,BotName, "Path: "..path..".") 

curUser:SendData("$ForceMove "..addy)

If do not works there is something wrong in the script, post here the scritp exactly how you are using.

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

MrZ

Hia again,,, hope i dont get to enoying now.

I would like to know hoe to make an option so that the script dont check OP's.

Also wondering about the time thing,, does it mean that the script is checkin the hub at special time schedules?

tnx

-- BadFilesDetecter V: 1.0 by [ES]latinmusic. Date: 05/11/2003
-- Base on Illegalist by Ptaczek, Jan-3, 2003 
-- Searches for specified patterns. Useful for illegal share checking 
-- Modificed by Leo (for music hub) 
-- Modified by nErBoS
-- Operators are now checked as normal users
-- Some extensions added
-- All known bugs fixed by ----------->>> OpiumVolage
 
BotName = "{BadFilesDetecter}"
MessageToSend = " are not allowed in this hub."
time = 3 --Value in minutes
addy = "countrystar.no-ip.com"
--"Wurlitzer.no-ip.com:4411"

Files = { 
[".txt"]="No pre-teen here!", 
["preteen"]="No pre-teen here!", 
["fuck"]="For sharing the word fuck in filenames or folders ! Remove or rename all those words and you're welcome back...",
["nigger"]="For sharing word like nigger in filenames or folders ! Remove or rename all those words and you're welcome back...",
["motherfucker"]="For sharing motherfuck word in filenames or folders ! Remove or rename all those words and you're welcome back...", 
[".shn"]="For sharing shn files ! Unshare all your .shn files and you're welcome.Inly .mp3 files allowed.",
[".dll"]="For sharing dll files ! Unshare all your .dll files and you're welcome. Only .mp3 files allowed.",
[".exe"]="For sharing exe files ! Unshare all your .exe files and you're welcome. Only .mp3 files allowed.",
}

function Main()
	frmHub:RegBot(BotName) -- If you don't want to register the bot remove this line
end

function NewUserConnected(curUser)
	frmHub:EnableSearchData(1)
	for i,v in Files do
	curUser:SendData("$Search Hub:"..BotName..random(1, 100) .." F?F?0?1?"..i)
	end
end

function DataArrival(curUser, data)
	if( strsub(data, 1, 3) == "$SR" ) then
		local s,e,path = strfind(data, "$SR%s+%S+%s+(.+)%x+%s+%x+/%x+")
		Reason = FindWhat(curUser,data)
		if (Reason == "Other files") then return end

		SendPmToNick(curUser.sName,BotName, "You were redirected beacause "..Reason..".")
		SendPmToNick(curUser.sName,BotName, "Path: "..path)
		SendPmToNick(curUser.sName,BotName, "You can come back when you have corrected the problem") 
		curUser:SendData("$ForceMove "..addy)
	end
end

function FindWhat(curUser,data)
	for i,v in Files do
		if (strfind(strlower(data), "%"..i.."\005")) then
			return v
		end
	end
	return "Other files"
end
Always remember that you are unique... just like everyone else :-D

nErBoS

Hi,

Done to not check Ops..

-- BadFilesDetecter V: 1.0 by [ES]latinmusic. Date: 05/11/2003
-- Base on Illegalist by Ptaczek, Jan-3, 2003 
-- Searches for specified patterns. Useful for illegal share checking 
-- Modificed by Leo (for music hub) 
-- Modified by nErBoS
-- Operators are now checked as normal users
-- Some extensions added
-- All known bugs fixed by ----------->>> OpiumVolage
 
BotName = "{BadFilesDetecter}"
MessageToSend = " are not allowed in this hub."
time = 3 --Value in minutes 
addy = "countrystar.no-ip.com"
--"Wurlitzer.no-ip.com:4411"

Files = { 
[".txt"]="No pre-teen here!", 
["preteen"]="No pre-teen here!", 
["fuck"]="For sharing the word fuck in filenames or folders ! Remove or rename all those words and you're welcome back...",
["nigger"]="For sharing word like nigger in filenames or folders ! Remove or rename all those words and you're welcome back...",
["motherfucker"]="For sharing motherfuck word in filenames or folders ! Remove or rename all those words and you're welcome back...", 
[".shn"]="For sharing shn files ! Unshare all your .shn files and you're welcome.Inly .mp3 files allowed.",
[".dll"]="For sharing dll files ! Unshare all your .dll files and you're welcome. Only .mp3 files allowed.",
[".exe"]="For sharing exe files ! Unshare all your .exe files and you're welcome. Only .mp3 files allowed.",
}

function Main()
	frmHub:RegBot(BotName) -- If you don't want to register the bot remove this line
end

function NewUserConnected(curUser)
	frmHub:EnableSearchData(1)
	for i,v in Files do
	curUser:SendData("$Search Hub:"..BotName..random(1, 100) .." F?F?0?1?"..i)
	end
end

function DataArrival(curUser, data)
	if( strsub(data, 1, 3) == "$SR" and not user.bOperator) then
		local s,e,path = strfind(data, "$SR%s+%S+%s+(.+)%x+%s+%x+/%x+")
		Reason = FindWhat(curUser,data)
		if (Reason == "Other files") then return end

		SendPmToNick(curUser.sName,BotName, "You were redirected beacause "..Reason..".")
		SendPmToNick(curUser.sName,BotName, "Path: "..path)
		SendPmToNick(curUser.sName,BotName, "You can come back when you have corrected the problem") 
		curUser:SendData("$ForceMove "..addy)
	end
end

function FindWhat(curUser,data)
	for i,v in Files do
		if (strfind(strlower(data), "%"..i.."\005")) then
			return v
		end
	end
	return "Other files"
end

About this two lines...

MessageToSend = " are not allowed in this hub."
time = 3 --Value in minutes

They aren?t been used on the script.

Bets regards, nErBoS
--## nErBoS Spot ##--

MrZ

#11
:))))   I ow u a beer nErBoS

tnx dude


(edited. . hmm wonder if it kicks master and owners,,,hehe)
Always remember that you are unique... just like everyone else :-D

SMF spam blocked by CleanTalk