Commit Graph

76 Commits

Author SHA1 Message Date
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 875f55a401 Added a chat history plugin.
The mod_chat_history plugin provides chat history for all public chat messages.

Can be configured in the following ways:

- history_max: max number of messages stored in history
- history_default: the default number of messages to be returned when invoking !history
- history_connect: if > 0, then this number of messages is automatically sent when connecting to the hub

Removed the built-in !history command in favour of the mod_chat_history plug-in.

Make sure we unescape all chat messages before forwarding any of them to plugins.

Update example plugins.conf in documentation directory.
2012-01-03 23:22:41 +01:00
Jan Vidar Krey 2a190859bd Remove the configuration options 'file_motd' and 'file_rules'. Use mod_welcome instead. 2011-12-21 14:44:37 +01:00
Jan Vidar Krey f34f0328a3 Removed the PLUGIN_SUPPORT code, since plugin support is now mandatory. 2011-12-21 10:48:37 +01:00
Jan Vidar Krey ba26f4c5e2 Update copyright notices and added licenses to files that were missing it. 2011-12-19 10:54:47 +01:00
Jan Vidar Krey 93caa9b3c1 Fix compile warning about uninitiaized variable. 2011-12-19 00:36:53 +01:00
Jan Vidar Krey f2cb84180a Refactored command parsing.
Allows for automatically tested command parsing by splitting parsing
and invokation of the commands.
2011-12-19 00:34:45 +01:00
Jan Vidar Krey fc5e09aa9e fixup! Fix bug #171 - Race condition could allow two users with same CID or nick to enter the hub. 2011-12-12 12:03:28 +01:00
Jan Vidar Krey b4779bfb12 Fix bug #171 - Race condition could allow two users with same CID or nick to enter the hub. 2011-12-11 13:38:36 +01:00
Jan Vidar Krey fb89307b0a fixup! Fix compiler warnings using gcc 4.6. 2011-12-09 14:21:16 +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 2396d8555c Fix bug #167 - Build errors on OpenBSD.
- Don't link with -ldl, as it is not needed in most cases
- Don't compile plugins if USE_PLUGINS=NO
- Fix warning about missing newline at end of getopt.h
- Removed the O_NOATIME open() flag from the logging plugin.
- Removed the O_LARGEFILE open() flag. _FILE_OFFSET_BITS is 64.
- Use fsync() if fdatasync() is not available for log file writing.
- Replaced some sprintf() with snprintf() due to compiler warnings (though, they were length limited otherwise).
- Replaced two occurences of strcpy() with memcpy().
2011-11-30 13:43:39 +01:00
Jan Vidar Krey 33b94d8eb4 Removed unused functions - prevents compile warnings. 2011-09-07 10:02:43 +02:00
Jan Vidar Krey 472c489ae1 Fix bug #154 - plugin system is disabled silently if one plugin fails to initialize. 2011-08-16 14:46:11 +02:00
Jan Vidar Krey a79fcd796e Shutdown SSL on close. 2011-08-16 12:07:17 +02:00
Jan Vidar Krey 3353049ae3 Several SSL/TLS related memory leak fixes. 2011-08-16 12:06:17 +02:00
Jan Vidar Krey 9b57279628 Many Visual C++ compile warnings and errors fixed. 2011-01-03 00:03:07 +01:00
Jan Vidar Krey adb6641a17 PATCH: Redirect did not work properly (Thanks MiMic)
The SID was not included in the redirect and it was thus an
incorrect ADC message which were discarded by most clients.
2010-12-29 14:40:23 +01:00
Jan Vidar Krey 67eabb5a98 Fix #157: calculation of limits for min/max share on 32 bit architectures. 2010-12-20 23:18:41 +01:00
Jan Vidar Krey 4ede1b2d8a Fix for bug #156 2010-12-20 11:52:15 +01: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 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 97feb3635e Allow plugins to provide an error message. Useful for reporting problems
when registering the plugins.
2010-07-29 08:41:26 +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 77faac0494 Fixed some minor issues found during code review. 2010-05-25 22:47:30 +02:00
Jan Vidar Krey 473ff0e159 Fix static buffer overrun - Thanks BlackSonar. 2010-05-25 22:23:40 +02:00
Jan Vidar Krey c70119870a Adding support for redirecting clients to other hubs when they fail to login
for various reasons.

Config variable is "redirect_addr".
2010-04-22 21:07:46 +02:00
Jan Vidar Krey 076492f1b9 Fix some small memory leaks. 2010-04-21 18:34:55 +02:00
Jan Vidar Krey 51c5b6169c Fix last commit. 2010-04-11 20:17:36 +02:00
Jan Vidar Krey b7e62b46cc Send message to old clients as a chat message not a status message. 2010-04-11 20:13:05 +02:00
Jan Vidar Krey 8815118fde Added flood control support.
This closes bug #79: Flood control, and rate limits
2010-04-05 16:01:07 +02:00
Jan Vidar Krey e220357176 Added configuration option to enable support for obsolete pre-ADC/1.0 clients. 2010-04-05 13:43:28 +02:00
Jan Vidar Krey 1ce258bccf Tidy up the certificate loading code somewhat. 2010-02-15 19:02:31 +01:00
Jan Vidar Krey 1b56adb8c0 Fix wrong IQUI message. Partially fixes bug #4. 2010-02-12 19:25:09 +01:00
Jan Vidar Krey 915cb56448 Fix bug #106: Show OS/CPU info in !version.
This can be controlled by the configuration variable "show_banner_sys_info" which is enabled by default.
2010-02-10 23:45:51 +01:00
Jan Vidar Krey 8065903604 Fix bug #108: share limits can be avoided.
This was due to updates to the share limit not being enforced after a succesful login.
2010-02-07 23:08:04 +01:00
Jan Vidar Krey 8e7e8c68f5 gcc v2.95 compile fixes. 2010-01-28 01:06:41 +01:00
Jan Vidar Krey c3ad006d07 Fix bug #76: added support for multiple server listen ports.
Use server_alt_ports and supply a comma separated list of ports.
2010-01-27 23:55:52 +01:00
Jan Vidar Krey 21a5981905 Make sure start_listening_socket does everything, this will lead the way to multiple listen ports. 2010-01-21 17:31:55 +01:00
Jan Vidar Krey c47ea14047 Code cleanup for starting the listening socket. 2010-01-21 01:54:41 +01:00
Jan Vidar Krey 2f09fcea84 Added select() backend which can be used as a fallback if epoll is not available. 2010-01-20 18:39:55 +01:00
Jan Vidar Krey e45511827f Added the +rules command.
Also added the +motd command to see the message of the day, which is sent while connecting.
2010-01-19 23:30:26 +01:00
Jan Vidar Krey 80c6ad9d76 Added mute/unmute functionality. 2010-01-19 23:07:55 +01:00
Jan Vidar Krey f84f3b1fff Merge branch 'master' of github.com:janvidar/uhub into sans_libevent 2010-01-19 19:35:20 +01:00
Jan Vidar Krey 1c58a85de1 More work on epoll. 2010-01-17 23:00:28 +01:00
Jan Vidar Krey 6a4b9c58f4 Work on removing libevent completely as a mandatory dependency. 2010-01-07 20:55:13 +01:00
Jan Vidar Krey b3aa5332c8 Work on epoll backend, and removing dependency on libevent. 2009-12-10 23:12:04 +01:00