Commit Graph

272 Commits

Author SHA1 Message Date
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
Daniel Oaks f665ebac16 channels: Help prevent issues when join/parting 2017-04-18 17:19:44 +10:00
Daniel Oaks 1c917a19a7 client: Ensure ERROR message is parsed when quitting 2017-04-17 23:05:47 +10:00
Daniel Oaks 22216d4d60 Fix lots of nits 2017-04-16 11:31:33 +10:00
Daniel Oaks 317a804644 Fix dates at top of source files 2017-03-27 22:15:02 +10:00
Daniel Oaks 300d02bd9c channel: Kill a race condition that locked up the server.
Specifically, if you joined a channel while someone else was trying to part. the Join method would grab the lock, the Quit method would queue to grab the lock, the Join method would unlock and then try to regrab the lock, and it would get into a situation where nobody would have the lock and everyone would be waiting for it.

This caused weird oddities with clients.
2017-03-26 22:11:09 +10:00
Daniel Oaks aad1070633 client: Unlock channel mutex earlier 2017-03-24 21:54:06 +10:00
Daniel Oaks 6842d2ead6 Merge master 2017-03-24 12:29:13 +10:00
Daniel Oaks 05074e966d modes: Continue overhauling 2017-03-24 12:23:21 +10:00
Daniel Oaks f29a5f0e70 socket: Very initial SendQ limit 2017-03-14 08:12:39 +10:00
Daniel Oaks de4db1c6ef socket: Start overhaul of sockets and writing 2017-03-13 23:53:21 +10:00
Daniel Oaks 439331cfb8 logger: Move to separate package, make *much* nicer 2017-03-10 22:02:08 +10:00
Daniel Oaks 5de03f2169 logging: Reverse arrows for in and out, in ~= left, out ~= right 2017-03-06 22:12:27 +10:00
Daniel Oaks b328a4fcd3 logging: Add userinput and output, fix up lots 2017-03-06 22:11:10 +10:00
Daniel Oaks 29e89b16a0 logger: Very initial working new logs 2017-03-06 15:50:23 +10:00
vegax87 b3a54cbb2c Merge branch 'master' of https://github.com/DanielOaks/oragono 2017-02-09 12:23:10 +01:00
Martin Lindhe 730d283201 server-time: convert local time to UTC before using it, fixes #94 2017-02-07 01:37:32 +01:00
vegax87 a623d8ef1e Solved! RPL_USERHOST must use trailing 2017-01-23 21:20:42 +01:00
Daniel Oaks c8b5fb65e0 WHOIS: Use inbuilt functionality to force trailing, as suggested by @vegax87 2017-01-23 09:03:49 +10:00
Daniel Oaks c2fedfb177 client: Forego the ForceTrailing func, just automagically work it out based on the command name 2017-01-22 10:43:02 +10:00
Daniel Oaks b257c5955e client: Add SendForceTrailing function, to force the last param to be a trailing 2017-01-20 23:51:36 +10:00
Daniel Oaks 67d65b0e3d client: Ignore empty lines, send ERROR with no prefix 2017-01-19 07:56:33 +10:00
Daniel Oaks cbe49ff3d8 Use a better line-splitting algorithm 2017-01-18 08:05:31 +10:00
Daniel Oaks 522001d4f6 Cleanup message sending 2017-01-18 07:27:06 +10:00
Daniel Oaks e741c1476b Implement message-ids draft 2017-01-18 07:26:41 +10:00
Daniel Oaks f6185fa336 Get it working, using not-great and very initial splitting code 2017-01-18 07:26:05 +10:00
Daniel Oaks 92626a178d server: Start roughly hacking in new message-tags support 2017-01-18 07:26:05 +10:00
Daniel Oaks d2e18962e3 Very initial maxline work 2017-01-18 07:26:05 +10:00
Daniel Oaks 2b240faa90 strings: Fix nick bugs, use UsernameCaseMapped 2017-01-14 02:32:15 +10:00
Daniel Oaks 4168eaafbb Basic implementation of KLINEs 2017-01-11 22:38:16 +10:00
Daniel Oaks 6f7c683247 channel: RWMutex for members access 2017-01-11 02:09:08 +10:00
Daniel Oaks a8eabe8e9c client: Fix a lot of bugs around setting NICK 2016-11-29 22:33:10 +10:00
Daniel Oaks dc605ebb01 client: Send quit messages more correctly 2016-11-29 21:06:01 +10:00
Daniel Oaks 2e2e91689a client: Send quit message to friends correctly 2016-11-29 19:28:22 +10:00
Daniel Oaks 9a9820fa88 NICK: Prevent races, remove a DoS 2016-11-16 12:02:22 +10:00
Daniel Oaks 95e36b99a2 Nick locking (entirely broken, needs to be completely redesigned) 2016-11-16 03:05:33 +10:00
Daniel Oaks c3174bb648 Various crash fixes, and little cleanups for safety 2016-11-04 21:38:47 +10:00
Daniel Oaks 07e4728c15 roleplay: Initial commit 2016-11-01 23:56:25 +10:00
Daniel Oaks c7fdb4656e strings: Use inbuilt precis.Nickname encoding now 2016-10-27 00:44:36 +10:00
Daniel Oaks a404bf83d1 Add automated client connection limiting 2016-10-23 23:05:00 +10:00
Daniel Oaks a7949b6cb4 irc: Assorted golint cleanups 2016-10-23 11:48:57 +10:00
Daniel Oaks 29e811a531 oper: Support custom vhosts, and chghost 2016-10-23 11:28:31 +10:00
Daniel Oaks 8e2a8cb1b3 opers: Enforce oper class permissions 2016-10-23 11:13:08 +10:00
Daniel Oaks f3459830e7 opers: Allow setting custom whois lines 2016-10-23 11:01:05 +10:00
Daniel Oaks 64bdedaee2 Add oper classes, for more finely-grained control 2016-10-23 10:47:11 +10:00
Daniel Oaks 425a521d27 channel: Fix MODE and WHO 2016-10-16 21:28:59 +10:00
Daniel Oaks 1e956355bf NICK: Fix small bug when casefolding 2016-10-16 20:35:50 +10:00
Daniel Oaks 1bab81091f Add MONITOR command 2016-10-16 20:14:56 +10:00
Daniel Oaks e643c2101f capability: Add 3.2 CAP values 2016-10-16 13:54:09 +10:00
Daniel Oaks 43e28e2fef PROXY: Remove command, I don't think it's that useful 2016-10-15 16:29:34 +10:00
Daniel Oaks 0eebd6273c AWAY: Only dispatch AWAY when cap-notify is used 2016-10-13 18:08:08 +10:00
Daniel Oaks 985f87d9d1 client: Remove silly testing Println 2016-10-13 16:21:19 +10:00
Daniel Oaks 5e72409695 Move from ascii(ish) unicode encoding to prelim rfc7700 using functions instead 2016-10-11 23:51:46 +10:00
Daniel Oaks 2bfcc553ce client: Don't fail silently on error sending messages 2016-09-19 23:00:19 +10:00
Daniel Oaks 5d7d510348 client: Fix minor bug when doing SASL before NICK/USER 2016-09-19 22:30:29 +10:00
Daniel Oaks 754b74c21c accounts: Add account-tag capability 2016-09-12 11:25:31 +10:00