James Lu
c4a3baca7d
protocols: switch to self.is*
2017-08-28 20:07:36 -07:00
James Lu
8c0f19422f
core: Add irc argument to User and Server classes
...
Also, add a __deepcopy__ override to channel because we cannot clone IRCNetwork objects (locks cannot be pickled).
2017-08-25 13:53:45 -07:00
James Lu
96a202acce
core: make User.channels use IRCCaseInsensitiveSet
...
Closes #515 . This is an API breaking change!
2017-08-25 13:26:34 -07:00
James Lu
cdb575236e
inspircd: remove a useless and misformatted debug line
2017-08-25 02:13:15 -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
c6ca89b48a
Fill in the rest of the extbans list for inspircd & unreal ( #498 )
2017-08-23 21:47:43 -07:00
James Lu
de1a6379df
Add (experimental) support for matching extbans ( #498 )
2017-08-23 21:18:57 -07:00
James Lu
614b8b87da
inspircd: rewrite handle_ping to handle one-arg PING
2017-08-09 16:55:02 -07:00
James Lu
486a225156
inspircd: mark endburstf() threads as daemon=True
...
There is no reason whatsoever for this to even potentially block shutdown.
2017-08-08 00:27:05 -07:00
James Lu
64f05bd28b
inspircd: set a name on endburstf() threads
2017-08-08 00:26:32 -07:00
James Lu
9702030bf5
protocols: continue removing to_lower() calls on channels ( #372 )
2017-08-07 21:54:33 -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
3c675bb163
inspircd, unreal: support the "block nick changes" extban
...
This is n: and ~n: on inspircd and unreal respectively.
2017-08-06 01:47:43 -07:00
James Lu
9ae851e1fc
classes: rename NetworkCore.aborted to _aborted
2017-08-05 22:16:52 -07:00
James Lu
7db811f2dd
protocols: declare quiet extban support where applicable
2017-08-05 21:52:34 -07:00
James Lu
ab8a922809
inspircd: add GLINE support ( #139 )
2017-07-17 06:12:12 -07:00
James Lu
c7c29f35e5
core: make message cutoff optional, and disable for inspircd
...
Closes #490 .
2017-07-16 21:01:55 -07:00
James Lu
cb368439cf
inspircd: bring back extended WHOIS replies via a force_whois_extensions option
2017-07-12 08:28:32 -07:00
James Lu
50e7b0ab13
Limit signon time in WHOIS replies to service bot targets
...
Faking signon time for relay clients, etc. is misleading...
2017-07-12 07:49:19 -07:00
James Lu
556c2efb0a
Make showing startup time an option (whois_show_startup_time)
2017-07-12 07:44:18 -07:00
James Lu
3fb563bb43
inspircd: get rid of IDLE->WHOIS hack
...
This is unnecessary as sending 0 for both the idle time and signon time will tell the IRCd to not show anything.
...But we track our startup time, so we can actually pass that as a value (Anope does this as well)
2017-07-12 07:23:00 -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
67a36b7ebe
inspircd: rename _operUp to _oper_up
2017-07-07 13:27:45 -07:00
James Lu
5d5c861a93
protocols: rename check_nick_collision to _check_nick_collision
2017-07-07 03:18:40 -07:00
James Lu
d149576b4e
protocols: move invite() into IRCS2SProtocol
2017-07-06 21:43:53 -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
James Lu
56c8b90362
IRCS2SProtocol: handle both killpath-based and preformatted kill reasons
...
Also drop the override in protocols/inspircd, as it is no longer needed.
2017-07-05 02:26:40 -07:00
James Lu
5d4f2149e6
Move squit() to ircs2s_common
2017-07-04 23:41:00 -07:00
James Lu
43af9d1bac
protocols: move ping() into IRCCommonProtocol
2017-07-04 22:00:22 -07:00
James Lu
f163d7ddde
protocols: remove extraneous "Error: " from exception messages
2017-07-02 22:52:46 -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
d0846170c4
protocols: spawnServer -> spawn_server
2017-06-30 21:27:15 -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
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