LawMaker
 

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

LawMaker

Started by bastya_elvtars, 05 September, 2004, 18:16:24

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

bastya_elvtars

I have wrote this bot in my spare time just 2 learn lua. It was meant to be a combination of  share/slot/hub/limit checking (---> table and pattern matching) but the ideas kept coming, and it grew to a big security bot, having 100 commands available (afaik :)). I will release it as I know it is good, as I had no internet to test it properly, i just cloned myself =). Now I have to test it, and the moment its as bugfree as possible, i will release it.
                                                                                       CHANGELOG
------------------------------------------------------------------ lawmaker 0.6 -----------------------------------------------------------------
                                                                            Exam done! WEEEEEEEEEE!
                                                                            hehe 100 commands reached
                                                                            hehe#2 new headphone ---> more willing 2 script

changed: mute extended a bit, added some surprise again :o)
changed: all variables and tables that are global have been made local wherever possible (should introduce a lot of speed and resource usage improvement)
changed: multiple entries can be deleted from releases, news & other shit with a single command (finally found the sense in tezlo's idea, thx m8)
changed: extended scripted banlist retrieving a bit, it is damn ugly i know but gonna cosmetise...
added: faked hubcount detection, possibility to enable/disable banning in config (this is 100 per cent accurate, fake version tag scanner would not be)
added: notification on bot ban in main enable/disable
added: ability to list random kicks, and to delete
added: possibility of deleting registered users, lol i forgot this - if you happen to study microbiology, you will find out why I did :D
added: rightclick support, enable/disable available in config, follows the levels like help
added: offline messaging system
added: user cleaner by plop, julian date and regusers parsing has been modified [using  RabidWombat's juliandate, why use 2 jdates in the same script? (sorry tezlo)]
fixed: now you can really use !showimmuned
fixed: included the things in help i forgot :(
fixed: uptime parsing was a bit idiot, because it started 2 count days only if uptime was more than 2 days
------------------------------------------------------------------ lawmaker 0.5 -----------------------------------------------------------------
                                                                           Fucking major nonrelease
                                                                           Has been put on ice. Back in september.

changed:slot/hub/limit part made easier to config. the !slothublimit table has been made nicer, too, and maby some CPU time saving will occur (removed a lot of strfind's and tonumber's).
changed: some little code cleanup again, now sends the site on max kicks too if enabled, and on anti-hammer ban
changed: prefix parsing, from now on, {prefix} (prefix) and [prefix] are accepted. Should be enough!
changed: now clients below 0.240 (aka the ones with old-style tag) are supported too, but its strongly disrecommended to allow them. (Thx Herodes for dc++Blue and oDC Moa clients that allowed testing.) - AFAIK these old dc clients are self-blocked because of their age, but added support for safety. The DC++ tag <++ V:v,M:m,H:g/r/o,S:s> is fully supported, i think the <++ V:v,M:m,H:g,S:s> (old-style) is as well, but better leave the mindcppversion set to 0.240 or higher, as the old tag can make the script crash.
changed: myinfo parsing rearranged, maybe lowering resource usage (the most used feature is the mynfo parsing, especially with dc++ 0.401, those clients send myinfo every minute :P)
changed: files with .dat extension go to a separate folder called dats.
changed: opchat now optimized (at last i found the upvalue part in lua book lol)
added !perminvite, so you can invite users for perm. (VIPs only) - to imitate KVIP profile in YHub
added XtremeMOTD (written by me hehe), so MOTD will show after the welcome text, and it can be disabled individually. The default motd in ptokax should be flushed.
added anti-hammer: if a user reconnects x times, he will b banned for y minutes. Gets reset every 15 minutes. Originally from consolemoon by [NL]Pur
added: !ver (bot version) and !showimmuned
added too big share detection
added DC@f?++, DC:PRO support, RevConnect, MS++V and oDC Classic (<5.3) support
added: PM and MAIN environment detection, bots reply to user based on the environment  - try i. e. !myip in PM to the bot and in main (opchat commands /!invite and !remove/ have to be typed in main or in PM with the opchat bot, altho main bot accepts them too but opchat will reply =D)
added protection against unknown connection types (i dont think if there are any lol)
fixed a bug on client check
fixed: hidden/bad dcgui tag scanner scanned only properly tagged dcguis lol
fixed: "Modem" connection type now supported (grr ppk)
fixed: emote showed only the 1st word (im sorry, but a DC hub bot is really hard to test w/o internet... =D)
fixed: help, i stuffed it up somehow *snif snif*
fixed monologue, after sending message, it resets counter to 0 instead of 1
------------------------------------------------------------------ lawmaker 0.4 -----------------------------------------------------------------
changed uptime parsing method, from marvellous userwelcome bot by RabidWombat (greatest idea i have ever seen)
changed: re-enabled dc++ builtin kick, but it triggers the scripted kick (nil reason is supported too) hehe
changed: myinfo parsing part has been highly optimized for speed and resource usage, also simplified
changed config and user level check algorithm a bit on connect / myinfo parsing (my own routine sucked, so i grabbed CB's one)
changed: made hub/slot/limit part a bit simpler in config.lua
added some surprise... ;)
added: !hubinfo command, shows basic info on the hub
added monologue by plop, bit rewritten =)
added incorrect active IP check on search, ripped from loginbot 0.03 by Mutor
fixed: nick check bug that allowed nicks like abcd[123]efg, when the desired one would be [123]abcdefg
fixed away bug, now really reads away.dat (grr mistypes)
fixed some mistypes in configfile, extended the comments a bit
fixed: ShowOnEntry of freshstuff  has sense from now on :D
------------------------------------------------------------------ lawmaker 0.31 bugfix -------------------------------------------------------
fixed the bug that muted users only for a second
fixed some tiny bugs in command parsings
fixed the !me bug and the bug that did not execute commands properly in opchat
changed !redirectall, now addy can be given as an optional parameter
changed: added !redirectall into help, i have forgotten that
changed: some little code cleanup
changed: upgraded mute bot now every muted users have a separate timer, works fine
------------------------------------------------------------------- lawmaker 0.3 ------------------------------------------------------------------
 where we  are now? - 75 admin commands, about 60-65 op,  26 regular user cmds
changed: commands are case insensitive
changed !drop command is disabled, cause ops can kick masters with it, this is a security hole i guess
added !showbannedranges, shows in PM. (oooops, fixed the never-saving bug in rangeban)
added !afk/!away and !back, with date support and !amiaway to see if you are away...
added !showbanlist grabbing PermBan.dat, more comfortable to see in PM than in main, or not? ;)
added !hubstats, now you can see those hubstats that are saved lol
added !uptime, measures script uptime since restart
added !myip command
added +me and /me support, has been put into opchat as well
added hubstats saving feature from DarkMind by Tuben
added plop freshstuff 3.3, l8r versions are overconfusing :P
added guestbook-like crap, 3 ones (guestbook, news bulletin, requests, can be renamed)
added textfile support, 5 text-showing cmds
---------------------------------------------------------------- 0.2 lawmaker from now on -------------------------------------------------------
changed !op command is disabled from now on
added possibility to execute commands PMed to bot
added !immune and !delimmune, which makes a user pass ALL checks except nick check
added mass message and shit like that, banner from channelbot
added random kick messages, stored in a file, can be added new ones. :D
added !nuke, a perm ban cmd, sends website/mail for complaints, builtin !ban triggers nuke
added !tban, like in a. i.(!tban     ) - sends website/mail for complaints if enabled
added !rangeban and !rangeunban (now i confess: i wanted to make a completely yhub-like bot.)
added !kickuser, autoban on certain number of kicks for certain hours (like in yhub), kicks get saved, get reset when user reaches the maximum and gets banned
added Mute - thx kepp & Typhoon™ 
added Warn - thx klownietklowniet, [NL]Pur, gg3k, Freed
added Help, with channelbot-like user levels
added opchat with invitation possible, thx tezlo
added see rules on  hub/slot/(H/S)ratio/limit with command !slothublimit ---> gives an ugly table, like x-hub
--------------------------------------------------------------- 0.1 slothublimit.lua ---------------------------------------------------------
added hub/slot/(H/S)ratio/limit check by connection type -- this was the original purpose lol
added op clients - you can set which client(s) can only be used by ops
added welcome text, which shows all info on the user
added IP clone check, thx Mutor
added fake share check, thx plop for list :)
added client check, currently not supporting NMDC and DC:PRO, complete support for oDC, DCGUI, StrongDC++, DCDM++, DC++k CDM, rmDC++, recognizes 13 DC++-based clients and disconnects unrecognized tags - thx plop, Optimus & Herodes (for the client collection)
added tezlo's $UserIP function
added nick prefix and bad char check in nick, thx Mutor & plop (for the array :P)

