35e0890563
Handle multiple SIGTERM
2017-07-19 10:36:27 +02:00
0be6ebcd4b
tools/web: fill a default Content-Type in case of POST
2017-07-19 10:36:26 +02:00
b4218478bd
tools/web: improve redirection reliability
2017-07-19 10:36:26 +02:00
6ac9fc4857
tools/web: forward all arguments passed to getJSON and getXML to getURLContent
2017-07-19 10:36:26 +02:00
7791f24423
modulecontext: use inheritance instead of conditional init
2017-07-16 21:17:48 +02:00
b809451be2
Avoid stack-trace and DOS if event is not well formed
2017-07-16 21:17:48 +02:00
8de31d784b
Allow module function to be generators
2017-07-16 21:17:48 +02:00
f4216af7c7
Parse server urls using parse_qs
2017-07-16 21:17:48 +02:00
cf8e1cffc5
Format and typo
2017-07-16 21:17:48 +02:00
97a1385903
Implement socket server subparse
2017-07-16 21:17:48 +02:00
764e6f070b
Refactor file/socket management (use poll instead of select)
2017-07-16 21:17:48 +02:00
6d8dca211d
Use fileno instead of name to index existing servers
2017-07-16 21:17:48 +02:00
1c21231f31
Use super() instead of parent class name
2017-07-16 21:17:48 +02:00
2a3cd07c63
Documentation
2017-07-16 21:17:48 +02:00
b5d5a67b2d
In debug mode, display running thread at exit
2017-07-16 21:17:48 +02:00
4c11c5e215
Handle case where frm and to have not been filled
2017-07-16 21:17:48 +02:00
a0c3f6d2b3
Review consumer errors
2017-07-16 21:17:48 +02:00
7cf73fb84a
Remove reload feature
...
As reload shoudl be done in a particular order, to keep valid types, and because maintaining such system is too complex (currently, it doesn't work for a while), now, a reload is just reload configuration file (and possibly modules)
2017-07-16 21:17:48 +02:00
6cd299ab60
New keywords class that accepts any keywords
2017-07-16 21:17:48 +02:00
24eb9a6911
Can attach to the main process
2017-07-16 21:17:48 +02:00
38fd9e5091
Remove legacy prompt
2017-07-14 12:35:55 +02:00
a7d7013639
Fix and improve reload process
2017-07-14 12:35:55 +02:00
9dc385a32a
New argument: --socketfile that create a socket for internal communication
2017-07-14 12:35:55 +02:00
150d069dfb
New CLI argument: --pidfile, path to store the daemon PID
2017-07-14 12:35:55 +02:00
f160411f71
Catch SIGUSR1: log threads stack traces
2017-07-14 12:35:55 +02:00
b0678ceb84
Extract deamonize to a dedicated function that can be called from anywhere
2017-07-14 12:35:55 +02:00
57275f5735
Catch SIGHUP: deep reload
2017-07-14 12:35:55 +02:00
ec512fc540
Do a proper close on SIGINT and SIGTERM
2017-07-14 12:35:55 +02:00
7bc37617b0
Remove prompt at launch
2017-07-14 12:35:55 +02:00
1858a045cc
Introducing daemon mode
2017-07-14 12:35:55 +02:00
aefc0bb534
event: don't forward d_init if None
2017-07-14 09:32:41 +02:00
e9cea5d010
Fix events expiration
2016-07-29 03:13:37 +02:00
358499e6d5
Expect IM keyword argument in command to be at the begining of the args list
2016-04-18 17:21:51 +02:00
5fae67255b
Log Python version
2016-04-08 12:55:24 +02:00
2c3d61495f
Welcome in 2016... Happy new year!
2016-04-08 12:55:24 +02:00
6ad979a5eb
Fix event/timer issue if very close to 0
2016-01-29 16:52:52 +01:00
ff6460b92e
Fix IRC message parameter escape
2016-01-19 18:45:14 +01:00
277d55d521
Add subparse method in context, that use server parser
2016-01-12 18:09:22 +01:00
57c460fc9c
Simplify date extraction
2015-12-23 12:50:25 +01:00
cd0dbc4cc2
Xmlparser: parser for lists and dicts
2015-12-21 14:50:48 +01:00
d59f629dd9
Xmlparser: new class that just store one node, futher nodes will be parsed
2015-12-21 14:50:48 +01:00
f47aa8c478
Load module data on first access
2015-12-21 14:50:47 +01:00
ea8656ce0d
Refactor command help: use hookmanager to get command help instead of custom search
2015-11-18 20:21:06 +01:00
0ba763f8b1
Display miss string only if no hook match on a full message treatment
2015-11-18 20:21:05 +01:00
43c42e1397
Rework hook managment and add some tests
2015-11-18 20:21:05 +01:00
31d93734a6
Fixed empty module configuration
2015-11-18 19:58:46 +01:00
e83c4091bf
Avoid catchall DirectAsk
2015-11-18 19:58:26 +01:00
38412c1c16
Suggest command(s) on typo
2015-11-13 17:06:28 +01:00
0f4a904a77
Log configuration loading
2015-11-13 17:05:52 +01:00
36cfdd8861
Added check and match module defined functions to hooks
2015-11-13 17:05:27 +01:00
c06fb69c8b
Extract tools.config as config module
2015-11-03 16:53:49 +01:00
f39a0eac56
Refactors hooks registration
2015-11-03 16:53:49 +01:00
49d7e4ced6
Hooks: add global methods to restrict read/write on channels
2015-11-03 16:35:19 +01:00
de2e1d6216
Remove Message.receivers, long time deprecated
2015-11-03 07:26:01 +01:00
ea9829b341
Check command keywords using keyword help (passed in @hook)
2015-11-03 07:23:21 +01:00
9790954dfc
Hooks can now contain help on optional keywords
2015-11-03 07:22:01 +01:00
c6aa38147b
Include some forgotten module in reload process
2015-11-03 07:21:49 +01:00
8b4f08c5bd
Replace IRCException by IMException, as nemubot is not only built for IRC
2015-11-03 07:21:06 +01:00
ac33ceb579
Remove dead or useless code
2015-11-03 07:20:52 +01:00
f496c31d1c
Help: don't append space character before ':' when the usage key is None
2015-10-31 17:45:50 +01:00
e4d67ec345
Use Channel class when creating Server
2015-10-29 15:25:54 +01:00
2fdef0afe4
addChild should return a boolean
2015-10-28 10:55:03 +01:00
c560e13f24
Rework XML parser: part 1
...
This is the first step of the parser refactoring: here we change
the configuration, next step will change data saving.
2015-10-28 10:55:02 +01:00
92530ef1b2
Server factory takes initializer dict
2015-10-28 10:55:02 +01:00
5141a0dc17
tools/web: simplify regexp and typo
2015-10-27 23:05:38 +01:00
56c43179f3
tools/web: use core xml minidom instead of nemubot xml parser
2015-10-27 23:04:54 +01:00
7400957ac2
Bump version 4.0.dev3
2015-10-20 18:02:02 +02:00
60f7c6eea7
Place MessageTreater in context
2015-10-20 18:02:01 +02:00
4af108265b
Split and rewrite message treatment from consumers
2015-10-20 18:02:01 +02:00
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