Mitchell Cooper
5e79ea908d
inspircd: fix comment that says FIDENT in the FHOST handler ( #392 )
2017-01-12 21:00:24 -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
487a07671b
ts6: implement line wrapping in SJOIN ban bursts ( #253 )
2017-01-11 23:09:25 -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
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
ef4e1ecbab
unreal: count the server prefix in SJOIN line wrap ( #253 )
2017-01-06 18:29:47 -08:00
James Lu
4183a580d2
nefarious: implement text wrapping in BURST ( #253 )
...
Some of this is totally hacky, but it still works from my initial testing...
2017-01-06 18:24:32 -08:00
James Lu
92dcf3c28e
nefarious: implement text wrapping in outgoing MODE ( #253 )
2017-01-06 18:08:21 -08:00
James Lu
43002d466e
nefarious: fix misplaced log line from efe38264ef
2017-01-06 16:43:10 -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
efe38264ef
nefarious: remove extraneous userlist assignment in handle_burst
2017-01-02 10:25:37 -08:00
James Lu
6a90401d56
ircs2s_common: fix last commit (missing import)
2017-01-01 20:39:34 -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
dc11638eb9
ts6 (and derivatives): don't burst bans that were already set
2017-01-01 00:28:55 -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
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
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
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
3a8710540c
Merge branch 'devel' into wip/ircv3
2016-12-19 00:10:07 -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
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
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
405b886ba2
clientbot: overload _getUid() to deal with nick collisions between virtual clients and Clientbot users
...
Closes #327 .
(cherry picked from commit 05e2d6d060
)
2016-10-14 22:33:29 -07:00
James Lu
eb64190228
Clientbot: use a more specific realname fallback
...
(cherry picked from commit 288a2fffd7
)
This is cherry-picked as a prerequisite for the next commit.
2016-10-14 22:33:10 -07: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
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
36e18929de
docs, hybrid, ratbox: Mode definition updates
2016-10-01 13:41:11 -07:00
James Lu
eb79f77bd2
ratbox: fixes for mode name consistency
2016-10-01 13:40:10 -07:00
James Lu
19c5a8c64f
ratbox: update mode definitions
2016-10-01 13:00:04 -07:00
James Lu
4dd0709f66
protocols, core: remove unused imports
2016-10-01 12:43:12 -07:00
James Lu
625e7b8aae
ratbox: handle ENCAP LOGIN ( #338 )
2016-10-01 12:39:37 -07:00
James Lu
d943a8286f
ratbox: fix typo in outgoing REALHOST
2016-10-01 00:40:20 -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
bd9885182e
ratbox: stub updateClient to prevent hostname desyncs
...
In ratbox, arbitrary host changing via CHGHOST is not supported.
2016-10-01 00:20:54 -07:00
James Lu
39987b6dcc
ts6: supply SAVETS_100 capability for ratbox
2016-10-01 00:11:50 -07:00
James Lu
d6cb5c1ed0
ratbox: implement REALHOST ( #338 )
2016-09-30 23:46:23 -07:00
James Lu
f618feea26
Initial protocol support for Ratbox ( #338 )
2016-09-30 23:33:27 -07:00
James Lu
d9fdd9dfcb
ts6: modularize required capabilities
2016-09-30 23:33:04 -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
James Lu
4222cc30a8
relay, clientbot: implement clientbot mode sync
...
Closes #287 .
2016-09-25 20:07:16 -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
b43d714011
clientbot: ignore WHO replies for clients we don't know
...
This fixes various KeyErrors, etc. when processing the WHO reply later on, as Clientbot doesn't track state for anyone who doesn't share a channel with or talks to the bot.
Reported by Kev`Bz via IRC.
2016-09-08 18:45:34 -07:00
James Lu
90f1999c6d
clientbot: downgrade bad updateClient() calls to warning
2016-09-08 17:44:02 -07:00
James Lu
ffa89f1e01
nefarious: fix UnboundLocalError when no modes are given on user introduction
...
Reported by Kev`Bz via IRC.
2016-09-07 06:57:03 -07:00
James Lu
c5c77eeb97
protocols: chandata->channeldata for MODE and JOIN hooks
2016-09-02 17:52:19 -07:00
James Lu
d1e2dfcf61
clientbot: only call spawnClient for new message sources after irc.pseudoclient is set
2016-09-01 13:08:20 -07:00
James Lu
4d4dbb7764
Revert "clientbot: return existing PUIDs in spawnClient if nick exists"
...
This reverts commit 113fbf9eb8
.
Incomplete fix: would confuse virtual service bots and external users if they had the same nick.
2016-09-01 13:00:27 -07:00
James Lu
113fbf9eb8
clientbot: return existing PUIDs in spawnClient if nick exists
...
This fixes some silly UID duplication with FNC handling.
2016-08-31 23:22:24 -07:00
James Lu
ae63f72cf9
clientbot: decouple inbound and outbound nick changes
2016-08-31 23:12:45 -07:00
James Lu
9bda4094e4
clientbot: handle pre-auth FNC better
...
Closes #321 .
2016-08-31 23:05:36 -07:00
James Lu
be960bf27b
clientbot: handle numerics 463 to 465 as fatal error
2016-08-31 22:46:46 -07:00
James Lu
cf5898fb45
clientbot: only send updateClient() hooks if something changes
...
Closes #323 .
2016-08-31 22:32:12 -07:00
James Lu
663d03ed2c
relay/clientbot: begin work on outgoing PMs to clientbot users ( #318 )
...
This still needs to implement PMs going the other way around, and should eventually distinguish between PMs and private notices.
2016-08-31 14:08:28 -07:00
James Lu
53de6542f6
clientbot: in nick(), make sure irc.pseudoclient exists
2016-08-27 20:39:35 -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
814c714145
clientbot: fix nick() using the wrong arguments
...
I should learn to proofread...
Also, outgoing NICK changes should not implicitly update the state; we should wait for the IRCd's acknowledgement instead.
2016-08-24 22:54:53 -07:00
James Lu
29bfe108fe
clientbot: only send SQUIT payload if nicks are affected
2016-08-21 17:43:10 -07:00
James Lu
8cf771be2f
ts6: fix typo
2016-08-20 17:36:56 -07:00
James Lu
e9088792af
unreal: support TSCTL alltime
...
Closes #228 .
2016-08-17 21:21:18 -07:00
James Lu
c20dd07a2d
inspircd: implement /ALLTIME support ( #228 )
2016-08-12 19:36:40 -07:00
James Lu
94aee8f05c
Implement /TIME support ( #228 )
2016-08-12 19:19:09 -07:00
James Lu
17127dd131
clientbot: send hook payloads for external updateClient
...
Closes #300 .
2016-08-12 18:47:12 -07:00
James Lu
b4e83e7b1a
clientbot: basic prefix mode detection (halfop, admin, owner)
2016-08-11 12:46:05 -07:00
James Lu
226089cc3c
clientbot: forward SJOIN on the main client as JOIN ( #299 )
2016-08-11 11:24:23 -07:00
James Lu
3a0a2c7f1c
clientbot: don't update state on join()
...
Wait for NAMES instead to make sure that the join attempt actually succeeded. #299
2016-08-11 11:23:41 -07:00
James Lu
7a0a013c43
clientbot: suppress mode change hooks for internal clients
2016-08-10 21:07:20 -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
72f9019300
clientbot: remove self.irc.users print
2016-08-08 23:40:24 -07:00
James Lu
12e1a0edff
Move handle_error() to the generic protocol
2016-08-08 18:12:07 -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
b36ce36451
protocols: send old IrcServer object (serverdata) in SQUIT hooks
2016-08-04 12:50:04 -07:00
James Lu
1c0900b29d
clientbot: introduce virtual SQUIT and SJOIN hooks
2016-08-04 11:48:57 -07:00
James Lu
62099e6078
clientbot: move virtual ENDBURST hook to end of MOTD
...
Possible fix for #299 .
2016-08-04 11:10:51 -07:00
James Lu
0fc0f104bd
clientbot: pass realhost and IP options to IrcUser
2016-08-02 23:36:20 -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
9a59c68370
protocols: strip leading prefix modes before checking whether msg target is a channel
...
(cherry picked from commit 2c7b5669bd
)
2016-08-01 17:59:31 -07:00
James Lu
f061a2fc68
ts6: replace str.lower() with irc.toLower() for channel names
...
(cherry picked from commit 791b124cf7
)
2016-08-01 17:59:31 -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
2ca3dfe689
ts6_common: rewrite =#channel messages to @#channel (charybdis +z support)
2016-07-31 20:38:25 -07:00
James Lu
2c7b5669bd
protocols: strip leading prefix modes before checking whether msg target is a channel
2016-07-31 20:30:51 -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
891039dba2
Merge branch 'master' into devel
2016-07-29 14:44:54 -07:00
James Lu
358e03f6ce
ts6: don't unconditionally apply modes in outgoing sjoin()
2016-07-29 14:44:25 -07:00
James Lu
8eed60a8f5
nefarious: fix nameerror on start
2016-07-29 01:02:18 -07:00
James Lu
2bc066bacb
clientbot: don't send duplicate operups ( #289 )
2016-07-29 00:56:14 -07:00
James Lu
3ad9362247
clientbot: fix oper tracking, add deoper tracking
...
Closes #289 .
2016-07-29 00:54:47 -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
f4922743fc
core: SID and hostname options are now optional ( #282 )
...
Hostname defaults to a fallback hardcoded in world.fallback_hostname, while SID defaults to None (protocol modules have to deal with this themselves)
2016-07-28 22:23:59 -07:00
James Lu
87c558537f
unreal: refactor to use utils.PUIDGenerator
...
Closes #238 .
2016-07-28 21:59:56 -07:00
James Lu
852bd74c3b
core: enumerate our server after calling proto.connect()
...
This gives protocol modules a chance to manipulate their SID before it's added to the internal server list, replacing hacks previously used by the Nefarious and Clientbot modules.
This is the first step to sid-less servers :)
2016-07-28 21:50:51 -07:00
James Lu
c410de2fad
Make server config validation protocol specific
...
Closes #282 .
2016-07-28 21:34:00 -07:00
James Lu
c36c32082f
inspircd: support SAKICK
2016-07-28 21:05:59 -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
94ae457a82
nefarious: fix usermode changes internally applying on the wrong target
...
A regression from fca23c7d55
overwrote the target UID with a nick before passing it into applyModes(), which raises an "unknown mode target" warning and causes the mode change to be dropped.
(cherry picked from commit af21063834
)
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
9233a94379
nefarious: forward CMODE and KICK through the server if the sender isn't opped
...
This prevents mode bounces, kick failures, and the HACK server notices from showing up.
(cherry picked from commit fca23c7d55
)
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
af21063834
nefarious: fix usermode changes internally applying on the wrong target
...
A regression from fca23c7d55
overwrote the target UID with a nick before passing it into applyModes(), which raises an "unknown mode target" warning and causes the mode change to be dropped.
2016-07-27 16:55:59 -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
4002fb9da5
clientbot: only send AWAY when polling if the message has changed
2016-07-26 23:30:26 -07:00
James Lu
fca23c7d55
nefarious: forward CMODE and KICK through the server if the sender isn't opped
...
This prevents mode bounces, kick failures, and the HACK server notices from showing up.
2016-07-26 18:31:23 -07:00
James Lu
8ce0ceee37
clientbot: properly track oper
2016-07-25 11:02:25 -07:00
James Lu
db9f362857
clientbot: use colon for realname in USER
2016-07-25 11:02:08 -07:00
James Lu
fcf364f958
clientbot: initialize users with umode +i by default
2016-07-25 00:00:27 -07:00
James Lu
a905f74800
relay/clientbot: rework KICK handling to send the right thing at the right times
...
Some of the logic was inverted so that the Clientbot would try to kick invalid things like GLolol/ovd, and send clientbot KICK payloads when it's supposed to forward an actual kick.
This also fixes KICKs from servers not being relayed by clientbot.
2016-07-24 11:55:46 -07:00
James Lu
05972e500c
clientbot: fix marking of internal/external servers
2016-07-24 11:52:34 -07:00
James Lu
8fc310eb24
clientbot: clear who / kick state on connect
2016-07-24 11:15:33 -07:00