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

221 Commits

Author SHA1 Message Date
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
a60d746e3b protocols: sed -i 's/_getUid/_get_UID/g' 2017-06-16 17:13:30 -07:00
James Lu
08c0082430 protocols: rename checkCollision -> check_nick_collision() (#454) 2017-05-09 20:44:48 -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
487a07671b ts6: implement line wrapping in SJOIN ban bursts (#253) 2017-01-11 23:09:25 -08:00
James Lu
70deb5a285 ts6: rewrite MODE wrapping to check message length and argument count (#253) 2017-01-08 21:20:42 -08:00
James Lu
aafd734e3a ts6: remove leftover mode filtering in mode() 2017-01-08 20:43:08 -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
dc11638eb9 ts6 (and derivatives): don't burst bans that were already set 2017-01-01 00:28:55 -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
aa0d1596b0 ts6: don't crash when CHGHOST target is a nick instead of UID
(cherry picked from commit 4dcbc85a81)
2016-10-01 13:43:18 -07:00
James Lu
4dd0709f66 protocols, core: remove unused imports 2016-10-01 12:43:12 -07:00
James Lu
4dcbc85a81 ts6: don't crash when CHGHOST target is a nick instead of UID 2016-10-01 00:34:38 -07:00
James Lu
39987b6dcc ts6: supply SAVETS_100 capability for ratbox 2016-10-01 00:11:50 -07:00
James Lu
d9fdd9dfcb ts6: modularize required capabilities 2016-09-30 23:33:04 -07:00
James Lu
fe5a40d632 ts6: handle legacy UID by wrapping around EUID 2016-09-18 14:13:05 -07:00
James Lu
8589feaedf protocols: fix incomplete renames from c5c77eeb97 2016-09-12 20:16:56 -07:00
James Lu
c5c77eeb97 protocols: chandata->channeldata for MODE and JOIN hooks 2016-09-02 17:52:19 -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
8cf771be2f ts6: fix typo 2016-08-20 17:36:56 -07:00
James Lu
ac358f4199 ts6: add CHW to required capabilities
This is implicitly used by relay when relaying @#channel messages.
2016-07-31 20:42:34 -07:00
James Lu
77a93b17ac ts6: handle ETB 2016-07-31 20:25:17 -07:00
James Lu
791b124cf7 ts6: replace str.lower() with irc.toLower() for channel names 2016-07-31 20:22:12 -07:00
James Lu
358e03f6ce ts6: don't unconditionally apply modes in outgoing sjoin() 2016-07-29 14:44:25 -07:00
James Lu
bced9506c3 ts6: add RSFNC to supported caps 2016-07-11 23:29:44 -07:00
James Lu
21d03e7b69 protocols: implement SVSNICK hooks for InspIRCd, Charybdis, UnrealIRCd (#269)
More testing still needs to be done with this on Nefarious, as atheme (what I'm testing against) doesn't use P10 SVSNICK yet.
2016-07-11 23:21:08 -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
1675c43841 ts6: the @cooper fix
Validate that incoming TS is valid, because bad user timestamps like 0 will cause InspIRCd networks to SQUIT if forwarded over Relay.
2016-07-10 20:37:07 -07:00
James Lu
3b80802d1a protocols: rewrite encapsulated commands implicitly
Closes #182.
2016-07-05 13:27:31 -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
d0b7d44f1a ts6: implement kill paths in outgoing KILL (#239) 2016-07-04 23:43:11 -07:00
James Lu
55e0da96c3 Merge remote-tracking branch 'origin/master' into devel 2016-07-01 20:42:46 -07:00
James Lu
fde7860fc7 ts6: fix wrong args in TB handling
I'm not sure where I got that example from. It's wrong.
2016-07-01 19:45:13 -07:00
James Lu
e8ecc1c775 ts6: 10 modes per line, not 9
I must've made it shorter just to be safe, but that isn't necessary.
2016-06-27 23:40:58 -07:00
James Lu
982e7c43f2 ts6: cut off BMASK at 12 args per line to prevent message cutoff
Ref #253.
2016-06-27 23:35:56 -07:00
James Lu
12f1cce6a9 ts6: 12 users max are allowed in each SJOIN message, not 10 2016-06-27 23:13:39 -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
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
8969cfb74e Merge branch 'master' into devel
Conflicts:
	plugins/networks.py
2016-06-22 19:10:59 -07:00
James Lu
6060a8857f ts6: fix incorrect WHOIS syntax
Thanks to @cooper for reporting.
2016-06-22 18:34:17 -07:00
James Lu
481d70eff8 New import paths for properly installed pylinkirc 2016-06-20 18:18:54 -07:00
James Lu
26df48c26d ts6: add missing definition for cmode +i 2016-06-19 21:13:14 -07:00
James Lu
d18e9c82f9 ts6: recognize umode +p (override) 2016-05-31 20:57:17 -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
998d57dbb3 ts6: recognize elemental-ircd +G (blockcaps) 2016-05-11 21:49:57 -07:00
James Lu
3bb1208e74 core: move toLower to Irc (#199) 2016-04-30 16:57:38 -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
b61ac21e86 hybrid, ts6: adjust umode definitions again
- Prefix non-standard snomask umodes with sno_ to avoid confusion
- Remove _hybrid suffixes and chary_ prefixes, they serve little use
- Re-map some hybrid modes to match existing definitions: showadmin->admin, smessages->snomask, hideops->hideoper, softcallerid->deaf_commonchan
2016-04-29 22:39:37 -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
c59997827f hybrid, ts6: update mode definitions
- +p is actually just noknock on hybrid & charybdis
- Fill in *A-*D lists (they were incomplete)
2016-04-18 11:22:54 -07:00
James Lu
36683fc70e ts6: keep state properly when handling JOIN 2016-04-16 17:03:57 -07:00
James Lu
abcf3b6082 ts6: re-add some of the ircd traffic examples 2016-04-07 18:23:21 -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
19ac5b59a5 protocols: drop underscores from pre-defined opertypes 2016-03-26 13:15:22 -07:00
James Lu
44083ccd5e core: Store opertype info in all IrcUser objects
This allows plugins to define custom opertypes for their clients, and still have them show in WHOIS queries.
2016-03-26 12:55:23 -07:00
James Lu
e183078645 protocols: Remove "secret" testing channel name 2016-03-20 17:34:13 -07:00
James Lu
6962f3b73e ts6: unset has_eob correctly on reconnects 2016-03-19 18:19:41 -07:00
James Lu
15b35f1853 ts6: support charybdis +T mode (closes #173) 2016-03-07 21:38:57 -08:00
James Lu
0fff91edfd ts6: implement services account tracking (#25)
This adds a new protocol hook: [user_logging_in, 'CLIENT_SERVICES_LOGIN', {'text': account_name}], sent whenever someone logs in to services. Actual state tracking is done in coreplugin.py
2016-02-07 18:38:22 -08:00
James Lu
5877031203 Merge branch 'master' into devel 2016-01-30 23:39:08 -08:00
James Lu
341c208513 inspircd, ts6: don't crash when receiving an unrecognized UID 2016-01-27 18:41:25 -08:00
James Lu
fdad7c9c16 ts6: record null IPs as 0.0.0.0 instead of 0 2016-01-23 13:52:37 -08:00
James Lu
4b939ea641 ts6: rewrite end-of-burst code (EOB is literally just a PING in ts6) 2016-01-23 13:52:37 -08:00
James Lu
06d22722dc protocols: parse modes on the TARGET, not the sender
This fixes crashes on AssertionError when the sender of a MODE is a server.
2016-01-19 21:23:07 -08:00
James Lu
814ebc9fe0 ts6: use new-style module design (#156) 2016-01-16 18:14:46 -08:00
James Lu
812a866a4e protocols: rename pingServer -> ping 2016-01-16 17:11:23 -08:00
James Lu
3d0bf18001 protocols: rename topicClient -> topic; topicServer -> topicBurst
This is one of the few commands that I won't consolidate at this time, because there is actually a difference in how most IRCds handle topic bursts and normal topic changes
2016-01-16 17:09:52 -08:00
James Lu
5ccf204c75 protocols: consolidate modeClient and modeServer into mode() 2016-01-16 17:08:17 -08:00
James Lu
eef97ac035 protocols: consolidate killServer / killClient into kill() 2016-01-16 17:03:22 -08:00
James Lu
ee65ac60e1 protocols: rename sjoinServer(...) -> sjoin(...) 2016-01-16 16:53:46 -08:00
James Lu
108be5e25e protocols: rename knockClient -> knock 2016-01-16 16:41:17 -08:00
James Lu
b4e5c57a35 protocols: rename inviteClient(...) -> invite(...) 2016-01-16 16:38:27 -08:00
James Lu
acdd7dbb78 protocols: rename joinClient(...) -> join(...) 2016-01-16 16:36:45 -08:00
James Lu
48203ff321 protocols: reword error text 2016-01-09 17:44:18 -08:00
James Lu
eac934c237 classes: sort code, move nickToUid, clientToServer, isInternalClient, isInternalServer into the Irc class
The following BREAKING changes are made:
utils.nickToUid(irc, nick) -> irc.nickToUid(nick)
utils.isInternalClient(irc, uid) -> irc.isInternalClient(uid)
utils.isInternalServer(irc, uid) -> irc.isInternalServer(uid)
utils.clientToServer(irc, uid) -> utils.getServer(uid)
2015-12-31 17:28:47 -08:00
James Lu
8b8895988d ts6: map EUID hook to UID 2015-12-30 16:53:35 -08:00
James Lu
741fed9acd protocols: allow changing remote users' hosts in updateClient
Closes #142.
2015-12-30 15:54:09 -08:00
James Lu
f3d8c35219 ts6: fix sending wrong UID in handle_chghost hook payload 2015-12-30 15:53:31 -08:00
James Lu
bf7522697a Rename PYLINK_CLIENT_OPERED hook -> CLIENT_OPERED
To be consistent, any PYLINK_* hooks should internal hooks sent out by PyLink itself. CLIENT_OPERED, on the other hand, requires protocol modules to send it and thus, shouldn't be labeled as a PYLINK_* hook.
2015-12-26 15:41:22 -08:00
James Lu
11adee9d78 Yet another documentation refresh (#113) 2015-12-26 14:45:28 -08:00
James Lu
349cff36e1 protocols: in TOPIC hooks, send the topic as keyword "text" instead of keyword "topic"
This is just to be more consistent, as other hooks usually use "text" for text fields.
2015-12-18 22:05:10 -08:00
James Lu
5c0517ba40 unreal/ts6/relay: add some more user mode support
Cloaking is still a bit iffy on UnrealIRCd networks - Unreal insists on applying its own cloaking for +x users, but vHosts for non +x remote users don't apply at all (their real host is shown instead)
2015-11-21 23:57:24 -08:00
James Lu
f3428d264b ts6: actually send original TS in INVITE hook 2015-11-15 21:16:03 -08:00
James Lu
e167be2a69 move awayClient/handle_away to ts6_common 2015-11-15 09:34:26 -08:00
James Lu
ac48c49591 Move squitServer/spawnServer to ts6_common, add topicServer for Unreal 2015-11-15 09:12:21 -08:00
James Lu
eeedeb0135 Move numericServer to ts6_common 2015-11-11 19:40:10 -08:00
James Lu
2008df047c Fix logic in last commit
ts has to be set to orig_ts if missing, otherwise a later comparison would try to check for None <= some int, which would error
2015-11-08 15:14:03 -08:00