-------------------------------------------------------------------------------------------

well i wanted to wait till september when i finished 0.2, but the ideas came... lua scripting is like eating candyies: you simply cant finish
note that about 75% of this script has been written from scratch, and i had no internet, so i had to run 10 clients lol
Everything could have been anything else and it would have just as much meaning.

zinden

Where can i download it?
I dont see any download from here anyway....
And i dont want to go to a hub to get it....
Xion++ - Where it all begins
http://www.zinden.net

bastya_elvtars

It is currently in development stage, as i had no internet at home, so i have to test it for a few weeks before release. In that hub you just see if its good 4 u or not, and PM me suggestions, so we can discuss it in realtime, which i lke better. I will release it as it gets 'free' from bugs, and as the resource usage is made as low as possible. I hope you understand me all.
Everything could have been anything else and it would have just as much meaning.

REBEL

Hi bastya_elvtars
Saw the LawMaker working on your Hub,
Looked very good as a user,
on the user side i dont know of anything else to suggest.
On the OPs side i have found the commands mostley used are timeban, kickban which gets nick and ip,kick,
some other op commands are never used like banip, ban nick,

As you know i will allways try things. So please do let me know when you realese it.
Keep up the good work. and take a break now and again,so you dont burn ya self out :)


Take Care  REBEL

