Welcome to the PtokaX Wiki!
This wiki is devoted to let users share information on the great hubsoft PtokaX. However, it is not limited to PtokaX, it is destined to share and discuss information on different parts of the LUA programming language, but the site is NOT intended to be a replacement for the primary LUA Board aka the PtokaX Portal, nor the secondary LUA Board or the PtokaX resources.
If you’re not familiar with wikis then in short: they are user-contributed sites: pages can be edited by (almost) anyone. As such, there is always kind of up-to-date and (hopefully) proper content. They are better than forums, since relevant pieces of information are on the same page. Do not hesitate to share your knowledge, and we all hope you can learn and teach a lot here! — bastya_elvtars
Trace: » Text editors for coding LUA » Introduction » About the Wiki » Tips on scripting in API v.2 » PtokaX Service Installation Guide » The Operating System Library in Lua 5.1.x » Overview of the PtokaX API2 » Using the string library in LUA » Metatables and metamethods » Setting up PtokaX
Most of this stuff was written by Herodes and [NL]Pur. — bastya_elvtars 2005/08/18 21:12
Setting up PtokaX
This page should help you set up your favourite hub software. :)
Network
In this screen one can define the very basic settings in order to make the hub ready to start and accept connections.
Hub name
Here you must enter some text that will be the name of your hub.
Hub topic
Here you can give a hub topic. A hub topic whould normally be something users are talking in the hub about. The Hubtopic is showed in most client next to the hubname.
Primary TCP port
Primary port is the port that is going to appear after the hub address on the hublist. By default this port is set to 411.
Secondary TCP port
Secondary port enables you to give a bit more service to your users. It may be possible that the primary port is blocked by a firewall between a user and the hub. When you have a second port open on a exotic high number the change is very slim that this is blocked also.
UDP port
This port is only used for receiving active search results.
Do NOT search for files serverside, use DCDM++ with ADL or a similar tool. Or, you can write a bad file searcher if you would like to, but for an average user, it will take 2 days to set up, and will use lots of RAM and CPU.
Hub address
Here you must specify the address to which the users must connect to in order to log in to the hub.You may want to specify 127.0.0.1 or localhost if you want to run a hub localy, for example, for testing your scripts.
Admin's nick
This nick is used when you type messages in the Admin chat. Admin chat is located under the Users/Chat tab.
Hub description
This will be the description that will acompany the hub's name in a hublist view. This can be of any size. It is a good policy to specify something here as it helps people of the same interests find your hub easier ( using the Filter field on the Public Hublist window of any dc++ based client. For Example if your hub is targeted to Classic Metal music then you would want to add “Classic Metal” to your description.
Anti MoGLo Description
With this box checked the moglo search client will not be able to connect to your hub.
Redirect address
Specify any IP or DNS to send users to when redirecting them. There are two check boxes below ( Redirect all connecting users & Redirect users when hub is full ). The first one is used to stop accepting connections to the hub instead of accepting it will redirect, and the second one will redirect if the User count of the hub is above the Max. Users Setting (see below).
Register address
This field will setup the hublist registration servers for this hub. Hublist registration servers are needed when you want your hub to have the best possible advertisement. After starting the hub it should take some days before it appears on the hublists. The field is accompanied by a checkbox that decides whether or not to contact those registration servers automatically (this is done at a default interval). Registration servers can be added in the formats: address, address:port. The default port they listen on is 2501. If you want to add multiple servers, you can do it by separating every address[:port] with a semicolon.
Hub autostart
When this box is checked , the hub will automatically start to listen when the software is loaded.
Max users
This setting will only accept numerical input. It is the limit of incoming connections to the hub. Basically you say to the hub accept no more than xxx users. The maximum number is 5000. Be sensible!
MOTD
The meaning of this acronym is giving away the meaning of this field's existance. It means “Message Of The Day” and it is the message every single connecting user will see when loging in the hub. Information about the hub itself is usally found in this text. The text in this field is saved in a file called motd.txt in the cfg subdirectory of the main PtokaX folder. Do not change the file itself while PtokaX is running, any changes will be discarded… Use the gui ( this big text field ) to change the contents. If there are no contents then there will be no MOTD message sent to the connecting user, even if the Disable MOTD checkbox is unchecked.
Disable MOTD
When checked it the MOTD will not be sent at all.
Send MOTD in PM
When this box is checked the MOTD will appear in a Private Message window instead of being showed in the mainchat window.
:!:Note that if hub bot is disabled and this checkbox is ticked, it's likely that users' clients will ignore it and the whole MOTD thing becomes a waste of bandwidth. — bastya_elvtars 2005/08/18 21:12
Start Hub
By pressing this button the hub should start serving users (the button will turn to Stop Hub). Check that you can access the hub by accessing the address in the Hub Address field with a client like dc++ as soon as you press the Start Hub button.
Some errors can pop up if port is in use or address is wrong etc. These are WinSock eror messages, and should be listed here by a geek. — bastya_elvtars 2005/08/18 21:12
Users/Chat
Admin's chat
This window shows a chat window (Admin's chat) and a userlist, it is a bit like a DC client. The Main difference is that every raw data sent to the hub can be seen here. This includes searches, private messages, connection requests etc.
You can chat from here, in this case the Admin's nick will be used as nick.
Chat
When this checkbox is enabled, chat messages can be seen in the window, nothing else.
CMDs
When this checkbox is ticked, every (non-chat) command is shown in the chat window. It's unfair to spy others' private messages!
:!:Be aware of the fact that the more data is in the window, the more memory is used by PtokaX. So this option is for debuging purposes only.
As far as I know, the memory used by contents of the chat window never gets released. So this option should be used wisely, or PtokaX must be restarted in order to release mem. — bastya_elvtars
Mass message
When you press this button, the line you type is sent in PM to all users. Note that as admin's nick is never registered in the userlist, this is quite a redundant feature.
Redirect all users
This button will immediately redirect all users to the default redirect address. Use with caution!
Ops/Bans
On the Ops/Bans page you will create your profiles and user accounts. Profiles define user groups. By default you are provided with four profiles, Master, Operator, VIP & Reg. It is not necessary, but you may set the permissions for each profile by clicking on the [New] button. From the New User window, click the [Launch profile manager] button.See the Profile Manager and Profile information below. Descriptions for other fields are provided below. With Profiles set the way your want, add your user accounts. Provide a Nickname and a Password and select a profile, click accept to save or discard to cancel. Add additional users in this manner. You may also add users accounts by command in your DC client. See the Running and using PtokaX section for more on hub commands.
Registered users
List of all registered users
Temporal Bans
List of all temporarily banned users.
Redirect / Redirect Address
Redirect temp banned users? If enabled supply redirect address.
Permanent Bans
List of all permanently banned users.
Redirect / Redirect Address
Redirect permanently banned users? If enabled supply redirect address.
The following information will be covered in greater detail in the Running and using PtokaX section. This brief information is offered here as you will want to create a Master account for yourself as the hub owner.
Nickname
Provide a name for the user.
Password
Provide users password.
User profile
Choose the profile for this user.
Launch profile manager
Here, you can set create profiles and set profile permissions.
Rules
Through the Rules page you can set the hub rules as you'd like. Rule values may be set and also choices on action to take when a connecting user fails to meet the rule.\\For example you may set a minimum share value to 10Gb, users connecting with less than 10 Gb share will not be allowed to enter the hub. Optionally you may set the message they will receive if denied entry. If you'd like to redirect them to another hub you may set the redirect address for that rule. Descriptions for each field are provided below.
Min Share/Max Share / Units
Minimum and maximum file share required/allowed for hub users
Message Min/Max share checker
Message to send user if they do not meet min or exceed max share.
Redirect
Redirect users with too low or too high a share? If enabled, set address.
MinSlots / MaxSlots
Min slots required / Max slots allowed, number of slots allowed to users
Message Min/Max slots checker
Message to send user if they do not meet min or exceed max slots.
Redirect
Redirect users with too low or too high a slot count? If enabled, set address.
Hubs / Slot ratio
Additional slots required per hub user is connected to. [Ex. User is connected to 3 hubs and min slots is set to 2, ratio is set to 1, user is required to have 4 slots open]
Message Min/Max slots checker
Message to send user if they do not meet min or exceed max slots.
Redirect
Redirect users with too low or too high a slot count? If enabled, set address.
Max Hubs
Maximum number of hubs user may connected to.
Message Max hubs checker
Message to send user if they exceed max hub setting.
Redirect
Redirect users if they exceed max hub setting? If enabled, set address.
Users without DC tag
What to do with user clients without tag Accept = allow tagless client, Reject = deny entry of tagless client Redirect = redirect tagless clients
Message to send
Message to send user with tagless client. This message is sent if rejecting or redireting tagless client.
Redirect
If redirect is enabled, set address.
Check nick names
If you want to allow only particular nicknames (or exclude special ones) define a nick name rule by using regular expressions here. Not familiar with Regular Expressions? Checkout this Regular Expressions - User guide
Message to send
Message to send user if they fail nickname check.
Redirect
Redirect users if they fail nickname check? If enabled, set address.
Nick limits
In this field, you can restrict nicknames to aminimum and maximum length.
Min Length
Minimum charachters required in a user nickname. Less charachters than this setting will fail the check.
Max Length
Maximum charachters allowed in a user nickname. More charachters than this setting will fail the check
Message to send
Message to send user if they fail nick limit check.
Redirect
Redirect users if they fail nick limit check? If enabled, set address.
Script Editor
With the script editor, you can load and edit your scripts, toggle them on and off in the script list and set their load priority. Once a script is enabled (checked) click Restart scripts . Script status or errors, if any, will be displayed in the lower pane.
Note: Simply loading the script into the editor does NOT execute it. You must save your scripts using the .lua file extension. Save them in the hub's /scripts folder.
Click Restart scripts to refresh the script listing. Take note of the Check syntax button as well as the status bar and memory usage display. If you hadn't yet noticed, transmit and receive speeds have been added to the status bar. By default, scripting is enabled, if your scripts won't run, ensure that the Enable scripting option is checked on the Options page.
Edit Box
Displays code of loaded script.
CLS
The CLS button in the upper right corner of the Edit Box, will clear the contents of the Edit Box.
Status Box
Displays status of loaded scripts
CLS
The CLS button in the lower right corner of the Status Box, will clear the contents of the Status Box.
Move up
Clicking this button will move the highlighted script name up in the Script List. Scripts are loaded from the top down. To execute this script before others, use this button to place it above the other scripts.
Move down
Clicking this button will move the highlighted script name down in the Script List. Again, scripts are loaded from the top down.
Script List
Displays all script files in the scripts folder. Enable/disable scripts with check box
Check Syntax
Checks your currently enabled scripts for syntax errors
Restart scripts
Restart all enabled scripts
Load
Loads the script into the editor. Note: Does not execute script! Enable script(tick) and click restart scripts to execute.
Save
Save the script currently loaded in the editor. Once again, enable script(tick) and click restart scripts to execute.
Advanced
On the Advanced settings page we see a few options regarding MyINFO, for those not aware, the MYINFO is a string of information sent from your client to the hub. This string identifies you and your client to the hub. Here is a typical MyINFO string:
$MyINFO $ALL Username Apps/Scripts<++ V:0.401,M:A,H:1/0/0,S:2>$ $Cable$127.0.0.1$135040938544$|
What it means:
Command|Arg|User Nick|Description|Client|Ver|Mode|Hubs|Slots|Connection|User's IP|User's Share size
Once a users MyINFO is sent to the hub, the server must pass this message to all users of the hub, including the sender. The client should resend it's MyINFO when the information changes. The hub must resend this if it receives a $GetINFO command from any client. As it would seem, this info is sent all too often. Therefore it is somewhat wasteful of bandwidth. To conserve resources you can filter or strip this information, stop it all together or send to all users or only Operators.
MyINFO processing
Strip Description
Strip user's description out of user's MyINFO string.
Strip Tag
Strip user's client tag out of user's MyINFO string.
Strip Connection
Strip user's connection out of user's MyINFO string.
Strip Em@il
Strip user's email address out of user's MyINFO string.
Delay changes for 'x' minutes
Delay updates to user MyINFO per this setting.
Always Send full MyINFO
To all users
Do not filter MyINFO strings, send to all users.
Only to Ops
Do not filter MyINFO string send only to Operators.
Don't send
Always send to all filtered MyINFO.
Add user mode to MyINFO
Include user's client mode in user's MyINFO string.
Add user mode to Description
Include user's client mode in user's Description string.
Log Main Chat / Filename
Log main chat to text file, if enabled, set filename.
Select your language
*Not yet implemented, currently on English is supported.
Profile manager
Here, you can set create profiles and set profile permissions. By default you are provided with four profiles, Master, Operator, VIP & Reg. It is not necessary to change anything, but you may set the permissions for each profile. You may add or remove profiles as well.
Enable statistics
Enable user statistic database. *Currently this feature is not active.
Clear User statistics
Flushes statistics database *Currently this feature is not active.
Registered users only / Message
When enabled (ticked), only registered user may enter hub. If enabled, set message to send to unregistered users.
Redirect->
When Registered users only is enabled you may redirect unregistered users to another hub, if redirecting, set address.
Word-replace manager
*Disabled in this release
Max Passive search replies
Passive searches are sent through the hub. To save resources set limit for number of searches.
TemBan Time in minutes
Set default time for temporary bans, user may not enter hub until this time has elapsed.
Memory used by scripts[kB]
Displays resources used by active scripts. Displayed are, actual memory used and G.C. threshold
Options
Deflood
Multihub
About PtokaX
You are here: About the Wiki » settingup » Setting up PtokaX









