Commit Graph

260 Commits

Author SHA1 Message Date
Chance Zibolski
06fee2df7d disconnect: Clear callbacks before closing channels 2014-07-14 17:05:27 -07:00
Chance Zibolski
846881130f Remove pread 2014-07-14 17:05:06 -07:00
Chance Zibolski
30980fcbad Retrieve error chan from method.
This allows using the error chan in an interface.

Also moved the disconnect error into a named variable for checking specific
errors.
2014-07-14 16:02:09 -07:00
Thomas Jager
a4ab35198c Merge pull request #33 from lucron/master
Fix for reconnect and connection errors
2014-06-24 10:08:50 +02:00
soda
9328e32771 removed irc.Disconnect() comment 2014-06-21 17:21:15 +02:00
soda
2a60a33ae9 removed debug-printfs 2014-06-21 16:53:24 +02:00
soda
32cee7464f fix reconnect, make irc.end 2014-06-21 16:46:47 +02:00
soda
809b9be4e4 fixing reconnect 2014-06-21 16:30:15 +02:00
Thomas Jager
b73cc42bde Remove Disconnect() from Quit(). Use ERROR feedback from server instead. 2014-06-18 15:59:07 +02:00
Thomas Jager
14db1acfd0 Add default callback for ERROR 2014-06-18 15:58:18 +02:00
Thomas Jager
9909b5a3d3 Modified test 1 2014-06-18 15:56:42 +02:00
Thomas Jager
da2e16496d Merge pull request #31 from scrapbird/master
Fixed a bug in irc_callback.go on line 163 where a Message is treated as...
2014-05-12 07:26:43 +02:00
Brenton Morris
96de31cab4 Fixed a bug in irc_callback.go on line 163 where a Message is treated as an expression istead of a function 2014-05-12 15:27:02 +12:00
Thomas Jager
2e87f54e96 Merge pull request #29 from alsm/master
Close channel to signal goroutines to quit and waitgroup to confirm that...
2014-05-03 00:32:17 +02: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
Thomas Jager
50d8ba24ee Merge pull request #28 from hobbeswalsh/master
Adding support for CTCP ACTION
2014-04-25 08:19:03 +02:00
Robin Walsh
31b6883175 Adding support for CTCP ACTION 2014-04-24 21:56:30 -07:00
Thomas Jager
accfd72b17 Merge pull request #27 from tpltnt/master
sanity checks IRC() and Connect()
2014-02-16 14:23:08 +01:00
tpltnt
f073b9b25c style fixes 2014-02-16 14:20:13 +01:00
tpltnt
6e0280dae6 port range checking added 2014-02-16 11:41:38 +01:00
tpltnt
48983c2abf refactoring: hasConnectionValues() integrated into Connection() + more detailed errors 2014-02-16 02:01:53 +01:00
tpltnt
4dcf7d03c5 hasValidValues() -> has ConnectionValues() 2014-02-16 01:10:08 +01:00
tpltnt
4ba3d1c0d2 more hasValidValues() 2014-02-16 00:56:21 +01:00
tpltnt
28bf282924 hasValidValues() + tests started 2014-02-16 00:32:02 +01:00
tpltnt
a4d40a90d5 catching empty arguments in IRC() + tests 2014-02-15 23:42:54 +01:00
Thomas Jager
ceacb7cda1 Merge pull request #26 from tpltnt/more-docs
More docs
2014-02-14 18:15:14 +01:00
tpltnt
124f756eb4 (ocd) markup fix 2014-02-14 17:56:19 +01:00
tpltnt
499007f2d7 wording fix 2014-02-14 17:10:06 +01:00
tpltnt
8dfda9ca4f event code clarification 2014-02-14 16:41:58 +01:00
tpltnt
735d2f0040 more doc on callback management 2014-02-14 16:30:09 +01:00
tpltnt
7c96d05d11 CTCP spec linked 2014-02-14 16:13:17 +01:00
tpltnt
4a8fffa828 some doc on callback management 2014-02-14 16:12:16 +01:00
tpltnt
eef65b116e some doc on structs 2014-02-14 15:40:25 +01:00
tpltnt
5baf7671c6 IRC RFCs added 2014-02-14 15:03:52 +01:00
tpltnt
c000e87dee docs done 2014-02-14 14:51:57 +01:00
tpltnt
7f0d4b4a6d method doc started 2014-02-14 14:29:56 +01:00
tpltnt
d55c9c19ab package description added 2014-02-14 12:06:09 +01:00
Thomas Jager
32f96cb2c8 Merge pull request #25 from darkliquid/extra-commands
Added Whois, Who and Mode (also go fmt)
2014-02-13 23:24:14 +01:00
Andrew Montgomery-Hurrell
9100ba0734 Added Whois, Who and Mode (also go fmt) 2014-02-13 21:49:28 +00:00
Thomas Jager
95288a16c5 Fix Formats and Send error to main goroutine on Disconnect 2014-02-12 08:42:10 +01:00
Thomas Jager
9bdf790e25 Fix formats 2014-02-12 08:41:22 +01:00
Thomas Jager
84a0cb60ed Fix test cases. Added sleep before Quit 2014-02-12 08:40:30 +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
bf01c6c9e2 Added ClearCallback method for clearing all callbacks for an event 2014-02-11 23:57:08 +00: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
Thomas Jager
defd1e2189 Update Readme 2014-02-12 00:05:20 +01: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
Kaleb Elwert
e08cb2faf7 Makes the lib line up more with the irc rfc in message vs args handling 2014-02-12 00:02:50 +01:00
Andrew Montgomery-Hurrell
33d8019793 Added ability to get the index of a callback in the callback registry. Ability to process events against a 'wildcard' handler 2014-02-11 21:44:29 +00:00
Thomas Jager
33a06eb72b Merge pull request #22 from darkliquid/public-log
Make IRC logger public. No reason for disallowing overrides.
2014-02-10 21:39:55 +01:00