James Lu
21b8b51cba
conf: fix getDatabaseName calling the wrong variable name
2017-08-30 19:21:43 -07:00
James Lu
43b6566aa8
Move getDatabaseName from utils to conf ( #476 )
2017-08-28 20:27:39 -07:00
James Lu
819ac4d406
Move world.log_queue to world._log_queue
2017-07-20 21:16:44 +08:00
James Lu
7e8ff51646
conf: when config loading fails, show an error /before/ quitting
...
This fixes a regression from 2b346e3c01
.
2017-07-17 07:56:23 -07:00
James Lu
880d0975db
Merge branch 'type-to-isinstance' of https://github.com/cooper/PyLink into devel
2017-07-14 05:22:37 -07:00
James Lu
2b346e3c01
conf: use Python logging when avaiable when the config file fails to load
2017-07-12 22:44:51 -07:00
James Lu
fceb2efce4
conf: remove ancient migration note from PyLink 0.9.x
2017-07-12 22:24:59 -07:00
Mitchell Cooper
3e356180a0
use isinstance() for conf values as well
2017-07-12 17:38:31 -04:00
James Lu
60a0bcdc7a
Rename config option log:stdout -> log:console
...
Closes #386 .
2017-06-02 08:42:32 -07:00
James Lu
9ea9f66dd7
conf: actually pass the logger object to _log in validateConf
2017-06-02 08:34:43 -07:00
James Lu
a8c1a46e3d
core: queue messages for logging when 'log' isn't available during init
...
Closes #428 .
2017-03-15 23:00:26 -07:00
James Lu
dc298b3182
conf: join conf::bot and conf::pylink so that they mean the same thing ( #343 )
2017-03-10 23:47:07 -08:00
James Lu
8a773dea4e
core: normalize exit codes
2017-02-27 07:26:29 -08:00
James Lu
0ebb52e64f
conf: simplify newlogins checks & allow missing permissions blocks if an old login is also present
2017-02-24 21:07:28 -08:00
James Lu
0706b6cf78
Style/spacing fixes for last commit
2017-02-21 17:04:59 -08:00
Ken Spencer
a8fe353ba4
servprotect: make length and age configurable ( #417 )
...
Fixes #395
2017-02-21 17:02:26 -08:00
Ken Spencer
b3075d3414
conf: change asserts to validations ( #414 )
2017-02-21 10:10:54 -08:00
James Lu
f83a81242a
conf: reuse already-fetched newlogins value
2017-02-20 19:31:31 -08:00
Ken Spencer
07ac649763
conf: check for permissions block, per my own experience ( #413 )
2017-02-20 19:27:15 -08:00
James Lu
e7e2f2c98e
core: update "missing dependencies" errors
...
Closes #363 .
2016-12-09 17:15:53 -08:00
James Lu
b3387f2d41
conf: fix deprecation warnings crashing because log is unavailable
...
This allows conf methods to access to global logger by via an optional 'logger' argument. However,
the caveat is that the logging facilities are still unavailable on first start, because log can
only be imported *after* the configuration is loaded.
2016-12-05 22:43:01 -08:00
Ken Spencer
a173e2a61f
pylink: Warn users that configuration is changing. ( closes #361 )
2016-11-22 22:49:23 -08:00
James Lu
93ca62aa49
Revamp configuration to support multiple accounts ( #319 )
2016-11-07 21:01:28 -08:00
James Lu
9950e0948f
conf: split off absolute paths in confname
...
This fixes invalid database names such as "automode-/tmp/test.db" from being generated when PyLink is started with an absolute path to its config.
Closes #358 .
2016-11-02 22:23:45 -07:00
James Lu
c410de2fad
Make server config validation protocol specific
...
Closes #282 .
2016-07-28 21:34:00 -07:00
James Lu
0a0e19d4c2
conf: remove key checks for password fields
...
TODO: replace this with more verbose checks in protocol modules
2016-07-20 23:55:34 -07:00
James Lu
fab61729b9
conf: throw a specific error when PyYAML is missing
2016-07-19 17:47:39 -07:00
James Lu
166adcf44d
conf: add migration warning for the config file rename
2016-07-19 17:40:22 -07:00
James Lu
e4b400042e
core: make maxnicklen optional, defaulting it to 30
2016-06-27 22:39:18 -07:00
James Lu
2c0a09271c
conf: re-add dummy conf / confname so that dependant modules are still importable
2016-06-25 14:37:06 -07:00
James Lu
5a363c22af
conf: remove checks for 'channels' in server: blocks
...
This key is no longer mandatory as of ceed9346c0
.
2016-06-25 14:25:57 -07:00
James Lu
dce768017a
[WIP] conf: re-add 'fname' variable (used by REHASH)
2016-06-21 11:31:39 -07:00
James Lu
cb633cfba5
Default config file location is now pylink.yml
2016-06-21 10:59:03 -07:00
James Lu
2f188dc60d
core: Remove load-conf-on-import, implement basic command line options via argparse
...
Ref #242 .
2016-06-21 10:55:42 -07:00
James Lu
481d70eff8
New import paths for properly installed pylinkirc
2016-06-20 18:18:54 -07:00
James Lu
da7bd649d2
conf: fix testconf missing the logging: section
2016-03-11 23:14:16 -08:00
James Lu
584f952113
conf: check to make sure logging block exists in config
2016-02-07 18:01:12 -08:00
James Lu
e4fb64aeba
Document more parts of the core - comments are cool right
2015-12-06 17:40:13 -08:00
James Lu
5027feb553
Don't crash when REHASH loads a config file that's invalid
...
This was actually several bugs in one:
- The sys.exit() call in loadConf should be... toggleable
- loadConf printed errors but forgot to re-raise the actual exception it caught
- The error reply in the REHASH command was passing the wrong arguments to irc.reply(), which would cause an error within an error when it ran
2015-11-11 18:55:51 -08:00
James Lu
48831863d2
validateConf: allow autojoin channels to be empty; nothing wrong with that
2015-09-28 19:22:19 -07:00
James Lu
e84a2d1025
Modularize our import hacks, make Irc() take a conf object again
2015-09-28 19:12:45 -07:00
James Lu
630aa83084
core: add some rudimentary config file validation
2015-09-28 11:55:31 -07:00
James Lu
dfaa5036ab
Fix test cases
...
- conf: add sidrange server config variable (needed by TS6SIDGenerator)
- protocols: stop hardcoding various UIDs that may or may not exist.
2015-09-12 22:34:55 -07:00
James Lu
afd6d8c20d
Refactor conf loading; skip the file-loading parts entirely for tests ( #56 )
2015-08-29 14:20:20 -07:00
James Lu
a58bee7355
Modularize tests using common classes, add our custom test runner ( #56 )
2015-08-29 14:06:07 -07:00
James Lu
b71e508acc
classes.Irc no longer needs a conf argument; tweak tests again
2015-08-28 19:38:16 -07:00
James Lu
ad5fc97e21
Many fixes to test API, utils.reverseModes stub
2015-08-28 19:28:06 -07:00
James Lu
f786242730
Support loading different config files from the command line
...
Closes #84 . Logs, PID files, and relay DBs will name themselves differently for every instance, to prevent conflicts. The default is always config.yml.
2015-08-03 19:27:19 -07:00
James Lu
d9db7e1b9e
It's almost June! Updates:
...
- Move config handling into separate module
- Implement identify and status commands, currently only supporting the admin account defined in the config. Closes #1 .
- Move proto.add_cmd to utils.py, rename _msg() to msg()
- Allow sending the command name as an optional argument in add_cmd
- Add catch-all exception handling in plugins to prevent them from crashing the program!
2015-05-31 12:20:09 -07:00