Commit Graph

29 Commits

Author SHA1 Message Date
Boris Pek cf3a6e06df Secure URLs: http --> https (part 2) 2019-04-23 15:59:03 +02:00
Jan Vidar Krey de01486c0f Fix plug-in API header files. 2018-11-27 13:20:41 +01:00
Andre Schreder 2d45a37536 added broadcast message and getter for user count in plugin API 2014-10-03 15:23:36 +02:00
Jan Vidar Krey 7706e1cb8a Fix copyright year. 2014-05-14 11:39:18 +02:00
Jan Vidar Krey 52211a6bac Updated copyright year. 2013-03-22 20:00:40 +01:00
Jan Vidar Krey 20a847e1b4 Moved the ipcalc code to the network directory. 2012-10-03 12:59:05 +02:00
Tilka eb49174ab3 marked plugin callbacks that are not called yet 2012-05-10 01:37:20 +02:00
Tilka 9e52ea7eff add on_change_nick() to struct plugin_funcs
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...
2012-05-09 23:33:03 +02:00
Tilka 05fd6bb723 minimal changes 2012-05-09 23:27:06 +02:00
Jan Vidar Krey 1dba731cc3 Fix bug #158 - Added plugin for setting topic (hub description).
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
2012-04-19 00:33:38 +02:00
Jan Vidar Krey df7bbc094f Command arguments handling + cleanups
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).
2012-04-18 23:03:05 +02:00
Jan Vidar Krey eee2636582 Added a chat only hub plugin that disables searching and connection setup.
This also deprecates the built-in chat_only configuration option.
If you need this functionality, then load the mod_chat_only plugin (if it is loaded then only operators
are able to search, connect, etc).
2012-01-09 20:58:19 +01:00
Jan Vidar Krey 318163c066 Added support for dynamic commands.
Dynamic commands are user commands that can be added dynamically to
the hub by a plugin.

The example plugin (mod_example.c) adds a !example command that when
invoked send a message to the user who invoked it.
2011-12-09 10:29:50 +01:00
Jan Vidar Krey 39572c3684 Made plugin loading work properly on Windows. 2011-09-08 01:00:32 +02:00
Jan Vidar Krey 800f6a70f9 Added description to plugin_hub_info (an empty struct causes warning on VS2010). 2011-09-05 23:40:57 +02:00
Jan Vidar Krey ebe54bcf27 Added plugin events for server wide events (mostly for logging). 2011-08-16 15:11:15 +02:00
Jan Vidar Krey 21c22288a2 Simplified plugin initialization by using a macro. 2010-11-12 18:03:39 +01:00
Jan Vidar Krey 35b055f9b7 Allow for connections accepted/refused to be logged by plugins. 2010-08-11 22:46:06 +02:00
Jan Vidar Krey 4c960cb977 Added logging of chat messages in the plugin API. 2010-08-11 22:46:06 +02:00
Jan Vidar Krey c2b7ecd49c Made sure the logging plugin logs on a format that looks almost the same as we used to have in the past. 2010-08-04 17:03:37 +02:00
Jan Vidar Krey 0c6a58d35a Make sure chat messages are routed through plugins. 2010-08-03 23:19:39 +02:00
Jan Vidar Krey 93be2c584e Reworked plugin APIs slightly, added full support for authentication from plugins. 2010-07-29 08:43:22 +02:00
Jan Vidar Krey 350791cdf8 Added plugin invokers for authentication code. 2010-07-23 01:23:13 +02:00
Jan Vidar Krey c6cf03614f Implement more plugin invokers, and call them. 2010-07-23 00:38:11 +02:00
Jan Vidar Krey bdcf35b63d Cleanup code and allow for plugins to provide an error message. 2010-07-19 01:36:23 +02:00
Jan Vidar Krey 56e5557146 Cleaned up the credentials handling, and made it ready for plugins. 2010-07-12 19:05:50 +02:00
Jan Vidar Krey aa26052479 Misc plugin work
* Fix crash when unloading plugins.
* Fixed plugin loader and plugin unload handler.
* Added a new example plugin: mod_logging which logs users logging in and out of the hub to stdout.
2010-06-29 15:40:19 +02:00
Jan Vidar Krey ccaa4860b4 Started working on the plugin configuration and loader code.
The example plugin works, but does not do anything.
2010-06-13 19:34:20 +02:00
Jan Vidar Krey 7218011449 Added missing plugin file. 2010-06-07 15:42:38 +02:00