James Lu
4cdae540b5
IRCCommonProtocol: fix type of maxnicklen
2017-07-03 13:07:38 -07:00
James Lu
66af57e74f
IRCCommonProtocol: handle EXCEPTS, INVEX, NICKLEN, DEAF, CALLERID in 005
2017-07-03 13:05:47 -07:00
James Lu
06d69aadf7
clientbot: fix self.connected.set() order
2017-07-03 13:04:43 -07:00
James Lu
a5e7d76341
IRCCommonProtocol: only update the same tokens once per connection
2017-07-03 12:49:38 -07:00
James Lu
ec308acfcb
protocols: move 005 handling code to IRCCommonProtocol
...
Also enable extended server negotiation for ngIRCd, which really just passes 005 between servers (nifty!)
2017-07-03 12:45:39 -07:00
James Lu
e9d7ac39ea
ngircd: remove duplicate function
2017-07-03 12:21:44 -07:00
James Lu
091c763a0f
Initial ngIRCd protocol stub
2017-07-03 00:24:26 -07:00
James Lu
8bf65f3820
ircs2s_common: implicitly expand PUIDs in _send_with_prefix
2017-07-03 00:13:17 -07:00
James Lu
78034096a8
protocols: merge _expandPUID into ircs2s_common
2017-07-03 00:11:49 -07:00
James Lu
8ddcc4d9a6
Move part, quit, message, notice, topic, _send_with_prefix, _expandPUID to ircs2s_common
2017-07-03 00:05:58 -07:00
James Lu
f163d7ddde
protocols: remove extraneous "Error: " from exception messages
2017-07-02 22:52:46 -07:00
James Lu
c9272c25ce
IRCS2SProtocol: skip implicit message sender fetching if the first arg starts with a :
2017-07-02 22:44:57 -07:00
James Lu
640e903dd6
Move _get_SID/_get_UID to IRCCommonProtocol
2017-07-02 22:36:47 -07:00
James Lu
e9a6328566
protocols: remove unnecessary handle_squit overrides
2017-07-02 22:20:52 -07:00
James Lu
d4260734dc
clientbot: make sure incoming server messages don't clash with a PSID/PUID
2017-07-02 22:13:57 -07:00
James Lu
1e39fb78db
clientbot: rename _validateNick -> _check_puid_collision
2017-07-02 22:11:40 -07:00
James Lu
ce2852bdc0
clientbot: get rid of _get_SID in message parsing
...
It isn't needed because any external server messages are sent raw.
2017-07-02 22:09:22 -07:00
James Lu
51d8d3b3b8
clientbot: store external server names raw instead of using server name mangling
2017-07-02 21:59:40 -07:00
James Lu
ee5a884328
clientbot: fix imports for PyLink 2.0
2017-07-02 21:59:29 -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
b81a03fda9
protocols: Channel.removeuser -> Channel.remove_user
2017-06-30 21:40:50 -07:00
James Lu
7d68c03101
various: convert sortPrefixes/getPrefixModes calls to snake case
2017-06-30 21:40:05 -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
0c7fb861f1
classes, relay, ircs2s_c: tweak/remove various debug statements
2017-06-29 23:19:21 -07:00
James Lu
a4e321522b
protocols: migrate away from camel case
2017-06-29 22:56:14 -07:00
James Lu
3f240bd9e8
p10: mark check_cloak_change as private
2017-06-29 22:21:08 -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
2034bfcc83
IRCS2SProtocol: sort handle_* methods alphabetically
2017-06-29 22:17:46 -07:00
James Lu
7cfc63d6ed
ts6: fix wrong argument count when parsing INVITE ts
2017-06-29 22:17:46 -07:00
James Lu
d01e797219
Merge handle_part into IRCS2SProtocol ( #454 )
2017-06-29 22:17:43 -07:00
James Lu
58a4215690
ratbox: fix support for merged Irc/proto
2017-06-29 21:55:52 -07:00
James Lu
67347935b5
ircs2s_common: add missing ProtocolError import
2017-06-29 21:55:33 -07:00
James Lu
c9c01def8c
ts6_common: continue using self.irc in TS6SIDGenerator
2017-06-29 21:51:02 -07:00
James Lu
77357b765e
clientbot: rename various private functions
...
* capEnd -> _do_cap_end
* requestNewCaps -> _request_ircv3_caps
* saslAuth -> _try_sasl_auth
* sendAuthChunk -> _send_auth_chunk
* parseMessageTags -> parse_message_tags
2017-06-27 22:28:31 -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
df18e318a8
WIP: merge IRCNetwork and Protocol classes together
...
Eventually, the goal is to have both of these hotswappable with inheritance, so this distinction becomes moot.
2017-06-24 23:27:24 -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
7ca98eb965
Split IRC-specific code from classes.Protocol into a new IRCCommonProtocol ( #454 )
2017-06-16 17:13:26 -07:00
James Lu
45ae1dd67e
Merge ts6 and p10 handle_events, handle_privmsg into ircs2s_common ( #454 )
2017-06-16 17:00:22 -07:00
James Lu
1996b86e85
p10: acknowledge incoming KICKs with a PART
...
Per https://github.com/evilnet/nefarious2/blob/ed12d64/doc/p10.txt#L611-L616 . This fixes autorejoin-on-kick not working with prefix modes because the remote verifies whether the KICK has been acknowledged properly. Closes #465 .
2017-06-02 08:09:19 -07:00
James Lu
1ce1f7b3e5
ircs2s_common: don't clobber the case of prefixmsg prefixes on RFC1459 networks
...
Fixes #464 .
2017-06-02 07:56:33 -07:00
James Lu
6ef3bab0fc
unreal: remove handle_privmsg/handle_notice override
2017-06-02 07:56:22 -07:00
James Lu
69cf21c04e
Merge ts6 and p10 handle_events, handle_privmsg into ircs2s_common
2017-05-20 19:41:19 -07:00
James Lu
cfec70730f
clientbot: reinitialize PUID generators on connect
...
Closes #448 .
2017-05-12 19:57:24 -07:00
James Lu
08c0082430
protocols: rename checkCollision -> check_nick_collision() ( #454 )
2017-05-09 20:44:48 -07:00
James Lu
8f14cb238b
p10: rename checkCloakChange -> check_cloak_change (consistency) ( #454 )
2017-05-09 20:36:43 -07:00
James Lu
c898da7378
p10: move command tokens dict into a class variable & drop _getCommand()
2017-05-09 20:15:23 -07:00
James Lu
b83aba0b13
inspircd: stop ENDBURST timers when irc.aborted gets set
2017-05-07 13:56:55 -07:00
James Lu
2feb93aaf0
clientbot: generate PUIDs/PSIDs with the nick or server name as prefix
2017-04-09 15:32:13 -07:00
James Lu
3f6501fa88
clientbot: make sure incoming nicks don't clash with a PUID/PSID
...
This should really never happen, but it might break quite a few things if it does.
2017-04-09 15:12:52 -07:00
James Lu
cc9ffd47b1
clientbot: fix misleading comment
2017-04-09 15:01:49 -07:00
James Lu
bf1d7812e2
clientbot: track channel modes and TS on join
...
Closes #345 .
2017-04-09 14:49:19 -07:00
James Lu
9d50a4363b
clientbot: make SASL timeout configurable & raise default to 15 secs
2017-04-05 23:08:17 -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
8465edd5af
ts6_common: fix outbound kicks to PUIDS not updating the state
...
This was previously trying to update the state based on the user's nick, but we use PUIDs internally. In other words, make sure that we don't replace the internal target when sending the outgoing text...
2017-04-01 12:26:08 -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
d6243d9f89
protocols: raise NotImplementedError with proper reasons
2017-03-26 14:32:54 -07:00
James Lu
7ff5f47064
protocols: tweak mode type definitions
2017-03-25 13:47:16 -07:00
James Lu
45729d48cc
p10: mode definition tweaks
...
- rename cmode +d to "had_delayjoin" (from "had_delayjoins")
- add cmode +R for ircu
-
2017-03-25 13:47:16 -07:00
James Lu
1994d1171c
p10: add support for ircu proper
2017-03-25 13:47:16 -07:00
James Lu
e27095dd67
p10: set mode +x on targets when changing vHost
2017-03-25 13:47:15 -07:00
James Lu
6a32ae94fc
p10: implement FAKE and SETHOST IRCd checks
2017-03-25 13:47:15 -07:00
James Lu
235b296a69
Rename protocols/nefarious.py to protocols/p10.py
2017-03-25 13:47:15 -07:00
James Lu
fa6120a563
nefarious: add a snircd mode set, fix nef2 umode +Dd definitions
2017-03-25 13:47:15 -07:00
James Lu
6154a7fb09
nefarious: mark cmode +A and +U as type B ( #330 )
...
This is consistent with snircd as of 58af1fc4d0
2017-03-25 13:47:15 -07:00
James Lu
9e0e47064a
hybrid, ratbox: re-disable slash-in-hosts
2017-03-24 00:24:06 -07:00
James Lu
bde27b0dde
nefarious: define protocol_caps in the right class...
2017-03-23 22:46:12 -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
936535786e
clientbot: declare clear-channels-on-leave capability
2017-03-15 23:47:32 -07:00
James Lu
2ca0cf05a0
Start work on protocol capabilities ( #337 )
2017-03-15 23:32:47 -07:00
James Lu
d318fbac77
protocols: migrate away from irc.botdata ( #273 )
2017-03-05 00:09:01 -08:00
James Lu
47f0b7626f
clientbot: time out CAP/SASL after 5 seconds
...
Closes #424 .
2017-03-04 23:54:16 -08:00
James Lu
9420f21680
clientbot: send CAP LS before NICK/USER so that it consistently gets a response before connect
...
Previously, SASL was failing on networks like freenode, as the connection completed before a CAP response was received.
2017-03-03 15:39:28 -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
223dd3bf7b
nefarious: fix a typo causing crash on user mode change
...
(cherry picked from commit 3e4a980ea6
)
2017-02-17 22:28:11 -08:00
James Lu
8424870ec3
clientbot: abort when receiving a QUIT from uplink ( #405 )
2017-02-17 22:27:38 -08:00
James Lu
3e4a980ea6
nefarious: fix a typo causing crash on user mode change
2017-02-17 22:27:38 -08:00
James Lu
75158c47e2
clientbot: block PRIVMSG/NOTICE from being routed the wrong way ( #405 )
2017-02-17 22:27:38 -08:00
James Lu
f1fddefeac
protocols: catch S2S messages if they're being routed the wrong way ( #405 )
2017-02-17 22:27:38 -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
f7768a00a0
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.
(cherry picked from commit 663e657bf5
)
2017-02-05 21:13:23 -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
James Lu
359132045d
protocols: allow forwarding NOTICE from servers ( #384 )
2017-01-29 19:49:37 -08:00
James Lu
39db5aee04
ts6_common: properly handle KICK without a reason
...
This field is optional in TS6.
2017-01-14 11:08:24 -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
Mitchell Cooper
5e79ea908d
inspircd: fix comment that says FIDENT in the FHOST handler ( #392 )
2017-01-12 21:00:24 -08:00