3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-12-26 12:43:09 +01:00
Commit Graph

223 Commits

Author SHA1 Message Date
James Lu
77febfe69f Allow disabling dynamic channels via a new "join_empty_channels" option 2018-10-27 18:48:12 -07:00
James Lu
bba235bba2 Update GitHub repository address 2018-07-08 12:54:10 -07:00
James Lu
0c55569c1f utils: clarify ServiceBot.(join|part) docstrings 2018-07-02 00:35:40 -07:00
James Lu
086a5f4496 example-conf, relay, utils: replace 2.0-alpha4 references with 2.0-beta1 2018-06-26 14:44:07 -07:00
James Lu
c8b8762c12 utils: add parse_duration(), which takes in a duration string and returns the equiv. amt of seconds (#504) 2018-06-15 19:40:05 -07:00
James Lu
e38cd0ada2 get_hostname_type: return 0 for hostnames instead of False for consistency 2018-06-15 14:02:30 -07:00
James Lu
5ea33baa8e utils: add get_hostname_type() to autodetect address types (#212) 2018-06-15 02:39:20 -07:00
James Lu
ed5d46e28a utils: remove deprecated is* functions 2018-06-11 23:48:12 -07:00
James Lu
c919c523dc utils: add remove_range()
"""
    Removes a range string of (one-indexed) items from the list.
    Range strings are indices or ranges of them joined together with a ",":
    e.g. "5", "2", "2-10", "1,3,5-8"

    See test/test_utils.py for more complete examples.
    """
2018-06-09 17:03:40 -07:00
James Lu
de62b2e77a utils: add strip_irc_formatting() 2018-06-09 16:22:14 -07:00
James Lu
5ac283f018 ServiceBot: introduce clear_persistent_channels() to clear all persistent channels in a namespace 2018-05-30 12:43:51 -07:00
James Lu
0ac5d424d8 core: implement text wrapping in irc.msg()
Closes #153.
2018-05-11 14:38:21 -07:00
James Lu
d1ac33a1af utils: remove references to deprecated irc.proto 2018-05-09 22:44:36 -07:00
James Lu
bf4863eb6d relay, ServiceBot: remove dead code 2018-05-05 13:20:55 -07:00
James Lu
c7da7f0025 ServiceBot: allow sending service parts with reasons 2018-05-05 13:19:43 -07:00
James Lu
e9fe15bd7d [WIP] Further revise the persistent channels implementation
- Make dynamic_channels per plugin as well as per network to work around relay-service conflicts (#265)
- Introduce ServiceBot.(add|remove)_persistent_channel() to add/remove persistent channels and optionally join/part them
- Introduce ServiceBot.part(), which checks remaining persistent channels list and parts a channel only if it is still not marked persistent
- Refactor automode to autojoin channels on ENDBURST instead of plugin load
- Refactor relay to manage persistent channels on join/part/(de)init, both locally (namespace 'relay_local') and remotely (namespace 'relay_remote')
2018-05-04 22:52:26 -07:00
James Lu
2f12a5b710 Initial work on dynamic service bot joining / parting (#265) 2018-04-12 12:45:33 -07:00
James Lu
655221491c ServiceBot: log access denials to warning - closes #593 2018-04-07 20:22:55 -07:00
James Lu
3e656cd943 utils: mark reset_module_dirs, load_plugin, get_protocol_module as private 2018-03-02 20:23:47 -08:00
James Lu
1405b01597 ServiceBot: clean up some function descriptions 2018-02-18 19:40:46 -08:00
James Lu
5e92aefcd4 Implement priorities in utils.add_hook()
This changes world.hooks to store lists of tuples indicating (priority, hook_func).
2017-09-02 21:17:50 -07:00
James Lu
9e7af9ac3d ServiceBot: migrate to irc.is_channel 2017-08-31 13:19:34 -07:00
James Lu
3922d44173 utils: rename remaining functions to snake case (#476) 2017-08-28 20:28:10 -07:00
James Lu
43b6566aa8 Move getDatabaseName from utils to conf (#476) 2017-08-28 20:27:39 -07:00
James Lu
e39b4e9c69 Move utils.is* methods into PyLinkNetworkCoreWithUtils (#476) 2017-08-28 20:07:31 -07:00
James Lu
2a7594e56e Move PUIDGenerator->classes, IncrementalUIDGenerator->ircs2s_common (#476) 2017-08-28 19:42:24 -07:00
James Lu
b1159400f1 Move DeprecatedAttributesObject, CamelCaseToSnakeCase to structures (#476) 2017-08-28 19:36:55 -07:00
James Lu
ba649fb8b4 utils, exttargets: add checks for channel presence 2017-08-25 02:31:26 -07:00
James Lu
04cfa9c93e ServiceBot: add altnick fetching capabilities to get_nick (#288) 2017-08-21 22:22:01 -07:00
James Lu
d28006ae62 Move ProtocolError to utils, and link the copy in classes to it 2017-08-21 22:21:09 -07:00
James Lu
89699051d5 Services API rework
- Move nick/ident/host/gecos fetching from services_support into functions
- Remove the unused 'ident' argument from ServiceBot
- Rename the 'nick' argument in ServiceBot to 'default_nick'
- Define default nicks for the PyLink, Automode, and Games services
2017-08-21 21:51:45 -07:00
James Lu
06d3de354e utils: migrate to conf.conf['pylink'] 2017-07-14 05:51:29 -07:00
Mitchell Cooper
7ab0e8f105 use isinstance() instead of type() where appropriate #410 2017-07-12 17:29:34 -04:00
James Lu
5ed4f8bf85 ServiceBot: break when trying to alias a command to itself 2017-07-10 22:18:01 -07:00
James Lu
63ce7ea407 ServiceBot: tweak display format for command aliases
Specifically: bold the command lists, add a space before, and be more specific with "alias for X".
2017-07-10 22:12:53 -07:00
James Lu
bf24bac9c9 ServiceBot: replace 'alias' option with 'aliases' & condense multiple add_cmds calls into one 2017-07-10 21:59:29 -07:00
Mitchell Cooper
f0379d79ef mention that command is an alias or has aliases available in help command 2017-07-09 21:40:08 -04:00
Mitchell Cooper
20abac7461 hide aliases from command list 2017-07-09 21:23:52 -04:00
Mitchell Cooper
2299204efa add alias argument to add_cmd() 2017-07-09 21:18:45 -04:00
James Lu
4e082c2bbf PUIDGenerator: allow custom counter start values 2017-07-05 00:12:25 -07:00
James Lu
6d7e2c667d DeprecatedAttributesObject: don't clobber __ variables 2017-06-30 21:38:50 -07:00
James Lu
8e9a99f90c ServiceBot: migrate to snake case 2017-06-29 23:02:34 -07:00
James Lu
3913a909ef utils: remove parseModes, applyModes wrappers
These have been deprecated since 0.8-alpha2.
2017-06-29 22:43:29 -07:00
James Lu
5647229c05 CamelCaseToSnakeCase: add deprecation warnings 2017-06-29 22:41:18 -07:00
James Lu
6684f9bf08 utils.CC2SC: slightly reword the "missing attribute" error 2017-06-27 16:26:53 -07:00
James Lu
91fe7e0ca7 utils.CC2SC: use self.__class__ to get the name of the current subclass
This is the intended behaviour instead of showing "CamelCaseToSnakeCase" in attribute errors.
2017-06-27 16:25:40 -07:00
James Lu
8f82b92a6a utils: add CamelCaseToSnakeCase class, which wraps missing attributes from camel case names to snake case 2017-06-02 23:16:51 -07:00
James Lu
ed33c8d580 utils: add a default to DeprecatedAttributesObject so that it works as is 2017-06-02 17:26:54 -07:00
James Lu
a3df47e88e ServiceBot: fix ce77f2cbd4 2017-05-07 17:33:15 -07:00
James Lu
ce77f2cbd4 ServiceBot: minor fix of logging syntax 2017-05-07 17:11:51 -07:00