3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-01 17:29:21 +01:00
Commit Graph

124 Commits

Author SHA1 Message Date
James Lu
56275c5a3b NetworkCore: rename removeClient -> _remove_client (no migration stub) 2017-06-27 16:21:30 -07:00
James Lu
7814914a05 classes, protocols: convert self.irc usage to self 2017-06-25 02:09:52 -07:00
James Lu
d0209f720a Rewrite network intitialization bits
- Move protocols.connect -> protocols.post_connect to fix namespace conflict
- Starting an IRC connection is now explicit (via irc.connect instead of __init__)
2017-06-25 01:12:58 -07:00
James Lu
f8155ff74c protocols: sed -i 's/_getSid/_get_SID/g' 2017-06-16 17:13:30 -07:00
James Lu
a60d746e3b protocols: sed -i 's/_getUid/_get_UID/g' 2017-06-16 17:13:30 -07:00
James Lu
7ca98eb965 Split IRC-specific code from classes.Protocol into a new IRCCommonProtocol (#454) 2017-06-16 17:13:26 -07:00
James Lu
cfec70730f clientbot: reinitialize PUID generators on connect
Closes #448.
2017-05-12 19:57:24 -07:00
James Lu
2feb93aaf0 clientbot: generate PUIDs/PSIDs with the nick or server name as prefix 2017-04-09 15:32:13 -07:00
James Lu
3f6501fa88 clientbot: make sure incoming nicks don't clash with a PUID/PSID
This should really never happen, but it might break quite a few things if it does.
2017-04-09 15:12:52 -07:00
James Lu
cc9ffd47b1 clientbot: fix misleading comment 2017-04-09 15:01:49 -07:00
James Lu
bf1d7812e2 clientbot: track channel modes and TS on join
Closes #345.
2017-04-09 14:49:19 -07:00
James Lu
9d50a4363b clientbot: make SASL timeout configurable & raise default to 15 secs 2017-04-05 23:08:17 -07:00
James Lu
029bb38af8 protocols: skip queuing when responding to PING 2017-03-28 22:30:33 -07:00
James Lu
efe468b0d2 protocols: declare slash-in-nicks, slash-in-hosts, underscore-in-hosts as necessary (#337) 2017-03-15 23:58:51 -07:00
James Lu
936535786e clientbot: declare clear-channels-on-leave capability 2017-03-15 23:47:32 -07:00
James Lu
47f0b7626f clientbot: time out CAP/SASL after 5 seconds
Closes #424.
2017-03-04 23:54:16 -08:00
James Lu
9420f21680 clientbot: send CAP LS before NICK/USER so that it consistently gets a response before connect
Previously, SASL was failing on networks like freenode, as the connection completed before a CAP response was received.
2017-03-03 15:39:28 -08:00
James Lu
8424870ec3 clientbot: abort when receiving a QUIT from uplink (#405) 2017-02-17 22:27:38 -08:00
James Lu
75158c47e2 clientbot: block PRIVMSG/NOTICE from being routed the wrong way (#405) 2017-02-17 22:27:38 -08:00
James Lu
fb9144a715 clientbot: always add channels to users' channel lists in names reply
Do this regardless of whether the user is already added to the channel's user list/kick queue, since those are tracked separately.

Closes #388.
2017-01-09 22:23:59 -08:00
James Lu
ccfc2f601d clientbot: explicitly send /names after join (#388) 2017-01-09 22:23:59 -08:00
James Lu
602f35cb70 clientbot: fix message recognition treating nick prefixes without ident@host as servers 2017-01-09 22:23:59 -08:00
James Lu
e566b99b75 clientbot: don't crash if we receive /who for someone we don't know 2016-12-27 22:16:12 -08:00
James Lu
f1da5c57e8 clientbot: don't repeat KICK hooks if the source is internal
This prevents KICK events from being relayed twice to Clientbot links, when the kicked user is also a Clientbot user.
2016-12-27 22:09:16 -08:00
James Lu
59f232d69f clientbot: fix SASL PLAIN auth on Python 3.4
A strange bug causes "TypeError: unsupported operand type(s) for %: 'bytes' and 'tuple'" when formatting multiple args into a byte string using %b.
2016-12-27 18:16:15 -08:00
James Lu
a96bb0ce11 clientbot: make unattended SASL reauth optional 2016-12-19 01:06:49 -08:00
James Lu
68c618887f clientbot: auto-attempt SASL when it is introduced in CAP NEW 2016-12-19 00:54:20 -08:00
James Lu
f42d49b8eb cleintbot: only CAP END if we haven't registered yet 2016-12-19 00:52:28 -08:00
James Lu
880714b2f2 clientbot: implement CAP DEL, CAP NEW 2016-12-19 00:40:19 -08:00
James Lu
fdda28799c clientbot: fix message tag parsing 2016-12-19 00:18:15 -08:00
James Lu
9bfa0c9bb8 clientbot: whitelist supported SASL mechanisms, and abort on invalid ones 2016-12-17 16:18:11 -08:00
James Lu
90e10f948e clientbot: rename conf value sasl_mech -> sasl_mechanism 2016-12-17 16:18:11 -08:00
James Lu
0cc1ff8fa3 clientbot: log CAP REQ, CAP NAK events 2016-12-17 16:18:11 -08:00
James Lu
8b0b4bfcc4 clientbot: log SASL failures to warning instead of info 2016-12-17 16:18:11 -08:00
James Lu
651752d23d clientbot: send CAP END if SASL is disabled 2016-12-17 16:18:11 -08:00
James Lu
9cc817d544 clientbot: require SSL for SASL external, better grammar in SASL misconfiguration errors 2016-12-17 16:18:11 -08:00
James Lu
ffed5e3378 clientbot: also CAP END on 906 (SASL aborted) 2016-12-17 16:18:11 -08:00
James Lu
8666151189 clientbot: properly verify ACKed/NAKed caps, add support for SASL PLAIN & EXTERNAL 2016-12-17 16:17:36 -08:00
James Lu
3bc9b1bc55 clientbot: implement IRCv3.2 CAP and IRCv3.1 multi-prefix (#290) 2016-12-16 22:28:40 -08:00
James Lu
cbc7f438d2 clientbot: implement preliminary message tags parsing
Untested so far...
2016-12-16 22:28:22 -08:00
James Lu
7e37a90c80 clientbot: delete channels on kick / part, or if a channel becomes empty after parting
Closes #314.
2016-12-16 20:50:36 -08:00
James Lu
c57fabc9ef core, protocols: add server argument to IrcUser (#355) 2016-11-09 18:40:16 -08:00
James Lu
05e2d6d060 clientbot: overload _getUid() to deal with nick collisions between virtual clients and Clientbot users
Closes #327.
2016-10-14 22:29:13 -07:00
James Lu
7917502799 clientbot: make oper status tracking a network-specific option 2016-10-09 19:04:59 -07:00
James Lu
288a2fffd7 Clientbot: use a more specific realname fallback 2016-10-07 21:08:55 -07:00
James Lu
5c2e7e9324 Clientbot: unconditionally block MODE hooks if we're the sender
This is another check to prevent possible infinite loops in MODE syncing.
2016-10-07 20:54:52 -07:00
James Lu
72ca41df33 Irc, clientbot: disallow unsetting bans that don't exist
This fixes an infinite loop when:
- Clientbot modesync is enabled
- 2 or more clientbot linked networks show unsetting modes that weren't enabled (e.g. charybdis)
- A user removes a ban

The workaround in clientbot prevents this process from triggering an infinite loop when a mode change acknowledgement is received for unsetting a non-existant ban,
though multiple -b mode changes may still be seen due to race conditions in updating the various networks' states.
2016-10-07 20:54:52 -07:00
James Lu
4dd0709f66 protocols, core: remove unused imports 2016-10-01 12:43:12 -07:00
James Lu
1cb320f5f4 clientbot: only send MODE if there are modes left after filtering 2016-09-25 20:21:01 -07:00
James Lu
8dd0cb19af clientbot: fix outgoing mode filtering 2016-09-25 20:07:16 -07:00