Leviathan v4.1[FINAL]
 

Leviathan v4.1[FINAL]

Started by Cêñoßy†ê, 09 January, 2009, 21:56:25

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Cêñoßy†ê

Here is last Leviathan from us ;D

There might be some bugs still as usual, but i bet you can get alot help for those from other scripters here.
Thx for using our little baby sofar but we stop here and let you guys continue it  ::)

Leviathan v4.1
	Tested on 0.4.1.1 (Windows)

Fixed:
	-- changed few saveTableToFile --> SaveToFile (reported by [NL]ben)
	-- Bug with raport command (raported by [NL]ben)
	-- Bug with account protection
	-- Bug in banip (thx Smurffiina)
	-- bug when starting/stopping timed messages when theres no messages
	-- bug when starting/stopping topic changer when theres no messages
	-- bug with rename command
	-- bug when warning/kicking offline user
	-- Typo @line when script makers logged in (thx Ferdi)
	-- bug with repass command (reported by Mikkis)
	-- bug with login/logout messages (DC++ 0.7xx clients) (reported by baba.runner)
	-- bug with ip advertising (Thx Goku)
	-- bug with temp ban @ advertising
	-- file path bug with 0.4.1 series PX
	-- slots command bug (hopefully) * copyed mostly from SlotBot 2.1 LUA 5.1x [Strict] [API 2] by Mutor *
Added:
	-- missing 'change' to !redirect commands rightclick
	-- Offline message senders Profile saved to table (request by Stormbringer)
	-- Country Code and name to myinfo/userinfo/loginmessage (0.4.1.0RC1 -->)
	-- Adjustable name for main clean command (!setcleanname <new name>)
	-- Chosable rightclick/help language for registered users
		*** inbuild ***
		-- eng
	-- Offline time to !showusers (if user is offline)
	-- characters  ? ? to forbidden in nicks/botname
	-- Chatranks (based to HubRanking Bot made by Optimus)
	-- table to settings.ini for adjusting how many empty lines will cleanmain send (["chatcleanlines"] = 20000)
	-- User Description check for possible advertisers (reads from advertising permissions for profile)
	-- Kick & Warn logs (ban loggin inbuild in PtokaX) (requested by BD)
	-- Userinfo file backup (LV_DataBase/tbl/UserInfo.tbl[BackUp])
	-- Counters file backup (LV_DataBase/tbl/counters.tbl[BackUp])
	-- Scan if new users registered from px gui or delregistered from px gui
	-- Option to disable releasepart manually (CmdHelpSettings.tbl) 		(request by evilution1 & Tommy666)
		*** ["disable"] = false,  or ["disable"] = true,
		*** addrel,delrel,showrel
	-- Option to choose can user selfreg own nick or does request go to operators (manually at CmdHelpSettings.tbl)
		*** ["opchat"] = 0, or ["opchat"] = 1,  'under command regme'
Changed:
	-- Rightclick commands structure so its easyer to choose how they show
	-- Minshare/Maxshare/Minslots/Maxslots/Maxslots redirect message (thx Vipertje)

-----------------------
LV 4.1 FINAL
-----------------------
	[FIXED] Commands.lua:2183: attempt to concatenate local 'passw' (a nil value)
Powered By Leviathan™ 2nd Generation v. 1.9

2Ceedz

Really wish i could continue your work, but all i can do is edit a thing or two in LUA.  Thanks for all your time, work, and support.  I love leviathan, and hopefully someone with scripting skills can take it over.
Thanks again!!
8)

?StIfFLEr??

When the script is started ptokax hangs please can you have a look into it.

ATAG

It's normal if you have many (1000+) registered users on a weak machine.

?StIfFLEr??

I wish it had been true.
But it's the same with a fresh ptokax with 0 reglist.

HyperT3nsion

am using leviathan 4.0 right now...
but will change to 4.1

:D

I was really looking for a nice all in one script
http://www.dscmz.co.cc <--- My Website

Ptokax Rules...

CrazyGuy

