PsyGuard Edition Lua 5.0.2 V:0.1.3
 

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

PsyGuard Edition Lua 5.0.2 V:0.1.3

Started by Typhoon, 14 September, 2005, 10:21:19

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Typhoon

well, as i have minimized most bugs i'll releasing a beta so i can get the last bugs found,,, info here will contain a small changelog and a small what-does-it-do...

-=	P??G??r? V:0.0.66 [LUA5 Edition ]	=-

= V: 0.0.65 , 01/03-2006 =

Rewrote		= table structure in Client_Setup.ini
Removed		= Client_Setup.ini, merged it into Setup.ini after the rewrite it was quite small :) 
Added		= A +hubsettings, to show all the setup for all profiles..


= V: 0.0.66 , 06/03-2006 =

Added		= Random topic , idea from Guarding by Kepp :) 
Fixed		= bug in +mysettings, thx Doobert
Added		= some more to +hubstats..
Added		= a thin way for owners to keep track on who regs and who deletes users..

Credits =

NightLitch,Kepp,plop,Herodes,Hawk,Mutor,Bastya_Elvtars,Madman,BlackWings, and all not mentioned here yell out and i'll add you :)

Typhoon?



gander

hope you include like a release thingy...cause i tryed using your script... was great..but wont let any other scripts like ex release.lua work ... says passing trough command but wont work any how

Typhoon

QuoteOriginally posted by gander
hope you include like a release thingy...cause i tryed using your script... was great..but wont let any other scripts like ex release.lua work ... says passing trough command but wont work any how
post a link to the release script you have tryed it with.. my fast guess is that's a profile problem..

hit me with a link and i'll take a deep look at it..

Typhoon?



EMIN3M

Hi kool script :D

Just 1 thing, how do i edit the login message that gets shown in main?

Cheerz Em :))
Quote\"so you can be quick,
jump the candlestick,
burn your back,
and fuck Jill on a hill,
but you still ain\'t Jack.\"
-EMINEM

Typhoon

QuoteOriginally posted by EMIN3M
Hi kool script :D

Just 1 thing, how do i edit the login message that gets shown in main?

Cheerz Em :))

what login message ??



EMIN3M

The message where it says how much share and what client your useing ect...
Quote\"so you can be quick,
jump the candlestick,
burn your back,
and fuck Jill on a hill,
but you still ain\'t Jack.\"
-EMINEM

Typhoon

QuoteOriginally posted by EMIN3M
The message where it says how much share and what client your useing ect...

thats not possible.. but suggestions to addons/removals can be posted at my page..

and what changes did you have in mind ???

Typhoon?



EMIN3M

#7
Also got this error

[23:19] Syntax psyguard.lua:1785: bad argument #1 to `random' (interval is empty)
[23:19] Syntax psyguard.lua:1785: bad argument #1 to `random' (interval is empty)

Edit - another error, i get this error wen useing my redirect script  (script below)

[23:23] Syntax cmdfunctions.lua:1256: bad argument #1 to `random' (interval is empty)

