Commit Graph

54 Commits

Author SHA1 Message Date
Qais Patankar
d5dbd683d9
Merge branch 'master' into feature/webirc 2017-12-24 19:08:02 +00:00
James Mills
656226dc22
Add realname support. Guard against race conditions on Disconnect 2017-11-12 18:53:49 -08:00
Thomas Jager
ef65ae61a3 Merge pull request #94 from irccloud/ircv3-tags
IRCv3 capability negotiation and tag parsing
2017-10-13 19:30:29 +02:00
Stanislav N. aka pztrn
5a0a900995 Pings are also wrapped with own sync.Mutex. 2017-10-03 02:19:13 +05:00
Stanislav N. aka pztrn
e39cceace6 Added eventsMutex and wrap all events calls with it.
Due to some "golangish" code this library have possibility to
run into data race when application is working with callbacks.
This commit adds eventsMutex (which is a sync.Mutex), removed
all "golangish" ifs-map reads, and wrap events map read with
sync.Mutex to avoid data races.
2017-10-03 02:03:43 +05:00
Qais Patankar
c359ee2670 Add WebIRC field 2017-08-18 16:56:08 +01:00
Russ Garrett
744f1e3a7a
IRCv3 Capability Negotiation
This adds the ability to negotiate arbitrary IRCv3 capabilities on
connection. Capabilities to be requested can be set in `irc.RequestCaps`,
and after registration the negotiated capabilities can be seen in
`irc.AcknowledgedCaps`.
2017-01-25 17:36:15 +00:00
Russ Garrett
e1d00ae799
Add support for parsing IRCv3 tags in received messages 2017-01-25 15:39:59 +00:00
Thomas Jager
582bf80992 Changed the way Quit/Disconnect works to avoid possible DATA races.
Rewrote tests to be less spammy. Created REconnection test.
2016-07-27 22:55:55 +02:00
Wim
8401b5855f Add SASL (PLAIN) support 2016-07-22 22:38:18 +02:00
Thomas Jager
da78ed515c BREAKING CHANGES: Run callbacks in main thread and int callback id.
Execute callbacks in main thread. This will break callbacks that
use a long time to execute. Create your own thread in AddCallback
using gorutines on long running callbacks.

Use deterministic IDs for AddCallback. Changes the id from SHA-hash
to int.
2016-02-06 21:38:53 +01:00
peted
5a16c2581e revert some changes but also update err chan for new connection so further errors are received in Loop 2015-11-14 23:51:15 +10:00
peted
937f84605b fix reconnection logic 2015-11-14 23:10:39 +10:00
Luke Evers
f0c83dc012 Add support for specifying a quit message. 2015-10-28 08:58:41 -04:00
Thomas Jager
8b3e6a50ac Fix ident 2015-07-31 08:29:20 +02:00
Keno Schwalb
4e1ebe0162 minor adjustments for multiple connections 2014-11-03 15:21:48 +00:00
Wesley Dawson
30608bd31c Use tls.DialWithDialer instead of tls.Client and remove irc.netsock 2014-08-13 18:35:37 -07:00
Chance Zibolski
846881130f Remove pread 2014-07-14 17:05:06 -07:00
alsm
f27b0b53e2 Close channel to signal goroutines to quit and waitgroup to confirm that they have 2014-05-02 23:20:51 +01:00
tpltnt
499007f2d7 wording fix 2014-02-14 17:10:06 +01:00
tpltnt
eef65b116e some doc on structs 2014-02-14 15:40:25 +01:00
Thomas Jager
bbbdd715fa Merge pull request #24 from darkliquid/callback-tweaks
Looks good to me. The id generating code may need some tweaking but should work fine as is :)
2014-02-12 08:17:43 +01:00
Andrew Montgomery-Hurrell
6edb7ec06e Added unique id to callbacks so they can be referenced. Since Go doens't actually provide unique function pointers, we use the closest we can get by grabbing the pointer for the function and slapping a random int on the end. Does it guarantee there will never be a collision? No, but it makes it's pretty damn unlikely that you'll get one during the lifetime of an app unless you are generating millions and millions of callbacks and never, ever deleting them, in which case you probably have something else to worry about 2014-02-11 23:35:13 +00:00
Kaleb Elwert
ea57336e8f Replaces the Event.Message field with a function
Note that this purposefully breaks backwords compatibility. Because of
how Arguments are now handled, this will force users using this library
to update anything using this.