Quote from: †StIfFLEr†™ on 10 January, 2009, 17:16:59
When the script is started ptokax hangs please can you have a look into it.

Quote from: †StIfFLEr†™ on 13 January, 2009, 08:07:31
I wish it had been true.
But it's the same with a fresh ptokax with 0 reglist.


Quote
[15:14:21] *** Connecting to 127.0.0.1:411...
[15:14:21] *** Connected
[15:14:21] <Leviathan_4.1> This hub is running PtokaX DC Hub 0.4.1.1 (UpTime: 0 days, 0 hours, 4 minutes / Users: 0)
[15:14:23] <Leviathan_4.1> Welcome to PtokaX
[15:14:23] <Leviathan_4.1>


   -------------------------------------------------------------------------------------------------------------------
   Hub Information:
   -------------------------
   Welcome:      CrazyGuy, It's nice of you to stop by...
   Hub Name:      <Enter hub name here>
   Hub Address:      127.0.0.1:1209;411
   Hub Topic:      n/a
   HubOwner:      C??o?y†?
   Uptime:         4 minutes
   Peak Users:      1
   Hub Share:      0.00 B
   There Are Now:      0 of 250 max users online.
   -------------------------------------------------------------------------------------------------------------------
   Your Information:
   -------------------------
   Username:      CrazyGuy
   User Profile:      User
   IP Address:      127.0.0.1
   Country:         [??] Unknown
   DNS:         localhost
   Share Size:      2.25 GB (2414107314b)
   DC Tag:         <++ V:0.401,M:A,H:1/1/12,S:3>
   Description:      testdescr<R2++ [029L]>
   Email:         n/a
   Connection:      Cable(10M+/1M)
   -------------------------------------------------------------------------------------------------------------------
   Hub Powered by PtokaX 0.4.1.1 Lua 5.1 Running Leviathan v 4.1[FINAL] from C??o?y†? & T?M?†r?V?ll?R


[15:14:23] <Leviathan_4.1> *** 16 'ENG' Usercommands enabled for your Profile 'User' and sent to your client. Type !help to get list of main script commands!

It appears to be working fine here, which is not that suprisingly. If it wouldn't have worked, it probably wouldn't have been released ;)
In my test I've used PtokaX 0.4.1.1 with GUI on WinXP SP3 (clean PX and LV install)
If you used a different PX or O/S, please provide that. (Such info is always good to have when trying to duplicate results)

HyperT3nsion

it doesn't hang for me
it is working fine
http://www.dscmz.co.cc <--- My Website

Ptokax Rules...

CrazyGuy

Yes, but my answer was to the 1 I quoted, not you :)

HyperT3nsion

Ok... no problem...
just an observation
Leviathan is very good...
i am liking it a lot...
Always used... since my first hub...
hehe
http://www.dscmz.co.cc <--- My Website

Ptokax Rules...

[NL]ben

<Mario> 

   Script error found, please raport this to http://forum.ptokax.org
   Post raport to Lua 5.1.1 All in 1 scripts Leviathan section with this message:
   Leviathan v4.1[FINAL] PtokaX 0.4.1.1 Lua 5.1 
   LV_DataBase/lua/Messages.lua:69: attempt to call method 'Disconnect' (a nil value)

<Mario> *** Error Logged !
<Mario> *** Detected Error that is allready Logged !

i got this error
member of the thnns network
hollandse-mp3-paleis.no-ip.info

ATAG

Find the messages.lua and change 69th line from:
user:Disconnect()

to:
Core.Disconnect(user)

Karail

[21:35:58] <Leviathan_4.1>

   Script error found, please raport this to http://forum.ptokax.org
   Post raport to Lua 5.1.1 All in 1 scripts Leviathan section with this message:
   Leviathan v4.1[FINAL] PtokaX 0.4.1.1 Lua 5.1
   LV_DataBase/lua/Functions.lua:353: attempt to index field '?' (a nil value)


i need help to resolv this error .
Please help me ...

Gab.

