Commit Graph

93 Commits

Author SHA1 Message Date
a4fd04c310 Remove print unhandled in daemon mode 2015-10-20 18:02:01 +02:00
f9f54989fe Fix logger level filtering 2015-10-20 18:02:01 +02:00
f9ee107403 SocketServer: able to connect to Unix socket 2015-10-20 18:02:01 +02:00
6c244cffa0 Server: add a socket listener, able to accept client on Unix or TCP socket 2015-10-20 18:02:00 +02:00
c94d9743dd Add --logfile option 2015-10-20 18:02:00 +02:00
5e95f50fb6 Expand argument paths 2015-10-20 18:02:00 +02:00
e925c47961 New function requires_version if module want to restrict to some version for compatibility 2015-10-20 18:00:31 +02:00
aee8545e65 Fix exception if no owner defined 2015-10-20 18:00:25 +02:00
39b7ecdaa4 Add keyworded arguments in command received 2015-10-20 16:27:00 +02:00
a1e7a7cff8 Add test for socket printer 2015-10-20 16:25:39 +02:00
3004c01db4 tools/web: set timeout to 7 secs 2015-10-19 17:15:42 +02:00
c0ce0ca263 Server Factory: Handle URL arguments without value 2015-10-19 17:15:42 +02:00
2f1f573af2 Fix abstract name of to_server_string function 2015-10-19 17:15:42 +02:00
fd99deed1d tools/web: colon char in URL precedes optional // 2015-10-15 19:26:09 +02:00
55e6550cb1 tools/web: factorize getNormalizedURL 2015-10-13 16:23:55 +02:00
68e357d037 Initialize an empty module configuration if it has any (sentinel value) 2015-10-13 16:23:35 +02:00
20105e7d98 tools/web: add a URL normalizer function 2015-10-12 13:10:58 +02:00
7102e08000 tools/feed: hardened parser 2015-10-10 23:20:52 +02:00
04dcf07fb2 tools/web: use standard unescape instead of custom function when available 2015-10-09 17:56:34 +02:00
fd8567c60c Fix module unload and reload 2015-10-08 18:28:49 +02:00
Max
c55e66dd70 [tools/web] Add header param to getContentUrl()
Add the possibility to specify headers when querying websites.
2015-10-08 02:47:42 +01:00
684806baaf Help command: skip discovery of command without name 2015-10-07 18:22:01 +02:00
ff2911dbd3 Add a subtreat method in modulecontext
This feature allows module to call the message treatment process on a crafted message
2015-10-07 18:22:01 +02:00
7970fca93a Use with section for locking threadsafe region (instead of raw calls to acquire/release) 2015-09-28 17:21:03 +02:00
080ab9a626 Fix bad event behaviour: if an event ends in less than 6 seconds, it was executed in the event creator thread (blocking it until the event end) 2015-09-28 17:20:45 +02:00
59aff52ce1 Change the behaviour of send_response in module 2015-09-28 12:45:11 +02:00
283b0d006e Add a new builtin: !echo 2015-09-28 12:45:10 +02:00
b66d7d30ed Accelerate shutdown 2015-09-28 12:27:23 +02:00
f66ed07496 Lock select lists to avoid invalid states (particularly on closing) 2015-09-28 11:59:38 +02:00
ae7526dd96 Fix double exception when invalid file descriptor found in select 2015-09-28 11:59:37 +02:00
dda78df9d2 Add new action queue, synchronized with main thread for prompt like actions (conf loading, exit, ...) 2015-09-28 11:59:37 +02:00
3cfbfd96b0 Let main thread manage consumer threads 2015-09-28 11:59:37 +02:00
a4f4bb799c Extract atom from networking module to core 2015-09-28 11:53:29 +02:00
4cb8b0f1a6 Improve help
On hook declaration, we can now add a help and/or a help_usage argument
	to provide a simple way to the user to be informed.

	For example:

	```python
	@hook("cmd_hook", "news", help_usage={"URL": "Display the latests news from a given URL"})
	def cmd_news(msg):
	    [...]
	```

	will be displayed on !help !news as:

	> Usage for command !news from module news: !news URL: Display the latests news from a given URL

	Or for module commands help:

	```python
	@hook("cmd_hook", "news", help="display latests news")
	def cmd_news(msg):
	    [...]
	```

	will be displayed on !help mymodule (assuming this hook is in the
	module named mymodule) as:

	> Available commands for module news: news: display latests news

	Obviously, both `help` and `help_usage` can be present. If `help_usage`
	doesn't exist, help on usage will display the content of help.
2015-09-24 11:29:51 +02:00
3c51b1f03b Add assertion on class initialization 2015-09-24 11:29:49 +02:00
ecd9457691 Help: display on the right place, not always to private conversation 2015-09-24 11:29:49 +02:00
d5f07ec338 Display a basic error to IM user on uncatched exception 2015-09-24 11:29:47 +02:00
760da8ef61 tools.web: don't try to striphtml content that is not str or buffer 2015-09-24 11:29:47 +02:00
9b2bc27374 tools.web: restore Python3.3 behavior: don't check server certificate 2015-09-24 11:29:46 +02:00
8988dd0d41 striphtml: also convert ´ and collapse multiple space, as HTML display do 2015-09-24 11:29:46 +02:00
9fa8902f1a Invalid fd are < 0, not only -1 2015-09-24 11:29:46 +02:00
beeb5573e1 Define class variables in __init__ 2015-09-24 11:29:45 +02:00
9686f36522 Add a function to guess the closest word for a miss input 2015-09-24 11:29:44 +02:00
e837f9c8e5 Improve formating of size function and test it 2015-09-24 11:29:43 +02:00
2b0593a51e Add tool to calculate string distance 2015-09-23 18:06:21 +02:00
c27540eb87 web: reduce timeout from 15 to 7 seconds 2015-08-26 12:18:23 +02:00
88a8e0fe59 web: can make POST request 2015-08-26 12:18:23 +02:00
0208a5d552 Allow socket to print messages 2015-08-26 12:18:23 +02:00
a00c354287 Add a factory to help connecting to servers 2015-08-26 12:18:22 +02:00
d269468287 Let consumer parse the message instead of server 2015-08-26 12:18:22 +02:00