This is not bad, as it seems, because otherwise (just updating the
Event.Arguments to include the Message) the change could cause silent,
strange breakages.
2014-02-12 00:02:58 +01:00
Andrew Montgomery-Hurrell
847ce8faa2 Make IRC logger public. No reason for disallowing overrides. 2014-02-10 19:56:16 +00:00
Andrew Montgomery-Hurrell
0b6c954b52 try to shutdown more safely so callbacks, etc don't try and use the read/write channels after they are closed 2014-02-10 19:54:07 +00:00
Andrew Montgomery-Hurrell
c0e6d50e0c Added configurable timeouts and overridable version string 2014-02-09 10:20:58 +00:00
joe
c10849b4c0 Loop: catch reconnection errors; writeLoop: only log.Print if Debug 2013-09-25 23:37:11 -04:00
Philipp Schroer
655a41f804 Some improvements
* Remove unused struct elements
 * Rename some things
 * Reuse more code
 * Use 512 byte read buffer
2013-04-02 19:09:45 +02:00
Thomas Jager
0bc57f9d68 Formatting 2013-03-13 12:54:00 +01:00
Thomas Jager
9e880ef476 SSL -> TLS 2012-11-07 21:55:33 +01:00
Thomas Jager
c8f78ebf45 Change the way the pinger works.
Fix syning threads before reconnections
Formatting
2012-11-07 21:51:24 +01:00
Thomas Jager
e05c098519 Merge changes from other fork 2012-11-06 00:39:31 +01:00
Thomas Jager
be3afcc796 Merge branch 'master' of git://github.com/lye/cleanirc
Conflicts:
	irc.go
	irc_callback.go
	irc_struct.go

Merge Interesting changes from fork
2012-11-06 00:38:20 +01:00
Thomas Jager
a5f3a91fd1 go get not working quite as i thought 2012-11-05 23:46:47 +01:00
Thomas Jager
ddf0508cdb Cleanup old files 2012-11-05 23:41:04 +01:00
Reynir Reynisson
670fd99fb4 Rename IRC{Connection,Event} -> {Connection,Event}
I don't feel it's necessary to tag the types with IRC, as a client would
tag it with the module name anyway. Example:

    var conn irc.IRCConnection
    // ...

vs.

    var conn irc.Connection
    // ...
2012-05-11 13:35:25 +02:00
lye
4f82a31c9c Minor tweaks to play nicely with the new go tool 2012-03-28 01:15:26 -05:00
lye
5fe3fea8c0 Hurrah, starting a real fork.
The old codebase is too messy for my taste and doesn't provide a clean
enough API. I don't like the name either, so I'm also rebranding it. I
don't care.
2012-03-21 22:38:22 -05:00
lye
07b619e8f2 Temporarily use my tls fixes until they're merged 2012-03-20 23:08:05 -05:00
lye
52c17040d5 Make the SSL config app-configurable 2012-03-18 17:08:05 -05:00
Michael Jard
a0256382be Fixes against weekly.2012-02-22
Convert time/duration variables
Clean up duration math
2012-02-25 00:52:19 -08:00
tj
4e661a3954 Gofix 2011-11-07 01:26:12 +01:00
Michael Jard
78a4c71736 Add ability to silence callback handler 2011-05-21 21:06:22 -07:00
tj
ea8495857e Better nick recapture 2011-02-03 01:16:13 +01:00
tj
79ac1741ea Add irccon.Quit() and irccon.Cycle()
Quit() Sends QUIT to server and exits the main loop.
Cycle() Sends QUIT to server and reconnects.
2010-10-18 21:46:34 +02:00
tj
9fa6bbdeca Avoid changing interface for password support 2010-09-29 09:52:43 +02:00
tj
c64043c75b Merge 2010-09-29 09:00:16 +02:00
tj
998e1c3050 Add support for server PASSWORD 2010-09-29 08:58:32 +02:00
tj
1165a7fbf2 Fix compile + bit more robust reconnect code 2010-09-23 18:54:34 +02:00