-- Redirect Bot by bastya_elvtars (the rock n' roll doctor)
-- written for 6Marilyn6Manson6
-- usual: cmds can be main or in PM
-- set if u want the bot in userlist or not
-- cmds can be customised
-- only MASTER profile can use it
-- based on channelbot 0.9h by Nathanos
-- Converted in LUA 5 by 6Marilyn6Manson6 at 06/05/2005

cmd1="!redirect" -- changing default redir addy

cmd2="!setredirectall" -- setting redirect all newly coming users (on/off)

cmd3="!setredirectfull" -- setting redirect all when hub full (on/off)

cmd4="!getredirect"

cmd5="!redirhelp"

Bot="Soldier" -- no need 2 explain

BotInUserList=1 -- set to 1 if u wanna see bot in userlist

function Main()
	if BotInUserList==1 then
		--frmHub:RegBot(Bot)
	end
end

-- dont edit below

function ChRed(user, data,env)
	if user.iProfile==0 or user.iProfile==5 then
		local _,_,newaddy=string.find(data,"%b<>%s+%S+%s+(%S+)")
		if newaddy then
			frmHub:SetRedirectAddress(newaddy) 
			SendToOps(Bot, user.sName.." changed the hub redirect address to: "..newaddy.." |")
			user:SendData(parseenv(user,env,Bot).."You changed the hub redirect address to: "..newaddy.." |")
		else
			user:SendData(parseenv(user,env,Bot).. "It would be so nice to type the redirect address, don't  you think? |")
		end
	else
		user:SendData(parseenv(user,env,Bot).."You do not have sufficient rights to run that command! |")
	end
end 

function SetRedirectAll(user, data,env)
if user.iProfile==0 or user.iProfile==5 then
	local _,_,arg=string.find(data,"%b<>%s+%S+%s+(%S+)")
	if arg ~= nil then
		if (arg=="on") then 
			frmHub:SetRedirectFull(0)
			frmHub:SetRedirectAll(1) 
			SendToOps(Bot, user.sName.." changed the redirect all new connections to: "..arg.." |")
			user:SendData(parseenv(user,env,Bot).."You changed the redirect all new connections to: "..arg.." |")
			elseif (arg=="off") then 
				frmHub:SetRedirectAll(0) 
				SendToOps(Bot, user.sName.." changed the redirect all new connections to: "..arg.." |")
				user:SendData(parseenv(user,env,Bot).."You changed the redirect all new connections to: "..arg.." |")
			else
				user:SendData(parseenv(user,env,Bot).."The value can only be: on or off.  It cannot be "..arg.." |")
			end
		else
			user:SendData(parseenv(user,env,Bot).. "Damn, don't be so lazy, type the switch after the comand too! |")
		end
	else
		user:SendData(parseenv(user,env,Bot).."You do not have sufficient rights to run that command! |")
	end
end 

function SetRedirectFull(user, data,env)
	if user.iProfile==0 or user.iProfile==5 then
		local _,_,arg=string.find(data,"%b<>%s+%S+%s+(%S+)")
		if arg ~= nil then
			if (arg=="on") then 
				frmHub:SetRedirectAll(0)
				frmHub:SetRedirectFull(1) 
				SendToOps(Bot, user.sName.." has enabled the redirect all new connections when maximum connections reached feature. |")
				user:SendData(parseenv(user,env,Bot).."You have enabled the redirect all new connections when maximum connections reached feature.|")
			elseif (arg=="off") then
				frmHub:SetRedirectFull(0) 
				SendToOps(Bot, user.sName.." has disabled the redirect all new connections when maximum connections reached feature. |")
				user:SendData(parseenv(user,env,Bot).."You have disabled the redirect all new connections when maximum connections reached feature.|")
			else
				user:SendData(parseenv(user,env,Bot).."The value can only be: on or off.  It cannot be "..arg.." |")
			end 
		else
			user:SendData(parseenv(user,env,Bot).. "Damn, don't be so lazy, type the switch after the comand too! |")
		end
	else
		user:SendData(parseenv(user,env,Bot).."You do not have sufficient rights to run that command! |")
	end
end 

function GetRedirect(user,data,env) 
	if user.iProfile==0 or user.iProfile==5 then
		user:SendData(parseenv(user,env,Bot).."The current redirect addy is: "..frmHub:GetRedirectAddress().."|")
	else
		user:SendData(parseenv(user,env,Bot).."You do not have sufficient rights to run that command! |")
	end
end

function ShowHelp(user,data,env)
	if user.iProfile==0 or user.iProfile==5 then
		local sTmp = ""
			sTmp = sTmp.."\r\n\r\n\t\t "..user.sName.." here are your commands\r\n\r\n"
			sTmp = sTmp.."\t\t!redirect\t\t - Change current redirect addy, usage !redirect (IP/host)\r\n"
			sTmp = sTmp.."\t\t!setredirectfull\t - Set redirect on all new users when hub full, usage !setredirectfull (on/off)\r\n"
			sTmp = sTmp.."\t\t!setredirectall\t - Set redirect an all all connections\r\n"
			sTmp = sTmp.."\t\t!getredirect\t - Show current redirect addy\r\n"
			sTmp = sTmp.."\t\t!redirhelp\t - Shows this help\r\n"
		user:SendData(Bot, sTmp)
	else
		user:SendData(parseenv(user,env,Bot).."You do not have sufficient rights to run that command! |")
	end
end

function ChatArrival(user,data)
	returndata=0
	if string.sub(data, 1, 1) == "<" then 
		data=string.sub(data,1,string.len(data)-1)
		local _,_,cmd = string.find(data,"%b<>%s+(%S+)")
		if cmd then
			returndata=parsecmds(user,data,string.lower(cmd),"MAIN")
		end
	elseif string.sub(data, 1, 4) == "$To:" then
		data=string.sub(data,1,string.len(data)-1)
			local _,_,whoTo = string.find(data,"$To:%s+(%S+)")
		if (whoTo == Bot) then
			local _,_,cmd = string.find(data,"$To:%s+%S+%s+From:%s+%S+%s+$%b<>%s+(%S+)")
			cmd=string.lower(cmd)
			returndata=parsecmds(user,data,cmd,"PM")
		end
	end return returndata
end

function parsecmds(user,data,cmd,env)
	if cmd==cmd1 then
		ChRed(user,data,env) returndata=1
	elseif cmd==cmd2 then
		SetRedirectAll(user,data,env) returndata=1
	elseif cmd==cmd3 then
		SetRedirectFull(user,data,env) returndata=1
	elseif cmd==cmd4 then
		GetRedirect(user,data,env) returndata=1
	elseif cmd==cmd5 then
		ShowHelp(user,data,env) returndata=1
	end
	return returndata
end

function parseenv(user,env,bot)
	if env=="PM" then
		return "$To: "..user.sName.." From: "..bot.." $<"..bot.."> "
	elseif env=="MAIN" then
		return "<"..bot.."> "
	end
end

OpConnected = function(user)
	user:SendData("$UserCommand 1 3 Redirect\\Change redirect addy$<%[mynick]> !redirect %[line:New addy]||")
	user:SendData("$UserCommand 1 3 Redirect\\Set redirect full$<%[mynick]> !setredirectfull %[line:On/Off]||")
	user:SendData("$UserCommand 1 3 Redirect\\Set redirect all$<%[mynick]> !setredirectall %[line:On/Off]||")
	user:SendData("$UserCommand 1 3 Redirect\\Show current redirect addy$<%[mynick]> !getredirect||")
	user:SendData("$UserCommand 1 3 Redirect\\Show help for redirect bot$<%[mynick]> !redirhelp||")
end

EDIT3 lol

would it be posible to have a option to stop this message being sent

Command don't exist in P??G??r? Edition v:0.0.4c RC1 ,but i'll let the data pass through if other scripts are running :o)!