bastya_elvtars

I have had many questions related 2 this subject. So: I wanna release it, but new and new bugs occur. So before trying to send it to others, i want to make it as bug-free as possible. The hardest part is the client check part, it always introduces new and new things to fix - note that i originally made this script without internet. Wit many thanx to Typhoon, i could get rid of some annoying bugs, and that fatal bug that crashed the whole script. Now I am gonna add some (atleast basic) logging part, and a whois, then i will send it to beta testing i guess.

I hope you can understand that i want you good when i dont release it immediately.

;)
Everything could have been anything else and it would have just as much meaning.

bastya_elvtars

Quote[20:15] ------------------------------------------------------------
[20:15] Current stats:
[20:15] ------------------------------------------------------------
[20:15] Version: PtokaX DC Hub 0.3.3.0 build 15.25 [debug] built on Dec 15 2003 18:48:35
[20:15] Uptime: 1 days, 5 hours, 20 minutes
[20:15] Users (Max/Peak/Logged) : 2000 / 107 / 95
[20:15] Unknown commands: 1 x
[20:15] PM commands: 478 x
[20:15] Key commands: 48019 x
[20:15] MyINFO commands: 54187 x
[20:15] ValidateNick commands: 48016 x
[20:15] GetINFO commands: 1046140 x
[20:15] Password commands: 26 x
[20:15] Version commands: 47596 x
[20:15] UserIP commands: 18 x
[20:15] GetNickList commands: 47542 x
[20:15] Search commands: 12709 x
[20:15] SR commands: 23917 x
[20:15] CTM commands: 11647 x
[20:15] RevCTM commands: 3050 x
[20:15] ------------------------------------------------------------
[20:15] CPU usage (60 seconds average): 100.0%
[20:15] MEM usage: 1714 kB
[20:15] ------------------------------------------------------------
[20:15] SendRestsPeak: 3
[20:15] RecvRestsPeak: 3
[20:15] Listing end.
Everything could have been anything else and it would have just as much meaning.

bastya_elvtars

#6
CHANGELOG
------------------------------------------------------------------ lawmaker 0.7 RC
-----------------------------------------------------------------
added: offline userinfo and database with cleaner (thx NightLitch)
changed: LastSeen and userinfo parsing ---> DAMN lowered resource usage
fixed bug in Warn
fixed: MaxKicks bug
fixed: builtin kick bug
Everything could have been anything else and it would have just as much meaning.

bastya_elvtars

#7
now im gonna add a userinfo database, some logging part, the whois, and i think we can start testing.

-- EDIT

I think we are all getting close 2 release, lawmaker is way stable, needs little resources and most thingies added.
Everything could have been anything else and it would have just as much meaning.

bastya_elvtars

Okay, who would like to be a beta tester, PM me or find me on testhub and will get an unredistributable, compiled RC version. The number of testers is limited, i dunno what will b the max ppl who get it.
Everything could have been anything else and it would have just as much meaning.

Psycho_Chihuahua

sure i'd love to test it

i aint got so many Users though (about 50 regular Users at the moment)

+ their all German speaking lol
PtokaxWiki ?PtokaX Mirror + latest Libs

01100001011011000111001101101111001000000110101101101110011011110111011101101110001000000110000101110011001000000101010001101111011010110110111101101100011011110111001101101000

bastya_elvtars

Sorry, no language support atm...

it would be hard 2 write and my main profile is not computering. This needs lot of time, altho help would be appreciated on it.

PM me the hub address and the hub name if you wanna test it.
Everything could have been anything else and it would have just as much meaning.

Psycho_Chihuahua

hmm well i did a german Translation for THoR 2.0 including all Files that had any sort of message shown, so i guess i'd be able to translate it to German if you need it.

Well i'd have to do so for the Hub i'd intend to test it on.
Thats the irony of living in the central of German speaking Europe. So I try to help by translating good scripts to german.
PtokaxWiki ?PtokaX Mirror + latest Libs

