Max
e0d7ef1314
Fix https links when available, everywhere
2018-01-14 19:19:01 +01:00
nemunaire
b15d18b3a5
events: fix event removal
2018-01-14 19:19:00 +01:00
nemunaire
5646850df1
Don't launch timer thread before bot launch
2018-01-14 19:19:00 +01:00
nemunaire
f60de818f2
Virtualy move all nemubot modules into nemubot.module.* hierarchy, to avoid conflict with system/vendor modules
2018-01-14 19:18:58 +01:00
nemunaire
45fe5b2156
Refactor configuration loading
2017-09-19 07:25:34 +02:00
nemunaire
fde459c3ff
Remove legacy msg.nick
2017-09-19 07:25:33 +02:00
nemunaire
b517cac4cf
Fix module unloading
2017-09-19 07:25:32 +02:00
nemunaire
f81349bbfd
Store module into weakref
2017-09-19 07:25:32 +02:00
nemunaire
94ff951b2e
run: recreate the sync_queue on run, it seems to have strange behaviour when created before the fork
2017-07-19 10:36:28 +02:00
nemunaire
a5479d7b0d
event: ensure that enough consumers are launched at the end of an event
2017-07-19 10:36:28 +02:00
nemunaire
35e0890563
Handle multiple SIGTERM
2017-07-19 10:36:27 +02:00
nemunaire
7791f24423
modulecontext: use inheritance instead of conditional init
2017-07-16 21:17:48 +02:00
nemunaire
b809451be2
Avoid stack-trace and DOS if event is not well formed
2017-07-16 21:17:48 +02:00
nemunaire
764e6f070b
Refactor file/socket management (use poll instead of select)
2017-07-16 21:17:48 +02:00
nemunaire
6d8dca211d
Use fileno instead of name to index existing servers
2017-07-16 21:17:48 +02:00
nemunaire
2a3cd07c63
Documentation
2017-07-16 21:17:48 +02:00
nemunaire
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
nemunaire
a7d7013639
Fix and improve reload process
2017-07-14 12:35:55 +02:00
nemunaire
e9cea5d010
Fix events expiration
2016-07-29 03:13:37 +02:00
nemunaire
5fae67255b
Log Python version
2016-04-08 12:55:24 +02:00
nemunaire
2c3d61495f
Welcome in 2016... Happy new year!
2016-04-08 12:55:24 +02:00
nemunaire
6ad979a5eb
Fix event/timer issue if very close to 0
2016-01-29 16:52:52 +01:00
nemunaire
ea8656ce0d
Refactor command help: use hookmanager to get command help instead of custom search
2015-11-18 20:21:06 +01:00
nemunaire
43c42e1397
Rework hook managment and add some tests
2015-11-18 20:21:05 +01:00
nemunaire
e83c4091bf
Avoid catchall DirectAsk
2015-11-18 19:58:26 +01:00
nemunaire
0f4a904a77
Log configuration loading
2015-11-13 17:05:52 +01:00
nemunaire
c06fb69c8b
Extract tools.config as config module
2015-11-03 16:53:49 +01:00
nemunaire
f39a0eac56
Refactors hooks registration
2015-11-03 16:53:49 +01:00
nemunaire
ea9829b341
Check command keywords using keyword help (passed in @hook)
2015-11-03 07:23:21 +01:00
nemunaire
9790954dfc
Hooks can now contain help on optional keywords
2015-11-03 07:22:01 +01:00
nemunaire
ac33ceb579
Remove dead or useless code
2015-11-03 07:20:52 +01:00
nemunaire
f496c31d1c
Help: don't append space character before ':' when the usage key is None
2015-10-31 17:45:50 +01:00
nemunaire
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
nemunaire
60f7c6eea7
Place MessageTreater in context
2015-10-20 18:02:01 +02:00
nemunaire
a4fd04c310
Remove print unhandled in daemon mode
2015-10-20 18:02:01 +02:00
nemunaire
fd8567c60c
Fix module unload and reload
2015-10-08 18:28:49 +02:00
nemunaire
684806baaf
Help command: skip discovery of command without name
2015-10-07 18:22:01 +02:00
nemunaire
7970fca93a
Use with section for locking threadsafe region (instead of raw calls to acquire/release)
2015-09-28 17:21:03 +02:00
nemunaire
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
nemunaire
283b0d006e
Add a new builtin: !echo
2015-09-28 12:45:10 +02:00
nemunaire
f66ed07496
Lock select lists to avoid invalid states (particularly on closing)
2015-09-28 11:59:38 +02:00
nemunaire
ae7526dd96
Fix double exception when invalid file descriptor found in select
2015-09-28 11:59:37 +02:00
nemunaire
dda78df9d2
Add new action queue, synchronized with main thread for prompt like actions (conf loading, exit, ...)
2015-09-28 11:59:37 +02:00
nemunaire
3cfbfd96b0
Let main thread manage consumer threads
2015-09-28 11:59:37 +02:00
nemunaire
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
nemunaire
ecd9457691
Help: display on the right place, not always to private conversation
2015-09-24 11:29:49 +02:00
nemunaire
9fa8902f1a
Invalid fd are < 0, not only -1
2015-09-24 11:29:46 +02:00
nemunaire
beeb5573e1
Define class variables in __init__
2015-09-24 11:29:45 +02:00
nemunaire
d269468287
Let consumer parse the message instead of server
2015-08-26 12:18:22 +02:00
nemunaire
000c67e45e
Can return Response in help_full function
2015-08-26 12:17:21 +02:00