Commit Graph

827 Commits

Author SHA1 Message Date
Tilka
832277f653 fix command syntax 2012-04-21 06:08:36 +02:00
Tilka
c525e59fa5 use arg parser in !broadcast 2012-04-21 01:56:26 +02:00
Jan Vidar Krey
781f22edab Fixed tiny memory leak on reload/shutdown. 2012-04-19 20:05:37 +02:00
Jan Vidar Krey
55030935a7 Merge https://github.com/Tilka/uhub 2012-04-19 23:17:39 +02:00
Tilka
4f0c8e0356 fix multiple optional arguments
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]".
2012-04-19 03:06:52 +02:00
Tilka
e925db2b98 small cleanup 2012-04-19 02:56:27 +02:00
Tilka
0cbb382b14 also clean uhub-passwd 2012-04-19 02:54:56 +02:00
Tilka
303dbadac2 ignore files generated by dpkg-buildpackage 2012-04-19 02:54:21 +02:00
Tilka
e408ae3eba automatically clean up plugin commands 2012-04-19 02:53:43 +02:00
Tilka
5b6ab7e1d2 minimal documentation fixes 2012-04-19 02:44:27 +02:00
Tilka
2298f09c0f update client software link
(adcportal.com has been terminated)
2012-04-19 02:43:59 +02:00
Tilka
ad5e5d2837 update compile howto link 2012-04-19 02:43:39 +02:00
Tilka
106574008f fix debian changelog 2012-04-19 02:43:05 +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
root
390b63e80a - update ./doc/uhub.conf example file for mod_chat_only.so 2012-01-31 14:48:29 +04:00
Jan Vidar Krey
5068fe8351 Cygwin/Mingw32 compile fixes. 2012-01-25 00:20:59 +01:00
root
e4df1884d2 - change order load plugins on example file 2012-01-23 15:32:05 +04:00
Jan Vidar Krey
8607b40278 Fix bug #180 - Crash after signal SIGHUP. 2012-01-19 02:58:20 +01:00
Jan Vidar Krey
a9b5c6db38 Fixed minor issues found with static code analyzis (Clang). 2012-01-13 01:31:34 +01:00
Jan Vidar Krey
0ae8a08f55 Revert "- add empty ./doc/users.db sqlite file"
This reverts commit 66215cc535.

This database is not created correctly.
Instead, create a database with the uhub-passwd tool:

uhub-passwd users.db create
2012-01-10 02:21:22 +01:00
Jan Vidar Krey
ff639d87c3 Disable SQL debugging output. 2012-01-10 02:21:22 +01:00
Jan Vidar Krey
5edf2b60d4 Fixed bug #179 - !broadcast command does not work properly. 2012-01-10 02:21:22 +01:00
root
66215cc535 - add empty ./doc/users.db sqlite file 2012-01-10 10:26:11 +04: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
f44a420970 Updated the copyright to 2012 and git version display. 2012-01-04 11:08:07 +01:00
Jan Vidar Krey
fcf6827a68 Also build the chat history plugin. 2012-01-03 22:41:56 +00:00
Jan Vidar Krey
ca3782c570 Merge branch 'mod_chat_history_work'
Conflicts:
	doc/plugins.conf
2012-01-03 23:22:41 +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
a9ed03cf38 Cleaned up the mod_welcome parse failure code. 2012-01-02 12:54:35 +01:00
root
b0a8c3251b Update plugins.conf example file for mod_welcome.so 2011-12-30 11:43:33 +04:00
Jan Vidar Krey
2ebd916992 Added sqlite as a git submodule. 2011-12-28 18:08:11 +01:00
Jan Vidar Krey
3c6254d007 Partial revert of importing sqlite into this repository. 2011-12-28 18:06:19 +01:00
Jan Vidar Krey
7b392acbf5 Format the help list appropriately (as in older versions). 2011-12-28 10:45:02 +01:00
Jan Vidar Krey
66c77d5170 Don't broadcast the \!example command when issuing it (mod_example.c bug). 2011-12-28 10:44:03 +01:00
Jan Vidar Krey
c2e25453f6 Added VS2010 project for the uhub-passwd tool. 2011-12-22 01:51:10 +01:00
Jan Vidar Krey
1700a27619 Fix bug #173 - Fix the command parsing errors. 2011-12-22 01:49:21 +01:00
Jan Vidar Krey
aa01fd40e5 Updated VS2010 solution and project files. 2011-12-22 01:43:04 +01:00
Jan Vidar Krey
5b7382a27c Added VS2010 project for mod_auth_sqlite. 2011-12-22 01:39:42 +01:00
Jan Vidar Krey
a5b02d1672 Added thirdparty sqlite code to the VS2010 project. 2011-12-22 01:39:41 +01:00
Jan Vidar Krey
fe15c4cb58 Fix VS2010 build issues. 2011-12-22 01:39:40 +01:00
Jan Vidar Krey
ecedd44fee Added %c substitution to mod_welcome to print the current user credentials. 2011-12-22 00:14:34 +00:00
Jan Vidar Krey
24e2c2090e Fix welcome plugin handle, and build issues. 2011-12-21 23:50:23 +00: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
88dd1341d2 Started working on mod_welcome which will replace the built-in file_motd and file_rules configuration options. 2011-12-21 14:31:29 +01:00
Jan Vidar Krey
b24d4b85cd Split out the command buffer code to a generic buffer. 2011-12-21 13:53:53 +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
f31fc65e1d VS2010 fixes. 2011-12-21 01:42:21 +01:00
Jan Vidar Krey
7325b15786 Fix bug #174 - Wrong check for fdatasync() availability. 2011-12-21 00:55:22 +01:00
Jan Vidar Krey
ec3afc3a44 Added a simple tool to create and manipulate the uhub sqlite authentication database. 2011-12-20 16:20:54 +01:00