PtokaX forum

Archive => Archived 5.0 boards => Finished Scripts => Topic started by: Typhoon on 14 September, 2005, 10:21:19

Title: PsyGuard Edition Lua 5.0.2 V:0.1.3
Post by: Typhoon on 14 September, 2005, 10:21:19
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?
Title: cheers!!
Post by: gander on 14 September, 2005, 10:40:42
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
Title:
Post by: Typhoon on 14 September, 2005, 16:11:07
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?
Title:
Post by: EMIN3M on 15 September, 2005, 12:32:44
Hi kool script :D

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

Cheerz Em :))
Title:
Post by: Typhoon on 15 September, 2005, 17:24:42
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 ??
Title:
Post by: EMIN3M on 16 September, 2005, 00:16:13
The message where it says how much share and what client your useing ect...
Title:
Post by: Typhoon on 16 September, 2005, 00:19:15
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?
Title: Bug?
Post by: EMIN3M on 16 September, 2005, 00:21:22
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
Title:
Post by: EMIN3M on 16 September, 2005, 00:37:14
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
Title:
Post by: bastya_elvtars on 16 September, 2005, 00:55:15
I wouldn't use that redirect bot for the latest PtokaX if I were you. I will make a more recent one soon.
Title:
Post by: EMIN3M on 16 September, 2005, 01:05:55
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
Title:
Post by: Typhoon on 16 September, 2005, 04:10:00
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?
Title:
Post by: EMIN3M on 16 September, 2005, 16:11:36
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 :))
Title:
Post by: Typhoon on 17 September, 2005, 00:56:42
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?
Title:
Post by: EMIN3M on 17 September, 2005, 02:50:07
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 :))
Title:
Post by: Typhoon on 17 September, 2005, 09:50:59
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?
Title: Error
Post by: EMIN3M on 17 September, 2005, 14:16:11
Hi, got this error

Syntax psyguard.lua:2114: bad argument #1 to `find' (string expected, got nil)
Title:
Post by: Typhoon on 18 September, 2005, 10:38:52
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...
Title:
Post by: EMIN3M on 25 September, 2005, 00:43:08
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 :))
Title:
Post by: Typhoon on 25 September, 2005, 11:46:22
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?
Title:
Post by: Typhoon on 13 November, 2005, 11:13:35
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?
Title: Re: P??G??r? ??????? Lua 5 V:0.0.63
Post by: Typhoon on 26 February, 2006, 20:42:46
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?
Title: Re: P??G??r? ??????? Lua 5 V:0.0.65
Post by: Typhoon on 04 March, 2006, 11:46:20
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?
Title: Re: P??G??r? ??????? Lua 5 V:0.0.66
Post by: Typhoon on 09 March, 2006, 21:08:26
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?
Title: Small update info
Post by: Typhoon on 14 May, 2006, 09:55:52
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?
Title: Re: PsyGuard Edition Lua 5.0.2 V:0.1.2
Post by: Typhoon on 13 July, 2006, 12:54:32
here's the latest changelog , release will be available this week...


= V: 0.1.1 , 10/04-2006 =

Rewrote = some of the command loading/handling no reason to have the commands twice in a table..
Added = submenu's for specific command grouping required some rewriting as stated above , idea from Artificial Insanety v2 by plop
Fixed = bug's around chat arrival and kenny/mute commands..
todo = optimizing ..

= V: 0.1.2 , 09/07-2006 =

Added = postman stuff by bastya_elvtars
Added = Lucifer anti advertise by Demone.Astaroth , OpiumVolage and Jiten to continue their work


report bugs and stuff through my signature best way to get answers and solutions :)

cheers Typhoon?
Title: Re: PsyGuard Edition Lua 5.0.2 V:0.1.3
Post by: Typhoon on 28 July, 2006, 07:23:22

= V: 0.1.2 , 09/07-2006 =

Added = postman stuff by bastya_elvtars
Added = Lucifer anti advertise by Demone.Astaroth , OpiumVolage and Jiten to continue their work
Fixed = few bugs when disabling the wordreplacer
Fixed = few tweaks here and there ..

= V: 0.1.3 , 24/07-2006 =

Fixed = Bug in stringunban
Fixed = Bug in client check giving nil error on 'msg'
Added = a message when auto reg. is enabled, msg goes to all in main , request by Zinden
Fixed = a profile error after switching to ptokax standard reg/vip numbers


expect a beta release later today :)

Typhoon?
Title: Re: PsyGuard Edition Lua 5.0.2 V:0.1.3
Post by: Typhoon on 28 July, 2006, 12:34:30
okay the release is available at PsyGuard Edition Development Forum (http://developing.piratez.dk)

enjoy it and keep the feed back at the above link !

Typhoon?
Title: Re: PsyGuard Edition Lua 5.0.2 V:0.1.3
Post by: Typhoon on 30 July, 2006, 12:43:35
no feedback at all ?

or a people to scared to try out new scripts :)


Typhoon?
Title: Re: PsyGuard Edition Lua 5.0.2 V:0.1.3
Post by: Typhoon on 12 January, 2007, 10:21:55
Development for this version is stopped.
Script will appear under the Lua 5.1.1 scripst soon ;)

* Topic Closed *