3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-28 13:39:27 +01:00
Commit Graph

242 Commits

Author SHA1 Message Date
James Lu
30b9f47023 unreal: remove handle_kill override; unneeded as of aa4e9335aa 2017-07-05 01:26:45 -07:00
James Lu
970b38719d core: rename ping() to _ping_uplink(), and drop the unused source/target arguments 2017-07-04 22:09:50 -07:00
James Lu
78034096a8 protocols: merge _expandPUID into ircs2s_common 2017-07-03 00:11:49 -07:00
James Lu
f163d7ddde protocols: remove extraneous "Error: " from exception messages 2017-07-02 22:52:46 -07:00
James Lu
e9a6328566 protocols: remove unnecessary handle_squit overrides 2017-07-02 22:20:52 -07:00
James Lu
54d7fe6dc5 protocols: convert IrcServer usage to Server 2017-06-30 21:45:10 -07:00
James Lu
a204d2b2db core: convert IrcUser calls to User 2017-06-30 21:44:31 -07:00
James Lu
927fa9aac9 protocols: updateClient -> update_client 2017-06-30 21:29:38 -07:00
James Lu
f38b9c9a2c protocols: topicBurst -> topic_burst 2017-06-30 21:29:11 -07:00
James Lu
f60dc8fa37 protocols: spawnClient -> spawn_client 2017-06-30 21:25:58 -07:00
James Lu
a4e321522b protocols: migrate away from camel case 2017-06-29 22:56:14 -07:00
James Lu
930a7e19f1 unreal: checkCloakChange -> _check_cloak_change 2017-06-29 22:20:30 -07:00
James Lu
741528b0b3 Merge handle_invite into IRCS2SProtocol (#454) 2017-06-29 22:17:46 -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
8acf39cad6 protocols: rename _send to _send_with_prefix to avoid clashing with process_queue 2017-06-24 23:47:30 -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
6ef3bab0fc unreal: remove handle_privmsg/handle_notice override 2017-06-02 07:56:22 -07:00
James Lu
08c0082430 protocols: rename checkCollision -> check_nick_collision() (#454) 2017-05-09 20:44:48 -07:00
James Lu
4daa94c014 Merge branch 'master' into devel 2017-04-01 12:42:00 -07:00
James Lu
df4acbf5d5 unreal: expand PUIDs in outgoing channel modes
This fixes things like relay modes / automode targets not working.
2017-04-01 12:39:38 -07:00
James Lu
fccec3a195 unreal: fix userlist parsing breaking with Unreal 3.2 nicks starting with a symbol 2017-04-01 12:10:19 -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
d318fbac77 protocols: migrate away from irc.botdata (#273) 2017-03-05 00:09:01 -08:00
James Lu
f70e771000 unreal: ignore userpairs with only a prefix and no user
How is this even possible?!

Reported by @koaxirc.

(cherry picked from commit 9fac7cb1f3)
2017-02-06 18:00:39 -08:00
James Lu
9fac7cb1f3 unreal: ignore userpairs with only a prefix and no user
How is this even possible?!

Reported by @koaxirc.
2017-02-05 22:23:20 -08:00
James Lu
7245e978cd unreal: in MODE, also wrap to 12 modes per line
Closes #393. Really fixes #253.
2017-01-13 23:58:11 -08:00
James Lu
4f0ca6367c unreal: fix math error
len(":SIDAAAAAA ") is 11, not 9
2017-01-12 19:54:47 -08:00
James Lu
ef4e1ecbab unreal: count the server prefix in SJOIN line wrap (#253) 2017-01-06 18:29:47 -08:00
James Lu
9a01a5285f unreal: handle user mode changes via MODE 2017-01-02 12:20:20 -08:00
James Lu
fc3ee8d402 unreal: implement line wrapping for outgoing MODE 2017-01-02 12:16:35 -08:00
James Lu
38350465c1 protocols: move handle_pong into ircs2s_common, be less strict about the ping argument
This fixes issues on UnrealIRCd where PONGs get ignored if the argument doesn't match the server name entirely (e.g. different case).
Treating all PONGs from the uplink as valid is totally fine, as all we care about is that the uplink is alive.
2017-01-01 20:24:34 -08:00
James Lu
945fc8f0f9 unreal: normalize whitespace in SJOIN as well
Sometimes there is an extra space after the mode list, so the query looks like

<- :000 SJOIN 1234567890 #channel +ntf [10t]:5  :000AAAAAA 000AAAAAB

instead of

<- :000 SJOIN 1234567890 #channel +ntf [10t]:5 :000AAAAAA 000AAAAAB
2017-01-01 19:55:29 -08:00
James Lu
4a519832e0 unreal: normalize nicks to UIDs in SJOIN handling
These can still be used by old Unreal 3.2 links.
2017-01-01 13:48:47 -08:00
James Lu
71bd5583fa unreal: parse mode parameters in SJOIN as well!
Thanks to kevin for pointing this out.
2017-01-01 11:32:44 -08:00
James Lu
803ccf7708 unreal: add SJOIN to required caps 2017-01-01 00:21:37 -08:00
James Lu
69be532c3c unreal: actually send the remote's modes in SJOIN hooks 2017-01-01 00:20:29 -08:00
James Lu
f851dc8ac1 unreal: implement modes in SJOIN (SJ3), respect S2S message length limits
Closes #378. Ref #253
2017-01-01 00:00:01 -08:00
James Lu
278339b5e2 unreal: actually enable the SJOIN cap, handle ban bursts properly 2016-12-31 22:15:42 -08:00
James Lu
5f6337a734 Merge branch 'master' into devel
Conflicts:
	plugins/networks.py
2016-12-18 00:15:24 -08:00
James Lu
194a62fcea protocols: implement basic nick collision detection in UID handlers
Closes #285. Closes #375.
2016-12-18 00:13:42 -08:00
James Lu
c57fabc9ef core, protocols: add server argument to IrcUser (#355) 2016-11-09 18:40:16 -08:00
James Lu
4dd0709f66 protocols, core: remove unused imports 2016-10-01 12:43:12 -07:00
James Lu
c5c77eeb97 protocols: chandata->channeldata for MODE and JOIN hooks 2016-09-02 17:52:19 -07:00
James Lu
42a104534a unreal: ensure type safety from last commit 2016-08-27 19:19:47 -07:00
James Lu
8f8cd95395 unreal: use umode +xt instead of SETHOST in spawnClient
This is to ensure vHosts for all PyLink clients are respected.
2016-08-27 19:14:37 -07:00
James Lu
ae94bec6b8 protocols: add a chandata key to SJOIN hook payloads 2016-08-27 18:56:36 -07:00
James Lu
3c7b201f57 protocols: rename 'oldchan' in MODE payloads to 'chandata' 2016-08-27 17:46:35 -07:00
James Lu
e9088792af unreal: support TSCTL alltime
Closes #228.
2016-08-17 21:21:18 -07:00
James Lu
73a70d6952 unreal: declare support for ESVID
This capability declares support for account name arguments in service stamps (+d argument in SVS2MODE).

Realistically this doesn't appear to affect any S2S communication, because services packages only check for ESVID support on their uplink, while SVS2MODE is passed raw from services->IRCd->PyLink.
2016-08-08 17:28:45 -07:00
James Lu
671d6d1893 unreal: request VHP capability so cloaked hosts for Unreal3.2 users are sent 2016-08-08 17:05:28 -07:00
James Lu
7dcabf072b unreal: fix services login tracking for UnrealIRCd 3.2 + Anope 1.8
More specifically, if the +d argument in SVS2MODE is a non-zero integer, ignore it and use the user's nick as account name instead.
2016-08-08 16:35:10 -07:00
James Lu
d5c5a34467 Merge branch 'master' into devel
Conflicts:
	protocols/ts6_common.py
2016-08-01 18:07:34 -07:00
James Lu
f60e17907a hybrid, unreal: switch to irc.toLower() for channels 2016-08-01 18:06:38 -07:00
James Lu
f457018f89 unreal: remove mixed_link option; this is now implied
pylink<->unreal4<->unreal3.2 links are stable enough.
2016-07-29 00:37:31 -07:00
James Lu
87c558537f unreal: refactor to use utils.PUIDGenerator
Closes #238.
2016-07-28 21:59:56 -07:00
James Lu
a56e464eb6 unreal: handle umode +r on burst as services login, even when no explicit accountname is set
Ref #296.

(cherry picked from commit 5800594d55)
2016-07-28 20:20:35 -07:00
James Lu
4fbb7b1791 unreal: remove obsolete comment about cloaked hosts
(cherry picked from commit e7ccfc9156)
2016-07-28 20:20:35 -07:00
James Lu
bc5a508cd7 unreal: rework services login handling
This should now support SVS2MODE without account info, used by Anope versions < 2.0? Also, the protocol module no longer stores umode +r as an actual user mode, as doing so isn't needed.

Closes #296.

(cherry picked from commit 97d09c5015)
2016-07-28 20:20:35 -07:00
James Lu
5800594d55 unreal: handle umode +r on burst as services login, even when no explicit accountname is set
Ref #296.
2016-07-27 17:38:37 -07:00
James Lu
e7ccfc9156 unreal: remove obsolete comment about cloaked hosts 2016-07-27 17:38:09 -07:00
James Lu
97d09c5015 unreal: rework services login handling
This should now support SVS2MODE without account info, used by Anope versions < 2.0? Also, the protocol module no longer stores umode +r as an actual user mode, as doing so isn't needed.

Closes #296.
2016-07-27 16:55:59 -07:00
James Lu
8981d71fd0 protocols: rename _getOutgoingNick() -> _expandPUID() 2016-07-20 23:55:34 -07:00
James Lu
7c1a80708b unreal: demote mode bounce notices to DEBUG 2016-07-11 16:37:01 -07:00
James Lu
64dd7e9387 unreal: fix server name of the uplink not being saved
Closes #268.
2016-07-11 16:20:10 -07:00
James Lu
d91589c4da protocols: move handle_whois to ts6_common 2016-07-11 16:00:08 -07:00
James Lu
c1cd6f42a0 updateTS: Fix mode tracking again
It looks like we actually do need to track whether we're sending or receiving modes. This time, do so /properly/.
2016-07-10 21:36:18 -07:00
James Lu
3457da16bd protocols: Move kill() into ts6_common, and make unreal.py use it
Ref #239. protocols/unreal was hardcoding a killpath, lazy me...
2016-07-04 23:43:11 -07:00
James Lu
fbeb3a3747 protocols: fix ts actually defaulting to None in sjoin() 2016-06-25 13:56:24 -07:00
James Lu
167963ddc4 updateTS: fix handling for outbound modes
Outgoing and incoming modes should be handled the same way - we're only dealing with a "received TS" which could originate from PyLink (sjoin() in protocols) OR the uplink.
2016-06-24 13:24:44 -07:00
James Lu
2936e94f50 unreal: warn about mode bounces instead of fighting with the uplink 2016-06-22 22:37:53 -07:00
James Lu
f2b139c828 core: make inbound SJOINs also respect the updateTS() rules 2016-06-22 22:28:15 -07:00
James Lu
6b8e80cd5b core/protocols: add modes option in sjoin(), TS6 BMASK, and mode TS rules in updateTS()
Closes #249.
Closes #250.
2016-06-22 21:34:16 -07:00
James Lu
101bd9664e unreal: fix typo in comment 2016-06-21 17:03:23 -07:00
James Lu
481d70eff8 New import paths for properly installed pylinkirc 2016-06-20 18:18:54 -07:00
James Lu
3e19e9c3f1 unreal: add missing inviteonly (+i) definition 2016-06-19 21:18:35 -07:00
James Lu
ae87def11f Purge c_ and u_ prefixes from named modes
Closes #217.
2016-05-15 11:05:02 -07:00
James Lu
3bb1208e74 core: move toLower to Irc (#199) 2016-04-30 16:57:38 -07:00
James Lu
78f8a2fc8d core: move isManipulatableClient, getHostmask to Irc 2016-04-30 16:44:37 -07:00
James Lu
064cb9b6aa core: move reverseModes, joinModes into Irc 2016-04-30 16:33:46 -07:00
James Lu
bd0874a484 Merge branch 'wip/split-utils' into devel 2016-04-29 23:32:52 -07:00
James Lu
b78b911323 unreal: fix JOIN handling & normalize channel case
Reported by Rascle on IRC.
2016-04-28 19:17:20 -07:00
James Lu
a8fc9428cf protocols: migrate to irc.parseModes/applyModes (#199) 2016-04-24 21:44:31 -07:00
James Lu
40a86de040 protocols: reword spawnClient description text 2016-04-24 21:17:56 -07:00
James Lu
f8c2ee3ed3 protocols: use KeyedDefaultdict to enumerate UID generators 2016-04-24 21:16:41 -07:00
James Lu
2c60aa6395 Separate UID/SID generators into various protocol modules (#199) 2016-04-24 21:08:07 -07:00
James Lu
0ccdf4cfce unreal: require UMODE2 cap too
I realize we don't handle MODE being used for users at all. UMODE2 is always used when enabled, which is what we're expecting right now.
2016-04-09 11:43:26 -07:00
James Lu
5dee6ab651 unreal: simplify capability checks & require NICKIP cap 2016-04-09 11:34:09 -07:00
James Lu
29030073b9 unreal: request NICKIP capability, track Unreal 3.2 user IPs
Closes #196.
2016-04-09 10:17:25 -07:00
James Lu
62c8cd2405 protocols: s/_getNick/_getUid/g
The old function name _getNick was a bit misleading, as the function converted nicks to UIDs, not the other way around..
2016-04-08 22:21:37 -07:00
James Lu
1e3aba2cce protocols: simplify super() syntax 2016-04-05 18:37:09 -07:00
James Lu
f620b5b4e8 protocols: initialize sidgen/uidgen in ts6_common 2016-04-05 18:34:54 -07:00
James Lu
55afa1bff6 unreal: log instances of PUID manging to debug 2016-04-03 13:01:08 -07:00
James Lu
75984c3c4c ts6_common: add abstraction to convert UIDs->outgoing nicks
This is a more complete fix for #193.
2016-04-03 12:57:47 -07:00
James Lu
9f20f8f767 unreal: update SJOIN matching regex
We should only treat symbols as a possible prefix, not letters. Things like +nick might be sent in a SJOIN instead of +001AAAAAA, for legacy servers.
2016-04-03 12:57:47 -07:00
James Lu
e687bb0a78 unreal: remove outfilter hack, this doesn't handle text including PUIDs properly
Reverts part of 44dc856ffa.
2016-04-03 12:38:38 -07:00
James Lu
02ec50826b unreal: fix super() syntax in SQUIT handling 2016-04-02 12:12:38 -07:00
James Lu
6acfbb4125 unreal: case-desensitize legacy server names when handling user introductions from them 2016-04-02 11:51:29 -07:00