gets very annoying after a while.

Thanx Em :D
Quote\"so you can be quick,
jump the candlestick,
burn your back,
and fuck Jill on a hill,
but you still ain\'t Jack.\"
-EMINEM

EMIN3M

QuoteOriginally posted by Typhoon?
QuoteOriginally posted by EMIN3M
The message where it says how much share and what client your useing ect...

thats not possible.. but suggestions to addons/removals can be posted at my page..

and what changes did you have in mind ???

Typhoon?

Haveing it sent in pm with a option to check what profiles to send it to?

That would be gr8 :))

Thanx again Em :D
Quote\"so you can be quick,
jump the candlestick,
burn your back,
and fuck Jill on a hill,
but you still ain\'t Jack.\"
-EMINEM

bastya_elvtars

I wouldn't use that redirect bot for the latest PtokaX if I were you. I will make a more recent one soon.
Everything could have been anything else and it would have just as much meaning.

EMIN3M

QuoteOriginally posted by bastya_elvtars
I wouldn't use that redirect bot for the latest PtokaX if I were you. I will make a more recent one soon.

How come? It works ok so far.

Will await for new one hehe :))

Thanx Em
Quote\"so you can be quick,
jump the candlestick,
burn your back,
and fuck Jill on a hill,
but you still ain\'t Jack.\"
-EMINEM

Typhoon

#11
about this :
23:19] Syntax psyguard.lua:1785: bad argument #1 to `random' (interval is empty)
[23:19] Syntax psyguard.lua:1785: bad argument #1 to `random' (interval is empty)

just insert a redirect adress in the redirect array +addred    ,  failed logins gets redirectet to a random hub in the array..

and this :
Edit - another error, i get this error wen useing my redirect script (script below)

[23:23] Syntax cmdfunctions.lua:1256: bad argument #1 to `random' (interval is empty)

thats also because of the redirect array in P??G??r? ..

*EDIT*
about this:
Command don't exist in P??G??r? Edition v:0.0.4c RC1 ,but i'll let the data pass through if other scripts are running :o)!

sure thing consider it removed by next version, was intended only for debug purpose :)



Typhoon?



EMIN3M

Hi, I think there?s a problem with the client checker.  I?ve set profiles above OP not to be checked but they do.

They get this message

Your DC-Client is not allowed here... Please use a Standard DC++ Client

Thanx Em :))
Quote\"so you can be quick,
jump the candlestick,
burn your back,
and fuck Jill on a hill,
but you still ain\'t Jack.\"
-EMINEM

