James Lu
741528b0b3
Merge handle_invite into IRCS2SProtocol ( #454 )
2017-06-29 22:17:46 -07:00
James Lu
310f3f23b8
protocols: rename various parse* functions (no migration stub)
...
Renamed to camel case:
- parseArgs -> parse_args
- parsePrefixedArgs -> parse_prefixed_args
Renamed to show that we're specifically parsing ISUPPORT data:
- parseCapabilities -> parse_isupport
- parsePrefixes -> parse_isupport_prefixes
2017-06-27 17:16:46 -07:00
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
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
08c0082430
protocols: rename checkCollision -> check_nick_collision() ( #454 )
2017-05-09 20:44:48 -07:00
James Lu
b83aba0b13
inspircd: stop ENDBURST timers when irc.aborted gets set
2017-05-07 13:56:55 -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
01dd209647
inspircd: major->important
2017-02-18 14:45:23 -08:00
James Lu
cda5d15e31
inspircd: work around OPERTYPE changes in InspIRCd 3.x
2017-02-18 14:28:28 -08:00
James Lu
663e657bf5
inspircd: work around extraneous letters sometimes sent in FJOIN TS
...
Anope 1.8 potentially sends a trailing 'd' after the timestamp, which causes int() to error. This is technically valid in InspIRCd S2S because atoi() ignores non-digit characters, but it's strange behaviour either way:
<- :3AX FJOIN #monitor 1485462109d + :,3AXAAAAAK
Thansk to @koaxirc for reporting.
2017-02-05 21:06:42 -08:00
Mitchell Cooper
5e79ea908d
inspircd: fix comment that says FIDENT in the FHOST handler ( #392 )
2017-01-12 21:00:24 -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
0b8b4dc3cf
inspircd, nefarious: stop applying remote modes on sjoin
...
I have no clue why this code exists, but it looks wrong and probably is wrong.
2017-01-01 00:19:10 -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
0815df1bca
Irc: rewrite isInternalClient to use getServer & return a boolean ( #355 )
2016-11-09 18:55:53 -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
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
c20dd07a2d
inspircd: implement /ALLTIME support ( #228 )
2016-08-12 19:36:40 -07:00
James Lu
8ac014709b
inspircd: track MODSUPPORT and required modules for updateClient()
...
m_chgident.so, m_chghost.so, and m_chgname.so are required for ident, host, and real name setting to work, respectively.
2016-08-08 23:40:48 -07:00
James Lu
c36c32082f
inspircd: support SAKICK
2016-07-28 21:05:59 -07:00
James Lu
eef54cd77d
classes: Move ISUPPORT-style PREFIX and capabilities handling to Protocol
2016-07-20 23:59:22 -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
84452bec2e
inspircd: always make PyLink handle WHOIS ( closes #267 )
...
This removes the use_experimental_whois option, which is always enabled now.
The rationale behind this is that PyLink cannot accurately track signon and idle times for things like relay users, without forwarding WHOIS requests between servers in a way the hooks system is really not optimized to do. However, no IDLE response means that no WHOIS data is ever sent back to the calling user, so this workaround is probably the best solution, aside from faking values.
2016-07-10 22:08:56 -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
7d321e2e6c
inspircd: only send services_login hooks if the user exists
...
With SASL, services_login can be called before the user is registered. We should ignore that because the actual accountname is still bursted later.
2016-07-08 12:08:13 -07:00
James Lu
3b80802d1a
protocols: rewrite encapsulated commands implicitly
...
Closes #182 .
2016-07-05 13:27:31 -07:00
James Lu
d549e2ae47
protocols: format kills properly in ts6_common.handle_kill() ( #239 )
...
This separates the kill handling for InspIRCd and other TS6 protocols, as InspIRCd pre-formats kills when they are sent.
2016-07-05 00:08:02 -07:00
James Lu
6c8731a55a
inspircd: refactor opertype handling and opertypes for Services
...
This gives all protected service clients with +k a special "Network Service" opertype.
2016-07-01 21:03:10 -07:00
James Lu
f458a40e1c
inspircd: new use_experimental_whois option, which forces PyLink to handle WHOIS requests locally
2016-06-27 22:28:37 -07:00
James Lu
57afa806e3
inspircd: implement raw numeric sending
2016-06-27 22:28:00 -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
77e13bce03
inspircd: fix logic for tracking existing bans in sjoin()
2016-06-23 22:36:22 -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
481d70eff8
New import paths for properly installed pylinkirc
2016-06-20 18:18:54 -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
beae4eea9e
core: rename utils.fullVersion -> irc.version ( #199 )
2016-04-30 17:00:28 -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
05752d9f60
Merge branch 'master' into devel
2016-04-29 23:43:15 -07:00
James Lu
01bf0325fb
inspircd: fix wrong variable in KILL text
2016-04-29 23:43:03 -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
38e098aef4
inspircd: normalize chmode +r name
...
This should be "registered", not "c_registered" in order to be consistent with other protocols.
2016-04-09 18:25:17 -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
662d1ce03f
inspircd: warn that inspircd 2.2 support is experimental
2016-03-26 18:19:19 -07:00
James Lu
d5d3c2422b
inspircd: define minimum & target protocol versions instead of hardcoding them
2016-03-26 16:23: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
f618b96b34
inspircd: add VERSION handling
...
InspIRCd is different from the rest in that it stores and caches version data for other servers during BURST, instead of whenever it is requested by a client.
2016-03-26 11:35:29 -07:00
James Lu
23056e97e3
protocols & coreplugin: add handlers for VERSION requests
2016-03-26 11:27:07 -07:00
James Lu
d531201850
Merge branch 'master' into devel
2016-02-27 17:47:55 -08:00
James Lu
a7a98c9a52
inspircd: format kill reasons like "Killed (sourcenick (reason))"
...
InspIRCd will show the raw kill message sent from servers as the quit message.
So, make kills look actually like a kill instead of someone quitting with an arbitrary message.
2016-02-26 07:16:39 -08:00
James Lu
cabdb11f86
inspircd: implement services account tracking ( #25 )
2016-02-20 17:54:46 -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
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
bb9d87bdca
inspircd: split protocol negotiation handlers into separate functions ( #156 )
...
Use the generic handle_events in ts6_common, which passes everything to event handlers appropriately.
2016-01-17 21:03:10 -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
9a61e64dfc
protocols: squitServer(...) -> squit(...)
2016-01-16 16:53:06 -08:00
James Lu
196282db86
protocols: numericServer(...) -> numeric(...)
2016-01-16 16:47:35 -08:00
James Lu
108be5e25e
protocols: rename knockClient -> knock
2016-01-16 16:41:17 -08:00
James Lu
20cb65e668
protocols: rename awayClient -> away
2016-01-16 16:40:36 -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
741fed9acd
protocols: allow changing remote users' hosts in updateClient
...
Closes #142 .
2015-12-30 15:54:09 -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
3c51231ce8
inspircd: re-add RSQUIT handler ( closes #150 )
2015-12-24 19:52:52 -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
d60a48bb11
protocols: actually update away status in awayClient
...
"Oops, I forgot to do this."
2015-12-17 21:50:50 -08:00
James Lu
09bb2976f8
inspircd: Remove a couple of overzealous find+replaces
2015-12-17 21:19:40 -08:00
James Lu
6b14a885bc
protocols: add support for endburst_delay in spawnServer ( #128 )
2015-12-17 21:18:11 -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
James Lu
2eeba50a2a
Modularize TS updating code ( Closes #129 )
2015-11-08 10:49:09 -08:00
James Lu
c5b3441f6a
inspircd: alias SVSTOPIC to FTOPIC (reported by @siniStar7boy)
...
SVSTOPIC is used by services to set topics when m_topiclock (server side topic locking) is enabled on the IRCd. Unfortunately, usage of this isn't documented anywehere......
Basically, this makes PyLink treat it as a regular server topic change (FTOPIC), since the arguments are the same anyways.
2015-10-31 19:15:03 -07:00
James Lu
181c40d9fe
inspircd: fix another "find all, replace" mistake
2015-10-08 21:06:35 -07:00
James Lu
8bde21f1e6
inspircd: remove clients from state when killing own clients
...
Closes #115 .
2015-10-08 20:13:37 -07:00
James Lu
f015fe5e25
Documentation updates, finish off pmodule-spec.md ( #113 )
2015-09-24 18:36:54 -07:00
James Lu
3351aafc79
inspircd: fix wrong arguments in numericServer() stub
2015-09-24 18:13:11 -07:00
James Lu
e92f35018f
TS6SIDGenerator: take an IRC object, and skip any SIDs that are currently in use
2015-09-20 18:32:43 -07:00