01100001011011000111001101101111001000000110101101101110011011110111011101101110001000000110000101110011001000000101010001101111011010110110111101101100011011110111001101101000

bastya_elvtars

QuoteOriginally posted by Psycho_Chihuahua
hmm well i did a german Translation for THoR 2.0 including all Files that had any sort of message shown, so i guess i'd be able to translate it to German if you need it.

Well i'd have to do so for the Hub i'd intend to test it on.
Thats the irony of living in the central of German speaking Europe. So I try to help by translating good scripts to german.

no need if no1 wanna test it :D

saying again: PM me your hub name and address if u wanna become a beta tester.
Everything could have been anything else and it would have just as much meaning.

bastya_elvtars

#13
well, i decided to make a public beta release instead, there are known bugs (not major), but...

so get it now, enjoy please

Lawmaker 0.7 RC 0.330 version
Everything could have been anything else and it would have just as much meaning.

[=robbase=]

Hello mate,

Great lookin script.... gave it a spin earlier.. nice!

1 thing I noticed is that it's temp banning users, I asume these are ppl that aint passing the connection/slot/hub rules?

I would love to get a copy of the right click script aswell, so I could personalise it a small bit

Keep up mate!

 :D

bastya_elvtars

#15
QuoteOriginally posted by [=robbase=]
1 thing I noticed is that it's temp banning users, I asume these are ppl that aint passing the connection/slot/hub rules?
 :D

that is because of hammering

f***ing donkey and nmdc reconnect aggressively

x reconnects in 15 mins causes a timeban, see config file

on the right click: ill make it a module, so u can customise it.
Everything could have been anything else and it would have just as much meaning.

REBEL

Hi bastya_elvtars

sorry ive been away and just noticed you have released the Lawmaker :)
now ive unzipped it to the scripts folder in Ptokax.
configured everything, but restart scripts on hub and it does not show up.
but did notice a couple of bits in the main script of Ptokax.
as im useing TD4 or is this script only compatable with higher.

bastya_elvtars

forgot to say

it works with TD4 as well, only !topic does not work

as i have much time, i will add a topic support and release a separate testdrive version, or something that omits this.

it must work with testdrive although.
Everything could have been anything else and it would have just as much meaning.

Robban

Your links does not works ;)

bastya_elvtars

#19
QuoteOriginally posted by Robban
Your links does not works ;)

Sorry, i cannot properly install omnihttpd as service, windows is simply refusing to start it, and i keep fprgetting to start it manually. If i fix this prob, the link will br 24/7 online.

----------- EDIT

i found a bug in lawmaker, it stored 4500 users' info in 3 days cause of many donkeys/others disconnected. Now this is fixed, script updated, please DL it again!
Everything could have been anything else and it would have just as much meaning.

Robban

#20
I get this messages all the time then I try to connect. I have try 3 diffret clients to join but none works (fulDC,DC++,DCDM)

[02:45:09] This hub is running PtokaX DC Hub 0.3.2.6 TestDrive 4  (UpTime: 0 hours, 50 minutes)
[02:45:09] *** Stored password sent...
[02:45:09] Invalid, hidden or missing tag!!! Please get DC++ or an appropriate mod, or DC:PRO! Linux users get DCGUI...
[02:45:09] Disconnects...
[02:45:09] *** Disconnected


Can I shut this function off?

bastya_elvtars

#21
ok, i have 2 go for 3 days, but on monday i will start testing it on TD4, as i had no facility 2 test it.
Everything could have been anything else and it would have just as much meaning.

bastya_elvtars

DAMN

there was a st00pid mistype so the link did not work at all. From my signature u can get it now, plus I updated so it works for DCGUI ---> multiplies the limit amount with the no. of slots, so it reports and takes in count the whole b/w limit (thx Nyufszi & MaciLaci)
Everything could have been anything else and it would have just as much meaning.

REBEL

Hi bastya_elvtars
ive got the script to work in the TD4 and DLd your latest update, as suggested above.
But im getting the same error as Robban.

Hub-Security> This hub is running PtokaX DC Hub 0.3.2.6 TestDrive 4  (UpTime: 0 hours, 0 minutes)
*** Stored password sent...
Invalid, hidden or missing tag!!! Please get DC++ or an appropriate mod, or DC:PRO! Linux users get DCGUI...
Disconnects...
*** Disconnected

ive tried all my client.

6Marilyn6Manson6

#24
HI bastya_elvtars. Error in LawMaker. In help of OPerator and SuperOperator you see:


!addkick             Deletes a random kick message.


but for this command you use   !delkick

Rename   !addkick             Deletes a random kick message.     in     !delkick             Deletes a random kick message.

bye bye

SMF spam blocked by CleanTalk