Typhoon

QuoteOriginally posted by EMIN3M
Hi, I think there?s a problem with the client checker.  I?ve set profiles above OP not to be checked but they do.

They get this message

Your DC-Client is not allowed here... Please use a Standard DC++ Client

Thanx Em :))

what clients do they use :) ..
i only support some clients in standard setup..
please post their DC-Tags including the description tag if they have one..

and you could allways use +imune EMIN3M

Typhoon?



EMIN3M

1 of the clients is McDC but I've Imuned most of my op's for now.

Would be kool if profiles above OP didnt get checked or something :))

Great script tho!

Thanx Em :))
Quote\"so you can be quick,
jump the candlestick,
burn your back,
and fuck Jill on a hill,
but you still ain\'t Jack.\"
-EMINEM

Typhoon

QuoteOriginally posted by EMIN3M
1 of the clients is McDC but I've Imuned most of my op's for now.

Would be kool if profiles above OP didnt get checked or something :))

Great script tho!

Thanx Em :))

all get checked for faulty clients :) that's why there's a imune function..
and thx hope you like it :) ..
for feature changes check the WorkBoard at my page both for comming changes and for current development status :)

Typhoon?



EMIN3M

Hi, got this error

Syntax psyguard.lua:2114: bad argument #1 to `find' (string expected, got nil)
Quote\"so you can be quick,
jump the candlestick,
burn your back,
and fuck Jill on a hill,
but you still ain\'t Jack.\"
-EMINEM

Typhoon

QuoteOriginally posted by EMIN3M
Hi, got this error

Syntax psyguard.lua:2114: bad argument #1 to `find' (string expected, got nil)

thx, should be fixed by next version...



EMIN3M

Hi, got this error when typeing

+userinfo ?u?@r?

Syntax cmdfunctions.lua:683: attempt to concatenate field `Country' (a nil value)

Useing latest version

Thanx Em :))
Quote\"so you can be quick,
jump the candlestick,
burn your back,
and fuck Jill on a hill,
but you still ain\'t Jack.\"
-EMINEM

Typhoon

QuoteOriginally posted by EMIN3M
Hi, got this error when typeing

+userinfo ?u?@r?

Syntax cmdfunctions.lua:683: attempt to concatenate field `Country' (a nil value)

Useing latest version

Thanx Em :))

thx for info, it's fixed allready in my running version..

Typhoon?



Typhoon

Updated the changelog abit, expect new release during the week..

And Remember to click the image in my signature for bugreports and other things..

Typhoon?



Typhoon

changelog updated and  P??G??r? ??????? Lua 5 V:0.0.63 is available in my signature..
report bugs at my page for faster respons ..

Typhoon?



Typhoon

updated changelog and released P??G??r? ??????? Lua 5 V:0.0.65  , grab it at my signature and report bug where the signature leads you to :)

Typhoon?



Typhoon

updated changelog and released P??G??r? ??????? Lua 5 V:0.0.66  , grab it at my signature and report bug where the signature leads you to :)

Typhoon?



Typhoon

as i'm waiting for the last Px plugin to be made ready for Lua 5.1, i made a few changes and addons.. here's tha latest addons..

= V: 0.0.67 , 10/03-2006 =

Changed		= wordreplacer replaces all instead of only users..
Added		= auto sets command prefixes,when script starts
Fixed		= minor stuff here and there
Changed		= profile level for reg and vip, now follow PtokaX standard...
Fixed		= few speeling errors by Mutor
Changed		= all for loops are further optimized by using ipairs/pairs
Changed		= abusing the Next() instead of having a function to check if a table is empty, thx for info jiten

= V: 0.1.0 , 10/04-2006 =

Changed		= some structure in the script
Rewrote		= stringban check is now more optimized and now shows who added and what happends to the user ie. choices are :Disconnet,Kick,Redirect,Ban
Added		= protection table for profiles, old check was getting slow and fucked up..table structure idea from Leviathan by cenobyte
GUI		= some changes and updates
Fixed		= few bugs found by TTB
Added		= Ip Range banning stuff, some code is recycled from the Rangefucker by Bastya_Elvtars ( he would say i ruined it :p )
Fixed		= rightclick system is up2date now, was missing about 12 commands :) ..
todo		= optimizing ..


as soon as the plugin is finished script will be lua 5.0.2 and 5.1 compatible

cheers Typhoon?



SMF spam blocked by CleanTalk