Commit Graph

327 Commits

Author SHA1 Message Date
Shivaram Lingamneni d5eade5494 force trailing zeroes in timestamp wire format
According to jwheare, ISO 8601 doesn't specify the behavior one way
or the other, and the server-time spec is also ambiguous, but this
is safest.
2018-12-30 18:17:24 -05:00
Shivaram Lingamneni 2c7c8fbaf9 history replay enhancements 2018-12-28 13:45:55 -05:00
Shivaram Lingamneni b6b4d365bc fix #313 2018-12-23 13:30:25 -05:00
Shivaram Lingamneni a0bf548fc5 draft/resume-0.2 implementation, message history support 2018-11-26 05:23:27 -05:00
Shivaram Lingamneni 10d4f77638 fix PROXY protocol support for IPv6
1. Handle PROXY lines with IPv6 addresses starting with ::
(similar to WEBIRC in issue #211)

2. Strip v6 mapping from v4 addresses when handling proxied IPs.
2018-09-03 00:38:32 -04:00
Shivaram Lingamneni a4546c418b fix miscounting in LUSERS 2018-08-08 17:56:12 -04:00
Shivaram Lingamneni 3c12fb6254 fix #283 (remove unnecessary log.Fatal)
The server should never crash during rehash, even if the config is invalid.
2018-08-06 10:08:58 -04:00
Shivaram Lingamneni 1383190249 refactor rehash to rely more on server.config 2018-07-16 03:46:40 -04:00
Daniel Oaks de7b679fc5
Merge pull request #247 from slingamn/vhosts.3
initial vhosts implementation, #183
2018-05-19 08:51:16 +10:00
Daniel Oaks 8227822d3e
Merge pull request #264 from slingamn/deps.1
reduce copying of output lines
2018-05-04 23:13:56 +10:00
Shivaram Lingamneni f6373f7a4d fix #262 2018-05-04 00:29:16 -04:00
Shivaram Lingamneni 3150f4e23b reduce copying of output lines 2018-05-01 05:23:40 -04:00
Shivaram Lingamneni ebfef1e848 add Semaphore and ServerSemaphores 2018-04-26 06:03:10 -04:00
Shivaram Lingamneni ef35c587fc remove redundant friends computation 2018-04-25 00:58:54 -04:00
Shivaram Lingamneni b97ae00fe3 refactor channel join and part 2018-04-25 00:58:54 -04:00
Shivaram Lingamneni 74fa58dda0 Merge remote-tracking branch 'origin/master' into vhosts.4 2018-04-23 21:46:12 -04:00
Shivaram Lingamneni cc9941cb07 review fixes, bug fixes 2018-04-23 02:38:35 -04:00
Shivaram Lingamneni fad2475c3f modes refactor, #255 2018-04-22 19:36:15 -04:00
Daniel Oaks 8f22d5ffd8
Merge pull request #236 from slingamn/socket_again.1
eliminate dedicated RunSocketWriter goroutine
2018-04-23 02:07:43 +10:00
Daniel Oaks 0aab3b44e9
Merge pull request #252 from slingamn/issue249
fix #249
2018-04-22 13:38:26 +10:00
moocow 744ad2ce0b Stats for LUSERS logic now seperated, fixed params in LUSERS 2018-04-20 22:48:15 +02:00
Shivaram Lingamneni 393070b7d9 fix #249 2018-04-20 14:21:07 -04:00
Shivaram Lingamneni 5e62cc4ebc initial vhosts implementation, #183 2018-04-19 03:00:56 -04:00
Daniel Oaks 22f9df388d Fix trailing hack 2018-04-16 02:28:25 +10:00
Shivaram Lingamneni 4778e7bcc7 fixes
* Placate `go vet`
* Reorder the `send` loop, clarify things a little
2018-04-15 01:21:32 -04:00
Shivaram Lingamneni b2f798cf03 eliminate dedicated RunSocketWriter goroutine 2018-04-13 16:13:43 -04:00
Shivaram Lingamneni 7cfa75a59e
Merge pull request #218 from slingamn/socketwriter.1
refactor irc.Socket
2018-03-28 13:26:03 -04:00
Shivaram Lingamneni 36018174b0 default fakelag to off, add explicit cooldown config 2018-03-28 13:18:08 -04:00
Shivaram Lingamneni 1bf5e2a7c8 implement fakelag (#189) 2018-03-22 11:04:21 -04:00
Shivaram Lingamneni d1f5c59eef fix #190 2018-03-17 23:26:07 -04:00
Shivaram Lingamneni 945dec9964 ensure the nick timeout mechanism is cleaned up on client quit 2018-02-28 17:29:18 -05:00
Shivaram Lingamneni be86684e96 implement #199 2018-02-26 22:48:52 -05:00
Shivaram Lingamneni b139386391 fix account tags 2018-02-11 06:31:23 -05:00
Shivaram Lingamneni ad73d68807 refactor account registration, add nick enforcement 2018-02-11 05:30:40 -05:00
Daniel Oaks e0fa97d344 Get labeled-reply working just fine 2018-02-06 00:21:08 +10:00
Daniel Oaks 3680a3fe9a Merge 2018-02-04 21:32:48 +10:00
Daniel Oaks 2419f69879 Move all errors into errors.go 2018-02-03 22:03:36 +10:00
Daniel Oaks 2ecec25d28 Misc refactoring 2018-02-03 21:15:07 +10:00
Daniel Oaks 3634d0601e Split modes into a subpackage (this is painful, but will force us to simplify and improve the API for interacting with modes) 2018-02-03 20:21:32 +10:00
Daniel Oaks 29266ce80f nickserv: Fix help display 2018-02-03 19:00:27 +10:00
Shivaram Lingamneni 2a7f055ef3 support unix domain sockets 2018-02-01 16:19:07 -05:00
Daniel Oaks 07fc902b21 Labeled-Response 2018-01-28 00:40:34 +10:00
Daniel Oaks ddd7f0dc99 Add 'are supported by this server' to translatable strings 2018-01-23 23:31:29 +10:00
Daniel Oaks 090095b2b9 Set default client language when creating them 2018-01-22 21:30:28 +10:00
Daniel Oaks 275227a461 Make like every client-facing string translatable 2018-01-22 21:26:01 +10:00
Daniel Oaks 0569b5cfaa RESUME: Fix a few bugs, play modestrings 'n' all 2018-01-22 20:55:20 +10:00
Daniel Oaks f8b39cfe61 Send fake channel joins on RESUME 2018-01-22 17:58:10 +10:00
Daniel Oaks 7760634efe Actually let the takeover work somewhat more properly 2018-01-22 17:57:38 +10:00
Daniel Oaks 0d5327de8a Fix some issues, add RPL_WHOISACCOUNT 2018-01-22 17:57:38 +10:00
Daniel Oaks ac99e82192 Fix build issues 2018-01-22 17:57:38 +10:00
Daniel Oaks d09f085b1a Add very initial RESUME cap and command 2018-01-22 17:57:38 +10:00
Daniel Oaks a7fdade41d Extend to include example translation stuff 2018-01-21 16:49:17 +10:00
Shivaram Lingamneni f5e7ec525d synchronize accesses to client.atime 2017-12-02 20:05:06 -05:00
Shivaram Lingamneni 52b0fb71e7 refactor ClientManager 2017-11-22 05:09:38 -05:00
Shivaram Lingamneni 9b74c47b74 rename some getters
Rename getters in conformance with the "Effective Go" styleguide recommendation:
https://golang.org/doc/effective_go.html#Getters
2017-11-03 02:36:55 -04:00
Shivaram Lingamneni 94cf438f51 remove channelJoinPartMutex 2017-10-30 05:21:47 -04:00
Daniel Oaks 384e6e1720 client: Fix crash from not having right line lengths computed 2017-10-29 05:04:32 +00:00
Daniel Oaks c6b6a25906 Merge remote-tracking branch 'slingmann/recovery' 2017-10-29 04:37:57 +00:00
Shivaram Lingamneni 6130e48a67 always log the panic trace 2017-10-26 05:15:55 -04:00
Shivaram Lingamneni 7b58bf76ef make error recovery configurable 2017-10-26 04:19:01 -04:00
Shivaram Lingamneni 80968d000f log panic traces via the usual logging mechanism 2017-10-25 13:22:02 -04:00
Shivaram Lingamneni 054f57e215 recover from client-caused panics 2017-10-23 19:08:32 -04:00
Shivaram Lingamneni fa83ccd82b refactor synchronization for Channel 2017-10-22 19:50:16 -04:00
Shivaram Lingamneni c026cc5ab6 review fixes
* move constant definitions
* always give the client at least quitTimeout to respond to ping,
  even if registerTimeout or quitTimeout are longer than idleTimeout
2017-10-15 22:37:36 -04:00
Daniel Oaks 8910dc59ee Fix KLINE quit/error message and corrects comment on Client.Quit 2017-10-16 10:48:05 +10:00
Shivaram Lingamneni e540fde816 refactor idle timeouts 2017-10-15 19:46:25 -04:00
Shivaram Lingamneni b86fc105cd eliminate destroyMutex 2017-10-15 19:46:25 -04:00
Shivaram Lingamneni 545e8d71db eliminate quitMutex 2017-10-15 19:46:25 -04:00
Daniel Oaks 90bb3f79d3 Merge remote-tracking branch 'slingamn/default_tweaks' 2017-10-11 07:44:36 +10:00
Shivaram Lingamneni d66470f1c4 review fix: rename various packages and objects 2017-10-09 17:38:06 -04:00
Shivaram Lingamneni a2ac4eeef9 refactor limits and throttling 2017-10-09 13:24:12 -04:00
Daniel Oaks d4a8984e63 Initial implementation of labeled-responses for WHOIS 2017-10-08 11:05:05 +10:00
Daniel Oaks 207c1074df Split utils out to a separate subpackage 2017-10-05 23:47:43 +10:00
Daniel Oaks 4aa52956e5 Split isupport to its' own subpackage 2017-10-05 23:39:57 +10:00
Shivaram Lingamneni 3877db2391 review fixes: rename MonitorManager methods 2017-10-04 02:59:59 -04:00
Shivaram Lingamneni 26686d7e86 refactor monitor and /oper implementations 2017-10-04 01:19:27 -04:00
Shivaram Lingamneni 23a66fa502 fix various data races, including 2 introduced by #139 2017-10-02 04:42:50 -04:00
Shivaram Lingamneni e66735619e tweak some defaults
* Lower ident timeout to 1.5 seconds, as discussed in #oragono
* Enforce connection limits at the granularity of ipv4 /32's and ipv6 /64's
* Raise the limit on number of new connections to 64 every 10 minutes
  (for the benefit of people behind large IPv4 NATs)
2017-10-02 00:01:29 -04:00
Daniel Oaks 275449e6cc caps: Move most capability-handling types into the caps package 2017-09-29 17:25:58 +10:00
Daniel Oaks cea6565b80 client: HasCapabs -> HasRoleCapabs to make it more clear exactly what this means 2017-09-29 12:11:06 +10:00
Daniel Oaks 9bfdc4fdfb Move caps to their own package to prevent conflicts 2017-09-29 12:07:52 +10:00
Daniel Oaks c39206ad13 Don't create new caps out of nowhere, dummy 2017-09-29 11:55:54 +10:00
Daniel Oaks cd8b4877b6 accounts: Check for account logins correctly, fixes registration. Also fix a typo, thanks squigz! 2017-09-28 15:49:01 +10:00
Shivaram Lingamneni 1612c141d5 send the actual quit message to friends 2017-09-25 22:47:03 -04:00
Daniel Oaks a78a8f1130 client: Only add friends if they actually have the caps we request. Friends() is entirely broken because of this 2017-09-26 08:36:34 +10:00
Daniel Oaks e95c75f87d monitor: Fix a crash around the MONITOR command 2017-09-25 11:29:27 +10:00
Shivaram Lingamneni 99f02ede20 restore PROXY protocol support
support for PROXY was removed in 43e28e2fef. After discussion,
it's worth keeping around in case of client compatibility issues,
and until /rehash support is more mature.
2017-09-25 10:52:01 +10:00
Daniel Oaks 23a26f83fe client: Show real IP and whether the target's using TLS in WHOIS 2017-06-23 05:15:10 +10:00
Daniel Oaks 1c0c4841a1 General comments, fix misspellings and lints 2017-06-19 14:53:16 -06:00
Daniel Oaks c9ed749538 Rename deps 2017-06-15 10:14:19 -06:00
Daniel Oaks a8fa131244 Move to new repo 2017-06-14 12:00:53 -06:00
Daniel Oaks 309ec8191e Add 'k' snomask for kills (including those coming from dlines and klines) 2017-06-11 10:01:39 -06:00
Daniel Oaks 3ee26041ff Send snomask on client quits 2017-06-11 09:42:37 -06:00
Daniel Oaks 55d8eb5dce Make 'nick' snomask look nicer 2017-06-10 17:07:44 -06:00
Daniel Oaks 53190ef131 Send a whole lot more snomasks 2017-05-28 12:43:09 -06:00
Daniel Oaks ebb9d629d7 xline: Add ANDKILL param to kill all matching clients 2017-05-24 00:58:36 -06:00
Daniel Oaks d847d55c06 Fix wordWrap function so it doesn't drop chars, and fix client.Notice() to automagically split very long lines. 2017-05-09 21:09:44 +10:00
Daniel Oaks 9fe7c143c8 server: Remove useless comments, make idle/quit function layouts nicer 2017-05-09 20:37:48 +10:00
Daniel Oaks c911ff2bcd Squash a bunch of possible races 2017-04-18 22:26:01 +10:00
Daniel Oaks f7a4f5d956 socket: Move to a timing-out send method that reduces goroutines and ensures QUIT/ERROR are sent 2017-04-18 20:29:00 +10:00