CrazyGuy

Quote from: Karail on 02 February, 2009, 21:41:17
[21:35:58] <Leviathan_4.1>

   Script error found, please raport this to http://forum.ptokax.org
   Post raport to Lua 5.1.1 All in 1 scripts Leviathan section with this message:
   Leviathan v4.1[FINAL] PtokaX 0.4.1.1 Lua 5.1
   LV_DataBase/lua/Functions.lua:353: attempt to index field '?' (a nil value)

Functions.lua:353
local minslots,maxslots,maxhubs = Prf[user.iProfile].Slot.Min,Prf[user.iProfile].Slot.Max,Prf[user.iProfile].MaxHubs


Found somewhere else
SaveToFile(ProfileSettingsFile,Prf,"Prf")


LV_4.1.lua:36
ProfileSettingsFile = Path.."LV_DataBase/Profile_Settings.ini"



The error indicates missing entries to the table Prf
Prf is the table saved in LV_DataBase/Profile_Settings.ini

I'm suspecting you manually edited this file, changed permissions and even added or removed a profile.
Whatever you did, your changes to the file resulted in an incomplete table for a(t least 1) specific profile.

Make sure you edit the file correctly, copying all of a profile and then edit each field to match a new profile.
If you cannot find an error in your Profile_Settings.ini file, delete it and use the original that came with Leviathan 4.1

CrazyGuy

#14
I've made an update patch to permanently fix the error reported by [NL]ben.
While doing so, I've found a few more similar errors and corrected those straight away :)

