James Lu
ca93d1ad70
IRCParser: show an error when using "command --help" instead of silently outputting help text in the console
2017-03-06 16:30:43 -08:00
James Lu
76d74ab9bb
SECURITY: prevent DoS when calling --help on commands using IRCParser
...
argparse's default behaviour is to exit after displaying --help and --version information. However, doing so freezes the current IRC listener and essentially allows for DoS via IRC...
This bug does not affect any released (stable) version of PyLInk - only commits after 93c9b6289c
2017-03-06 16:11:04 -08:00
James Lu
7f070448b7
utils, Irc: add abstraction to warn on deprecated attribute usage ( #273 )
2017-03-05 00:00:26 -08:00
James Lu
e07974f803
utils: remove reference to checkAuthenticated() in NotAuthorizedError
2017-02-24 18:31:33 -08:00
James Lu
0125c544ee
utils: add an IRCParser class based off argparse, modified from @IotaSpencer's code
...
Closes #6 .
2017-02-21 21:45:43 -08:00
James Lu
75b5be5baf
ServiceBot: implement global and per-service spawn_service(s) options ( #403 )
2017-02-18 12:54:26 -08:00
James Lu
a776aab897
utils: ignore missing services in unregisterService instead of raising an error
...
This is a prerequisite for the next commit (service spawn toggle options). (#403 )
2017-02-18 12:54:08 -08:00
James Lu
2f968aca80
Irc: allow defaulting to private command replies ( Closes #409 )
...
Squashed commit of the following:
commit c168500235b65f833b1d7fe49ebde674159683ee
Author: James Lu <GLolol@overdrivenetworks.com>
Date: Thu Feb 16 17:33:36 2017 -0800
ServiceBot: default notice and private to None
This is so that it respects the changes from the last commit.
commit f685f3ef522f7f0ee356082c3c1b8b5a4e34b211
Author: James Lu <GLolol@overdrivenetworks.com>
Date: Thu Feb 16 15:10:33 2017 -0800
Irc: implement a prefer_private_replies option (#409 )
2017-02-16 17:41:07 -08:00
James Lu
ad873cfd7b
ServiceBot: be more flexible in help formatting
...
* Fix text after indented docstring line breaks not showing (thanks @IotaSpencer for noticing this)
* Update formatting so that multiple consecutive newlines in a docstring are shown:
- 2 newlines => 1 displayed new line
- 3 newlines => 2 displayed new lines, and so on...
2017-02-15 17:06:16 -08:00
James Lu
d33eb22ca3
ServiceBot: verify that the service name is a valid nick
2017-01-21 11:59:43 -08:00
James Lu
d31d09ce7e
ServiceBot: remove extra_channels argument from the constructor
...
This is unused and a poor thing to hardcode anyways.
2017-01-21 11:59:43 -08:00
James Lu
702ba84956
wrapArguments: add a max_args_per_line option ( #253 )
2017-01-11 23:09:25 -08:00
James Lu
d4b4cfb32e
wrap* funcs: convert input args to a list, so that pop(0) always works
2017-01-06 22:13:27 -08:00
James Lu
12c33fcddf
utils: remove incomplete example text for wrapArguments()
2017-01-02 11:08:55 -08:00
James Lu
eafec9d4ad
utils: add wrapArguments() to deal with S2S message cutoffs
...
Ref: #253 , #378
2016-12-31 23:35:27 -08:00
James Lu
95b58fc2c4
utils: abstract protocol/plugin import prefixes, and implement filtering by plugin in 'list'
...
Closes #369 .
2016-12-16 19:25:41 -08:00
James Lu
03766b9f89
ServiceBot: implement docstring rewrapping per #307 .
...
Closes #307 .
2016-12-05 23:33:03 -08:00
James Lu
f5633329f8
utils: drop loadModuleFromFolder; it is unused since bcc84b8618
2016-12-04 23:35:16 -08:00
Ken Spencer
a1bbb4fdb9
utils: style points! WOOOO
2016-11-18 23:10:45 -08:00
Ken Spencer
fdd4135632
utils: add error() to use classes.py's irc.error()
2016-11-18 23:10:45 -08:00
James Lu
438838f81d
ServiceBot: handle autojoin additions even if bots haven't spawned yet
2016-09-24 12:33:57 -07:00
James Lu
a040c3c7d2
ServiceBot: modularize join() for explicit channel joining ( #326 )
2016-09-23 23:43:07 -07:00
James Lu
9e7d0a50ca
Revert "ServiceBot: fall back to a space in 'help' when stripped text is empty"
...
This reverts commit 7a3c8ab637
.
2016-08-27 09:49:59 -07:00
James Lu
06cbbbb019
ServiceBot: display the NotAuthorizedError argument raw
2016-08-25 00:58:19 -07:00
James Lu
5908776a86
API CHANGE: Rename NotAuthenticatedError -> NotAuthorizedError
2016-08-25 00:43:44 -07:00
James Lu
7d2b22630d
ServiceBot: display custom error messages for NotAuthenticatedError
2016-08-25 00:41:53 -07:00
James Lu
3126560fb9
ServiceBot: use newline-agnostic str.splitlines() to split up docstrings
2016-08-02 12:38:15 -07:00
James Lu
7a3c8ab637
ServiceBot: fall back to a space in 'help' when stripped text is empty
...
This makes sure things like newlines actually show when displaying docstrings. Closes #306 .
2016-08-02 12:32:06 -07:00
James Lu
87c558537f
unreal: refactor to use utils.PUIDGenerator
...
Closes #238 .
2016-07-28 21:59:56 -07:00
James Lu
0d563eaa57
control/utils: unload the PyLink service bot on shutdown
2016-07-26 16:26:01 -07:00
James Lu
da9ab6ac90
Merge branch 'master' into devel
2016-07-23 20:57:26 -07:00
James Lu
e56c9640dc
ServiceBot: remove request/remove stubs for now
2016-07-23 19:57:05 -07:00
James Lu
c6ed06ba61
utils: new splitHostmask function
2016-07-20 23:55:34 -07:00
James Lu
c52d542ed8
Initial Clientbot stub, with very rudimentary user handling ( #144 )
2016-07-20 23:55:34 -07:00
James Lu
ba53d63d37
ServiceBot: make sure all the defaultdict(set) instances are SEPARATE
...
Bit of a Python oddity here - If you initialize a class like defaultdict in a class constructor, the same instance is used for all instances of the class?
This fixes all service bots joining the same channel, when they really shouldn't be.
2016-07-07 22:56:05 -07:00
James Lu
4f26a29196
utils: unregisterService should be case insensitive
2016-07-07 22:41:39 -07:00
James Lu
bcc84b8618
core: remove references to plugins/protocols_folder ( #259 )
2016-07-02 23:58:21 -07:00
James Lu
d34ab6db8b
ServiceBot: show an "End of help" line after featured command listing
2016-06-30 18:55:37 -07:00
James Lu
d2b5fd7b6e
ServiceBot: implement short form help for featured command lists
...
Suggestion from @cooper.
2016-06-30 18:52:35 -07:00
James Lu
5c90cbe01f
ServiceBot: always show featured commands list in private, to prevent channel floods
2016-06-30 18:37:14 -07:00
James Lu
02405c36b5
core, fantasy: redo handling of noticed and/or private replies
...
New behaviour for command responses in general: FANTASY commands reply in channel as PRIVMSG, while all commands sent in PM reply as private notices.
- The old irc.called_by is now irc.called_in (PLACE last command was called)
- irc.called_by is now used to store the CALLER of the last command
- notice=True/False toggle is dropped from ServiceBot.call_cmd()
- New private=True/False option added to ServiceBot.reply() and irc.reply(), which controls whether replies should be sent privately or not.
2016-06-30 18:22:45 -07:00
James Lu
0922f7cefc
ServiceBot: sort featured commands list
2016-06-30 18:05:12 -07:00
James Lu
e730909a46
utils: pass featured argument to ServiceBot in add_cmd()
2016-06-30 17:57:40 -07:00
James Lu
7210161ece
ServiceBot: use a shared function for showing command help
2016-06-30 17:39:53 -07:00
James Lu
a9f8b05419
ServiceBot: support service descriptions, featured commands
...
Closes #256 . Closes #255 .
2016-06-30 17:30:44 -07:00
James Lu
b90c69eead
ServiceBot: actually, make extra_channels network specific
2016-06-25 14:21:13 -07:00
James Lu
ceed9346c0
ServiceBot: allow configuring extra channels that bots will join
2016-06-25 14:14:19 -07:00
James Lu
cb633cfba5
Default config file location is now pylink.yml
2016-06-21 10:59:03 -07:00
James Lu
481d70eff8
New import paths for properly installed pylinkirc
2016-06-20 18:18:54 -07:00
James Lu
fa3d230ac9
IncrementalUIDGenerator: normalize SID to strings
2016-06-16 21:55:32 -07:00