GnuTLS sends a handshake with SSL 3.0 (0x0300) in the outer packet, but
mentions TLS 1.2 (0x0303) in the Client Hello. There's no real need for
uhub to validate these fields, as OpenSSL should do that itself already.
Just use the version mentioned in Client Hello for logging output.
It's not called anywhere yet.
Also reorder some typedefs, rename the ip check functions and add
struct {hub,plugin}_user parameter to on_check_ip_late(). Not sure where
to insert a call to that...
A struct plugin_hub_internals was falsely casted to struct
plugin_callback_data. This caused the contained commands list pointer to point to
a struct hub_info and commands->size took the value of a pointer to a struct
net_connection. Since size is increased/decreased every time an item is
added to/removed from the list, this resulted in some funny crashes.
This fix is a little dirty as it exports some internals.
Assuming the argument definition "?xy", it was previously not possible
to specify only x. Also, the syntax will now be shown as "[x [y]]"
instead of "[x] [y]".
Load plugin mod_topic, and it will provide 3 new user commands:
!topic - set new topic
!cleartopic - reset the topic (use default hub description)
!showtopic - show the current topic
Fix bug #185 - Args of !commands lost/damaged.
All string arguments were incorrectly freed after being added to the argument list for a command.
Instead this fix makes sure it is properly copied into a new string, and by doing so this requires
a new API for dealing with hub command arguments in a type safe manner, and also allows for each
argument to be cleaned up properly when the command is no longer needed.
This also fixes issues with parse errors for certain types, and optional arguments (previously it was impossible
to tell the difference for an integer with value 0 or if no integer was given).
All arguments can now be accessed through the new functions
hub_command_arg_reset() and hub_command_arg_next().
These functions are also exposed to plug-ins.
The argument type notations for 'n' has changed to mean nick (string),
and 'u' is used for a user (struct hub_user - must be online).