Quote
Leviathan patch update to version 4.1.1
By CrazyGuy
2009/02/03
Fixed:          Description string of bot (wasn't shown because of too long)
Expected fix:   D2AF ('if' always produced false because of API error)
Fixed:          About 10 more API errors (see LV_DataBase\Changelog.txt)
Updated version to 4.1.1


Notes:

  • This is only a patch, install Leviathan 4.1[FINAL] attached to C??o?y†? post first
  • Unpack the patch in your scripts folder, overwriting the existing files
  • This patch does not alter any of the configuration files, so your own settings will still exist after installation

EDIT :Patch updated and re-attached at 09:30:56 2009/02/03 with few more fixes to D2AFF functionality (thnx Madman)

jokunick

I just noticed something weird, when I was trying to ban offline user. (or offline users nick)
[19:07:52] <[Admin]Cain> !nickban xxxxxx
[19:07:53] <#Raziel> *** Wrong command !! User is Online please use !nameban
[19:07:59] <[Admin]Cain> !nameban xxxxxx
[19:07:59] <#Raziel> *** Wrong command !! User is Offline please use !nickban

The user I was trying to ban was offline the whole time. I also tried that with nick that hasn't been ever used in my hub with same result.
And is there something broken with !getbans command or is just me?

CrazyGuy

Quote from: jokunick on 04 February, 2009, 18:20:41
I just noticed something weird, when I was trying to ban offline user. (or offline users nick)
[19:07:52] <[Admin]Cain> !nickban xxxxxx
[19:07:53] <#Raziel> *** Wrong command !! User is Online please use !nameban
[19:07:59] <[Admin]Cain> !nameban xxxxxx
[19:07:59] <#Raziel> *** Wrong command !! User is Offline please use !nickban

The user I was trying to ban was offline the whole time. I also tried that with nick that hasn't been ever used in my hub with same result.
And is there something broken with !getbans command or is just me?

Yes, I get the same things. Will look at it tomorrow.
Has !getbans ever worked in this version ?

jokunick

BTW Is there a easy way to add profile(s) and/or customise profile(s) privileges in Leviathan?
Something like:
Owner = Can do anything.
Master = Ban, kick, reg OPs etc but no hub setting modification (other than topic that is)
Operator = Just kick and reg.
etc etc
P.S. I could live without REG profile, if I could modify the other ones...

CrazyGuy

#18
There is a way. If it is "easy" can be discussed  ;D
Setup the profiles how you want to have them in PtokaX Profile Manager.
After that open your LV_Database\Profile_Settings.ini file
You will see there additional settings for each profile. The first profile there is 0 and the last being [-1]
[-1] is used for unregistered users. The other profile numbers correspond with the profiles known to PtokaX whereas 0 is the profile shown on top of the profiles list in Profile Manager, counting up when going down in the list. Have 1 complete set per profile in the ini file.

Example 1
Quote from: PtokaX Profile Manager
Master
OP
VIP
Reg

Profile_Settings.ini

  • 0
  • 1
  • 2
  • 3
  • -1


Example 2
Quote from: PtokaX Profile Manager
TheAlmightyHubOwner
Admin
Friends

Profile_Settings.ini

  • 0
  • 1
  • 2
  • -1

(All profiles in the Profiles_Settings.ini are within [ and ] brackets but for some reason this forum doesn't allow me to place those brackets around the number 0 -->
  • )

jokunick

That was easy but Profile_Settings.ini doesn't give you all the options to allow/disallow for a profile.
Prf = {
	[0] = {
		["Login_Message"] = "no",
		["Send_RightClick"] = "yes",
		["Advertising_Action"] = "inform",
		["Slot"] = {
			["Min"] = 0,
			["Max"] = 0,
		},
		["Notify_Login"] = "yes",
		["Enable_Search_Check"] = "no",
		["Share"] = {
			["Max"] = {
				["Share"] = 15,
				["Unit"] = "TB",
			},
			["Min"] = {
				["Share"] = 0,
				["Unit"] = "GB",
			},
		},
		["Allow_Cleaner"] = "yes",
		["MaxLimiter"] = 0,
		["Block_Download_Search"] = "no",
		["MaxHubs"] = 0,
		["Clone_Block"] = "no",
		["Mode"] = {
			["A"] = 1,
			["P"] = 1,
			["S"] = 1,
		},
		["Chat_Block"] = "no",
		["Allow_USERIP_v1"] = "yes",
	},
}

If you use common sense you can figure out what does what in that part of the code.
But what about the privilages of Master (or 0) profile to change hub settings?
The rightclick that hub sends to Master profile users?
P.S. I thought that was easy. Intermediate solution please. If I mess up my hub trying to change something... Thats what backup is for. Right?
P.P.S. I see what you mean with the [ ]

CrazyGuy

#20
More per-profile related settings can be found in the LV_DataBase\tbl\CmdHelpSettings.tbl file
Only profiles allowed should be entered per command.

[NL]ben

Quote from: CrazyGuy on 03 February, 2009, 18:01:45
I've made an update patch to permanently fix the error reported by [NL]ben.
While doing so, I've found a few more similar errors and corrected those straight away :)


Notes:

  • This is only a patch, install Leviathan 4.1[FINAL] attached to C??o?y?? post first
  • Unpack the patch in your scripts folder, overwriting the existing files
  • This patch does not alter any of the configuration files, so your own settings will still exist after installation

EDIT :Patch updated and re-attached at 09:30:56 2009/02/03 with few more fixes to D2AFF functionality (thnx Madman)

thanks crazy guy i try it this evening
member of the thnns network
hollandse-mp3-paleis.no-ip.info

Xkimo

#22
(notify hub owner to change new Profiles.xml file from scriptsLV_DataBaseCfg files)

How can i change the databaseCfg so normal reg users can connect ? New at this shit. And is F..... confused ;) :(

I can only get OP?s to connect to hub. tryed to change line 69.   user:Disconnect() - to.. user:Disconnect(user) in Messages.lua  ....  but still no wictory :(

Where do i fail ?

Cêñoßy†ê

#23
Quote from: CrazyGuy on 04 February, 2009, 19:14:19
Yes, I get the same things. Will look at it tomorrow.
Has !getbans ever worked in this version ?

fixed 2 commands (!nickban &!nameban) and one function (getcommands) sry all ;)
!getbans and few more commands will work again after that getcommands fix,
function Command.nickban(user,data)		-- offline user
	local _,_,Name,rsn = data:find("%b<>%s+%S+%s+(%S+)%s*(.*)")
	if (rsn == nil or rsn == "") then rsn = "No reason given!" end
		if not Core.GetUser(Name) then
			SendMessage2("*** Nick "..Name.." got Banned by "..Cvrt.P2[user.iProfile].." "..user.sNick.." Because: "..rsn,SendWhere)
			BanMan.BanNick(Name,rsn,Cvrt.P2[user.iProfile].." "..user.sNick)
		else
			SendMessage(user.sNick,SetMan.GetString(21),"*** Wrong command !! User is Online please use !nameban")
		end
	return true
end

function Command.nameban(user,data)		-- online user
	local _,_,Name,rsn = data:find("%b<>%s+%S+%s+(%S+)%s*(.*)")
	if (rsn == nil or rsn == "") then rsn = "No reason given!" end
		if Core.GetUser(Name) then
		local victim = Core.GetUser(Name)
			if Name == user.sNick then
				return SendMessage(user.sNick,SetMan.GetString(21),"*** Pff.. bored perhaps??"),true
			end
			if not Pro[user.iProfile][victim.iProfile] then
				SendMessage(user.sNick,SetMan.GetString(21),"*** You silly mortal... you cant nameban ["..Cvrt.P2[victim.iProfile].."] with that profile!!!")
			else
				SendMessage2("*** "..Name.." from "..victim.sIP.." got NameBanned by "..Cvrt.P2[user.iProfile].." "..user.sNick.." Because: "..rsn,SendWhere)
				Core.SendPmToNick(victim.sNick,SetMan.GetString(21),Cvrt.P2[user.iProfile].." "..user.sNick.." just NameBanned your silly ass Because: "..rsn)
				BanMan.BanNick(victim.sNick,rsn,Cvrt.P2[user.iProfile].." "..user.sNick)
				Core.Disconnect(Name)
			end
		else
			SendMessage(user.sNick,SetMan.GetString(21),"*** Wrong command !! User is Offline please use !nickban")
		end
	return true
	en

function GetCommands(user,data)
	local _,_,prefix,cmd = data:find("%b<>%s+(%p)(%S+)")
	if cmd and Command[cmd] then
		if Cfg["Debug_Mode"]  == "yes" then	
			Core.SendToProfile(0,"<?Debug?LV?"..Version.."> "..data)
		end
		if Command_Permission[cmd] then	-- check if command in permission table
			if not Command_Permission[cmd].disable == true then
				if user.iProfile == 0 or Command_Permission[cmd][user.iProfile] then	-- check if  user can use command or is owner
					return Command[cmd](user,data)	-- do the command
				else	-- if user werent allowed to use command
					Forbidden(user)	-- send message
					return true
				end
			end
		else	-- if command werent in table
			return OnError("Missing command "..cmd.." at "..Path.."LV_DataBase/tbl/CmdHelpSettings.tbl"),true	-- send error message
		end
	end
end
Powered By Leviathan™ 2nd Generation v. 1.9

the-master

Testing LV on Ubuntu  ;)
exept for some typo's its running great  ;D
line 39: IPTable = Path.."LV_DataBase/tbl/IP_check.tbl" that should be IP_Check.tbl
line 44 etc: AF_IP = Path.."LV_Database/tbl/D2AFFB/IP.tbl"
AF_Nick = Path.."LV_Database/tbl/D2AFFB/Nick.tbl"
AF_Share =  Path.."LV_Database/tbl/D2AFFB/Share.tbl"
AF_Trig = Path.."LV_Database/tbl/D2AFFB/Trigs.tbl"
DNSB = Path.."LV_Database/tbl/dns.bans.tbl"
ReleaseFile = Path.."LV_Database/tbl/releases.tbl"
OfflineMsgFile = Path.."LV_Database/tbl/offline_msg.tbl"
it should be Path.."LV_DataBase/
keep on sharing :)

SMF spam blocked by CleanTalk