Commit Graph

239 Commits

Author SHA1 Message Date
Tamás Solymos 40e594abf8 Fix NewNick's comment
It wasn't updated after fixing https://github.com/fluffle/goirc/issues/108.
2023-11-27 11:37:13 +00:00
Alex Bramley b1a6e3a286 Refactor out proxy dialing code; store contextless proxy.Dialer. 2023-11-23 20:44:32 +00:00
Tamás Solymos ceced391f3 Allow non-context Dialers
Dialers who don't implement DialContext but upgrade past https://github.com/fluffle/goirc/pull/109 (which is 2.5 years old but still) will break. This change falls back to the non-context dial method, where calls may take longer and time out, and goirc would give them a warning as well.
2023-11-23 08:29:44 +00:00
Taavi Väänänen e64b5d47c3 Add SASL authentication support
This hacks together support for IRCv3.1 SASL. Currently only SASL PLAIN
is supported, but it's implemented in a way that adding support for
other types should not require too many changes to the current code.
2022-11-28 09:05:14 +00:00
Stefano 54099b85a3 Implement feature request #77: Support IRCv3 capability negotiation during registration 2022-03-17 19:38:12 +00:00
Luca Bigliardi 58c9607dfb Fix connection cleanup when context is canceled
Signed-off-by: Luca Bigliardi <shammash@google.com>
2021-03-27 19:28:50 +00:00
Alex Bramley 5bb083547b Make call checker a handler. 2021-03-26 12:40:28 +00:00
Alex Bramley 1a10eba91a Use a Context in mockNetConn too. 2021-03-26 12:36:19 +00:00
Alex Bramley 27cc39787d Use a Context to kill internal goroutines. 2021-03-26 12:02:36 +00:00
Alex Bramley 1bb2dff298 Accept nick from 001 message. Fixes #110. 2021-03-26 11:20:00 +00:00
Luca Bigliardi e0c319f8ff Support context during connect
Signed-off-by: Luca Bigliardi <shammash@google.com>
2021-02-24 19:06:21 +00:00
Alex Bramley b2c51c13c6 NewNick handler that doesn't vary nick length. Fixes #108. Sort of. 2019-10-17 20:27:52 +01:00
Alex Bramley fc1dfa1ceb Add net.Dialer DualStack config option. 2018-02-16 21:04:56 +00:00
Alex Bramley c981f8f568 Avoid holding hSet lock while executing handlers. Fixes #102. 2017-07-25 20:29:28 +01:00
Alex Bramley 329a62d7d9 Don't hold conn.mu during REGISTER. Fixes #94. 2016-12-18 14:22:12 +00:00
Alex Bramley 64ad58533d Test ERROR handling and add constant. Fixes #92. 2016-11-28 22:50:19 +00:00
Alex Bramley 82bcd7aded Rename Shutdown to Close; implement io.Closer. 2016-09-16 19:40:27 +01:00
Alex Bramley 734da36009 Make Conn's Shutdown method public. 2016-09-12 20:55:10 +01:00
Alex Bramley a2223065b2 Actually perform SSL handshake when we claim to. Fixes #89. 2016-08-24 08:28:48 +01:00
Alex Bramley 20e4ea9b00 TestPing needs a different timer resolution on windows. Fixes #88. 2016-06-10 19:37:51 +01:00
Jason Keene aad5dbe821 Obfuscate PASS in debug logs. (#87) 2016-05-14 09:12:49 +01:00
Michael Stapelberg 07446c2595 ParseLine: ignore empty lines (instead of crashing) 2016-02-25 08:51:54 +01:00
Jake Bailey 4c6842acba link to spec 2016-01-12 20:02:46 -06:00
Jake Bailey 20ef362b1d skip empty tags, allow = in tag values, better clarify ; split, add IRCv3 tag parsing comment to ParseLine() 2016-01-12 20:00:40 -06:00
Jake Bailey 73f523f252 use a list of capabilities instead, as the spec defines space seperated caps 2016-01-11 16:50:32 -06:00
Jake Bailey 32ae1211bb check bad tag inputs 2016-01-11 16:43:19 -06:00
Jake Bailey e670ca970c fix comment 2016-01-11 16:25:17 -06:00
Jake Bailey 46ce56c580 don't add spaces and instead make message optional, let the user decide 2016-01-11 16:24:01 -06:00
Jake Bailey f6a94cc3a3 add tags parsing and CAP command, with parsing tests 2016-01-11 16:20:06 -06:00
John Soros f0ae9bb509 handlers: check array bounds before indexing 2015-12-02 21:51:44 +01:00
Alex Bramley 1e190eb233 Run gofmt to fix some trailing whitespace &c. 2015-11-02 21:41:41 +00:00
Alex Bramley e935d78bb7 Fix for the deadlock condition. 2015-11-02 21:16:07 +00:00
Alex Bramley 0436afaf76 Contrived test for a deadlock condition. 2015-11-02 21:01:36 +00:00
ripcurld00d af8bd35c8a Add variadic Privmsg functions
Privmsgln and Privmsgf are variadic versions of the Privmsg function.
They format a message according to fmt.Sprintln and fmt.Sprintf
respectively and send it using Privmsg.

Note: Although the Privmsgln function's name infers that a new-line
character is added at the end of the message, it does not do that.

For example, the following send "golang is # 1 IMHO" to #go-nuts:

    c.Privmsgln("#go-nuts", "golang is #", 1, " IMHO")
    c.Privmsgf("#go-nots", "%s %d %s", "golang is #", 1, "IMHO")
2015-10-15 11:49:05 +03:00
Brenton Morris f90b498ac4 Removed the config.Proxy variable and renamed config.ProxyServer to config.Proxy. Client now connects over the specified proxy if config.Proxy isn't an empty string. 2015-09-20 19:37:26 +12:00
Brenton Morris 866e8dac8a Added proxy support 2015-09-14 16:32:23 +12:00
Alex Bramley fdb1c8229d Support other chantypes in (*Line).Public. Fixes #65. 2015-07-28 18:10:23 +01:00
Romain Soufflet 2db4b19502 Change "gomock" repository URL 2015-06-15 13:59:14 +02:00
Alex Bramley 5df3729ce8 Bad fluffle not running tests after changes. 2015-04-17 20:42:59 +01:00
Alex Bramley bf4cdc99d1 Merge branch 'master' of github.com:fluffle/goirc
Conflicts:
	client/commands.go
2015-04-15 22:31:12 +01:00
Alex Bramley ed92e36e8e Attempt to improve the godoc of client. 2015-04-15 22:27:50 +01:00
Alex Bee 09f0447bb9 Merge pull request #60 from StalkR/ellipsis
client/commands: leave space for ellipsis
2015-04-14 11:20:50 +01:00
StalkR 30087ae0f3 client/commands: leave space for ellipsis 2015-04-14 12:18:11 +02:00
Alex Bramley f12a174523 Only dispatch DISCONNECTED once. 2015-04-14 07:50:39 +01:00
Alex Bramley cd24432da4 More deadlock fixes for #58.
- Remove lock in Me().
 - Move call to initialise() to Connect().
 - Ensure DISCONNECTED event is fired after shutdown() lock is released.
2015-04-13 19:05:42 +01:00
Alex Bramley e1ddd58df4 Update tests for deadlock fix. 2015-04-02 09:35:58 +01:00
Alex Bramley 861f24a130 Alternative deadlock fix. 2015-04-02 09:22:42 +01:00
Alex Bramley b4870bc685 Tell state tracker all the information about Me. 2015-04-01 17:54:33 +01:00
Alex Bramley 0cac69d2ee Merge branch 'state-copy'. Fixes #49, #35.
Overhaul the state tracker to return copies of data that should be correct
at the time of the response. Subsequent changes to tracked IRC state will not
be reflected in the copies. For people fixing up their code because this merge
broke everything, you probably want to be paying particular attention to the
use of conn.Me() instead of conn.cfg.Me.

Sorry if this causes you hassle, it's for the best.

Lastly, if kballard is watching: sorry dude, you were mostly right ;-)
2015-02-27 19:56:41 +00:00
Alex Bramley 0216e0406e Update client for new state tracking code. 2015-01-02 12:58:50 +00:00