James McGuire
2e296dc623
Add logic for verifying PONGS from server
2017-05-30 14:51:25 -07:00
John Soros
f0ae9bb509
handlers: check array bounds before indexing
2015-12-02 21:51:44 +01:00
Alex Bramley
0216e0406e
Update client for new state tracking code.
2015-01-02 12:58:50 +00:00
Andrew Brampton
d7116e2bd0
Also add time to the Connected event.
2014-11-30 16:00:21 -08:00
Alex Bramley
144001d109
Split handlers up into three groups.
2013-09-28 00:15:54 +01:00
Chris Rhodes
d1bf2c3a68
Use constants for named messages.
2013-03-07 17:33:56 -08:00
Alex Bramley
4cd3831e92
Remove Commands from core goirc.
...
This dictates too much about how people might want to parse and act upon
information from PRIVMSGs, and thus should be an optional thing.
2013-02-27 20:23:24 +00:00
Chris Rhodes
74dea68158
Moved QUIT and VERSION messages into the config.
2013-02-17 22:28:22 -08:00
Alex Bramley
a323372a0b
First steps towards client interface.
...
- Move all exported vars to Config struct;
- Plumbing for Config.Me etc;
- Constants and INIT/REGISTER handler from github.com/iopred;
2013-02-18 01:36:17 +00:00
Alex Bramley
b1242aa351
Break out tweakable things into a Config struct.
2013-02-16 18:05:56 +00:00
Alex Bramley
45d7b3317f
Remove state.StateTracker stutter, hide it in Conn.
2013-02-16 11:29:56 +00:00
Alex Bramley
f27e56c8b0
Run gofmt, since it's clearly been a while.
2013-02-16 10:33:15 +00:00
Alex Bramley
a674267128
Re-work Handlers for IRC events; add Commands.
2013-02-16 00:17:31 +00:00
Alex Bramley
b39e4717af
Allow renicking to be customised. ( Closes #14 )
2013-01-06 21:01:55 +00:00
Alex Bramley
907560b599
Migrate to split event pkg.
2011-11-13 14:07:19 +00:00
Alex Bramley
3feaa7f302
Use a static map of event handlers for internal handlers too.
2011-11-07 13:44:03 +00:00
Alex Bramley
aa75e0e0c6
Make enabling/disabling state-tracking easier. Improve constructors.
2011-11-07 13:34:13 +00:00
Alex Bramley
2bc8238f8e
Move state-related handlers to their own file for clarity.
2011-11-06 05:11:49 +00:00
Alex Bramley
85097043cf
Epic final commit for nick/chan/logging/testing refactor.
...
* Brings logging changes to client library.
* Brings state tracker to client library.
* Rewrites all tests to use mock logger and mock state tracker.
* Makes state tracking optional, finally.
* Shaves yaks until they are almost completely bald.
2011-11-06 04:56:46 +00:00
Alex Bramley
3e1b2c0f81
Turns out gofmt isn't big on spaces sometimes.
2011-09-29 22:58:04 +01:00
Alex Bramley
de66051d07
Convert conn.Err into logging.
...
Also, remove all error-side-effect testing cos it was a bit shit.
First step on the long road to refactoring the nick/chan state tracking
and making everything more testable and mockable with interfaces.
2011-09-29 22:54:54 +01:00
Alex Bramley
b0e0be0fe3
Check all nicks against current channel contents for 353 handler.
2011-09-12 23:21:15 +01:00
Alex Bramley
8ae5fe3b75
Another minor indexing bug :-/
2011-09-09 23:04:12 +01:00
Alex Bramley
d15d1074f5
Fix bug found by MODE handler test.
2011-09-09 22:33:08 +01:00
Alex Bramley
788c69aaa8
Fix same logic bug in KICK handler.
2011-08-30 23:08:10 +01:00
Alex Bramley
d74fd18d3d
Fixed logic bug, but it's a bit ugly :-/
2011-08-24 14:39:27 +01:00
Alex Bramley
b32e8d050f
Gofix for r59.
2011-08-03 08:04:01 +01:00
Alex Bramley
2efe298c75
Make IRCHandler the function type, make NewHandler the factory.
2011-07-30 19:42:10 +01:00
Alex Bramley
1849d886d4
Revert "Merge branch 'master' into release"
...
This reverts commit 2528d13314
, reversing
changes made to f0a9246c7a
.
2011-07-29 23:14:21 +01:00
Alex Bramley
47d4587ca3
Revert "Weekly commits shouldn't be on release branch"
...
This reverts commit 934ee04fcf
.
2011-07-28 12:14:51 +01:00
Alex Bramley
8fed417dce
Oh wait event isn't local.
2011-07-28 00:41:47 +01:00
Alex Bramley
303d3724e2
Break out unboxing code; pass conn/line objects for other events.
2011-07-28 00:24:07 +01:00
Alex Bramley
8e6de2f3c7
Add an overridable Dispatcher to Conn, and use that to dispatch events.
2011-07-27 21:40:56 +01:00
Alex Bramley
33a5bff35b
Move line parsing done in dispatchEvent into ParseLine().
2011-07-27 21:10:37 +01:00
Alex Bramley
5e814babc7
Move to using the new event registry internally.
2011-07-27 21:10:01 +01:00
Alex Bramley
934ee04fcf
Weekly commits shouldn't be on release branch
2011-07-26 20:25:14 +01:00
Alex Bramley
d2cfe6eb6f
Tidy up old-style slice syntax, and use string methods for CTCP parsing.
2011-07-25 23:02:57 +01:00
Alex Bramley
65ae4394fc
Update for weekly of 2011-07-16; changes to string.Split().
2011-07-25 22:27:52 +01:00
Alex Bramley
6634869fe6
Use connected bool properly to ensure shutdown() can't be called twice.
2011-07-22 01:17:35 +01:00
Alex Bramley
08b7d63c27
Refactor to remove line.Text and use line.Args[-1] instead.
2010-11-23 22:07:21 +00:00
Alex Bramley
bedbfc2899
Move irc/ to client/ and set up for goinstall.
2010-11-21 19:53:14 +00:00