3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-12-11 20:49:33 +01:00
Commit Graph

105 Commits

Author SHA1 Message Date
James Lu
46cc621df1 More concise UID generators 2021-07-14 21:57:56 -07:00
James Lu
bc3a7abe02 ircs2s_common: don't strip away other whitespace chars when tokenizing 2021-07-14 21:57:56 -07:00
James Lu
e25e3834a8 Add support for oper notices (GLOBOPS/OPERWALL) (#511) 2021-06-15 00:21:03 -07:00
James Lu
8db238e869 ircs2s_common: only read sender prefixes on lines starting with ":"
This fixes incorrect behaviour if the nick of a sender matches that of a S2S command (e.g. "ping")
2021-06-09 20:17:27 -07:00
James Lu
da7f9611bc Remove my old nickname from examples 2021-06-09 20:15:49 -07:00
James Lu
537c643ed0 ircs2s_common: gracefully handle QUIT messages without a reason
Closes #663.
2021-02-14 22:39:57 -08:00
Celelibi
84b73bb89f
Tidy up imports and define __all__ in modules (#660) 2020-06-18 15:47:20 -07:00
James Lu
5c3306bcff ircs2s_common: fix handling when failing to extract kill reason 2020-01-26 00:31:17 -08:00
James Lu
7bf1a9e08d Add can-manage-bot-channels protocol capability
This allows skipping part/join for service bots on platforms where this is not possible.
2019-11-02 13:55:49 -07:00
James Lu
297d31dab2 Add has-irc-modes capability (#620) 2019-10-10 22:17:11 -07:00
James Lu
943168df53 parse_message_args: remove extraneous \'s that aren't escaping characters 2019-09-10 18:31:07 -07:00
James Lu
aba198dbd6 parse_args: ignore extra spaces not part of the final multi-word arg 2019-09-10 18:11:07 -07:00
James Lu
188d0f647e ircs2s_common: make parse_message_tags() a classmethod 2019-09-10 18:11:07 -07:00
James Lu
80188c3673 Sort imports via isort 2019-07-14 15:12:29 -07:00
James Lu
c7fd037879 Revise handling of KILL and QUIT hooks
- Both of these now always contain a non-empty userdata argument.
- If we receive both a KILL and a QUIT for any client, only the one received first will be sent as a hook.
- Also, adjust _remove_client() to return the data of the user that was removed.
2019-07-01 13:36:53 -07:00
James Lu
762b47120d inspircd: support insp3 INVITE 2019-05-31 18:28:28 -07:00
James Lu
3d69b7f4e8 ircs2s_common: fix sending the wrong target in PING 2019-05-02 17:36:42 -07:00
James Lu
44a364df98 Move message tags code from clientbot to ircs2s_common 2019-05-02 15:54:34 -07:00
James Lu
cfbadb4539 Move _squit, _get_SID, _get_UID wrappers into PyLinkNCWUtils
ClientbotBaseProtocol requires these for the squit wrapper to work.
2019-02-12 00:38:37 -08:00
James Lu
52f588c920 Track affected servers in SQUIT hooks 2018-12-27 12:09:40 -08:00
James Lu
1a97a32ef5 ircs2s_common: return just the kill reason as text in kill parsing (#520) 2018-06-11 19:26:42 -07:00
James Lu
c7159b9cad core: move clearing channels on kick/part to coremods/handlers
This is for consistency with the rest of the state cleanup code.
2018-04-07 22:44:00 -07:00
James Lu
37be73d39c clientbot: add STATUSMSG support (#570) 2018-02-18 22:15:19 -08:00
James Lu
145a4677f6 ircs2s_common: add handling for nick@servername messages 2017-12-21 02:57:10 -08:00
James Lu
8dbbe65a1c ircs2s_common: remove useless statusmsg splitting code
We used to do this in order to lowercase the channel part of ~#channel messages correctly, but that is no longer needed as of 9702030bf5.
2017-12-21 02:11:28 -08:00
James Lu
e25f6fd470 ircs2s_common: expand PUIDs in squit()
This fixes SQUIT not working correctly on ngIRCd.
2017-09-23 23:15:29 -07:00
James Lu
4a363aee50 Move _expandPUID into PyLinkNetworkCoreWithUtils 2017-08-30 00:56:18 -07:00
James Lu
c4a3baca7d protocols: switch to self.is* 2017-08-28 20:07:36 -07:00
James Lu
2a7594e56e Move PUIDGenerator->classes, IncrementalUIDGenerator->ircs2s_common (#476) 2017-08-28 19:42:24 -07:00
James Lu
80766e051e core: define two (joined) versions of the channels index
Closes #509.

PyLinkNetworkCore.channels is split into the following:
- irc._channels which implicitly creates channels on access (mostly used in protocol modules)
- irc.channels which does not (recommended for use by plugins)
2017-08-25 02:12:08 -07:00
James Lu
72145e09b8 clientbot: implement away-notify support (#290) 2017-08-19 22:04:24 -07:00
James Lu
5381e85d3c IRCS2SProtocol: fix wrong if: statement regarding user presence 2017-08-09 16:06:37 -07:00
James Lu
be41f57795 PyLink 2.0-dev, now with /stats support!
Closes #131.
2017-08-07 23:52:16 -07:00
James Lu
9702030bf5 protocols: continue removing to_lower() calls on channels (#372) 2017-08-07 21:54:33 -07:00
James Lu
b1b2394836 ircs2s_common: ignore PART for channels that the user wasn't on
These extra parts caused issues with relay when receiving P10 KICK acknowledgements as they are treated as if the user was already in the channel.
2017-08-07 00:05:44 -07:00
James Lu
07fa53d128 protocols: remove direct usage of to_lower() for channels
Not needed as of 32249ace3e (ref #372)
2017-08-06 18:05:14 -07:00
James Lu
981e6c508f Move _check_nick_collision to NetworkCoreWithUtils
This is useful for networks that emulate IRC as well, to prevent clashes between real clients and virtual ones.
2017-07-31 20:58:02 +08:00
James Lu
63f52ca8b0 ircs2s_common: handle 'netadmin' umodes as an oper type
Also, make the Network Service opertype take precedence over the others.
2017-07-20 20:03:32 +08: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
db778debb8 Fix error logging for validate_server_conf (#472) 2017-07-12 22:44:48 -07:00
Mitchell Cooper
3e356180a0 use isinstance() for conf values as well 2017-07-12 17:38:31 -04:00
Mitchell Cooper
7ab0e8f105 use isinstance() instead of type() where appropriate #410 2017-07-12 17:29:34 -04:00
Mitchell Cooper
87fe7693b0 ircs2s_common: use conf.validate() instead of assertion in validate_server_conf() (#485)
Closes #472.
2017-07-12 14:17:41 -07:00
James Lu
3a42c8e835 protocols: add _check_oper_status_change abstraction
This condenses a large chunk of the code checking for oper ups, and adds support for the servprotect/admin umodes in an IRCd-independent manner. Closes #451.
2017-07-07 20:04:21 -07:00
James Lu
5d5c861a93 protocols: rename check_nick_collision to _check_nick_collision 2017-07-07 03:18:40 -07:00
James Lu
fa2c5d928a IRCS2SProtocol: fix extraneous umode based AWAY messages 2017-07-06 22:17:47 -07:00
James Lu
6d3d2b239d IRCS2SProtocol: ignore attempts to ping the uplink before the link is ready 2017-07-06 21:45:51 -07:00
James Lu
d149576b4e protocols: move invite() into IRCS2SProtocol 2017-07-06 21:43:53 -07:00
James Lu
085b4cacbe protocols: handle usermode-based away (i.e. ngircd +a) 2017-07-06 20:19:52 -07:00
James Lu
45dad63d5b Move handle_mode into IRCS2SProtocol
TODO: clean up protocols/unreal to use more of this code as well
2017-07-06 17:10:03 -07:00