Shivaram Lingamneni
6ded2ea466
fix #483
2019-05-13 00:43:29 -04:00
Shivaram Lingamneni
353aeb0389
normalize most times in the app to UTC
...
Fixes #480
2019-05-12 20:57:53 -04:00
Shivaram Lingamneni
b8ca8ec852
fix #463
2019-05-12 04:50:43 -04:00
Shivaram Lingamneni
5331afbdd4
Merge remote-tracking branch 'origin/master' into compat.4
2019-05-11 21:56:41 -04:00
Shivaram Lingamneni
c193def606
fix some issues found with staticcheck.io
2019-05-10 01:44:14 -04:00
Shivaram Lingamneni
08ebfb1676
fix redundant JOIN line
2019-05-09 03:57:02 -04:00
Shivaram Lingamneni
b11bf503e7
improvements to message replay code
2019-05-08 03:02:48 -04:00
Shivaram Lingamneni
74afeaed55
tweaks to NAMES / WHO privacy
2019-04-28 21:20:18 -04:00
Shivaram Lingamneni
51465b4a3a
strip out the +a away mode
2019-04-28 15:12:48 -04:00
Shivaram Lingamneni
d6c970f521
names should respect invisibility
2019-04-28 02:48:19 -04:00
Shivaram Lingamneni
30f6e11698
fix #400
...
Also fix some issues with STATUSMSG
2019-04-28 02:48:19 -04:00
Daniel Oaks
ab4f186673
Merge pull request #458 from slingamn/multisocket.11
...
minimum viable product for bouncer
2019-04-28 01:22:36 +10:00
Shivaram Lingamneni
97e71dfef7
extract Semaphore to utils package
2019-04-15 11:15:31 -04:00
Shivaram Lingamneni
c2faeed4b5
initial implementation of bouncer functionality
2019-04-14 20:48:50 -04:00
Daniel Oaks
8c7027c604
Merge pull request #446 from slingamn/chanregrefactor.6
...
refactor channel registration
2019-04-04 21:59:25 +10:00
Shivaram Lingamneni
18a8b075ea
fix #425 and #395
2019-03-19 04:40:48 -04:00
Shivaram Lingamneni
63029e2ff5
refactor channel registration
2019-03-12 04:16:16 -04:00
Shivaram Lingamneni
85493ef031
upgrade message-tags to non-draft version
2019-03-07 04:31:08 -05:00
Daniel Oaks
6d109e92a5
Fix dodgy TL strings to make them easier to translate
2019-02-22 12:37:11 +10:00
Daniel Oaks
09909e3b3d
Merge pull request #396 from slingamn/issue394
...
fix #394
2019-02-18 10:24:35 +10:00
Daniel Oaks
7cf8aaccf6
Merge pull request #352 from slingamn/chanreglimit.1
...
track channel registrations per account
2019-02-18 07:08:57 +10:00
Shivaram Lingamneni
a5b9634783
fix #394
2019-02-17 14:29:04 -05:00
Shivaram Lingamneni
344a1d7e48
fix #392
2019-02-17 06:51:48 -05:00
Daniel Oaks
a273ef624c
Merge pull request #377 from slingamn/kickfail
...
fix another three bugs that were reported today
2019-02-14 07:23:56 +10:00
Shivaram Lingamneni
b7ec121c19
fix some KICK issues
...
reported by bogdomania
1. KICK without privileges incorrectly returned ERR_CANNOTSENDTOCHAN
2. Halfops should be able to kick voice and unprivileged, but not other halfops
2019-02-13 14:38:10 -05:00
Shivaram Lingamneni
4c7a5585db
fix #371
2019-02-13 13:22:00 -05:00
Shivaram Lingamneni
e4c9351254
fix: set the existing channels unregistered
2019-02-12 02:09:31 -05:00
Shivaram Lingamneni
20b8ba8cae
don't send the client its own on-join MODE line
...
Fixes #353 .
2019-02-06 13:50:45 -05:00
Shivaram Lingamneni
f6b3008f8f
add CHATHISTORY and HISTORY implementations
2019-02-04 05:33:36 -05:00
Shivaram Lingamneni
501bb1e5c5
replay JOIN/PART/QUIT/KICK as PRIVMSG from HistServ
...
see https://github.com/ircv3/ircv3-specifications/issues/293
2019-01-02 17:58:04 -05:00
Shivaram Lingamneni
3cd3601a30
refactor join/part
2019-01-02 09:55:45 -05:00
Shivaram Lingamneni
c2b2559ab4
avoid some uses of Sprintf for loglines
2019-01-02 09:55:45 -05:00
Shivaram Lingamneni
7c36ec3f9d
allow auto-ops (halfop and higher) to bypass channel join restrictions
2018-12-30 18:28:56 -05:00
Shivaram Lingamneni
b34bab16a7
ensure that identical PRIVMSG share a time tag
2018-12-30 18:17:24 -05:00
Shivaram Lingamneni
2c7c8fbaf9
history replay enhancements
2018-12-28 13:45:55 -05:00
Shivaram Lingamneni
f58c873f84
fix RPL_INVITING response to match modern ircdocs
2018-12-23 13:49:03 -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
a18283e2de
fix a crash when SAMODE'ing in a channel you're not joined to
2018-08-17 12:44:49 -04:00
Shivaram Lingamneni
1383190249
refactor rehash to rely more on server.config
2018-07-16 03:46:40 -04:00
Shivaram Lingamneni
31f386f5a9
add CHANSERV UNREGISTER
2018-06-04 05:02:22 -04:00
Daniel Oaks
7bf18443a8
Merge pull request #270 from slingamn/amode.1
...
frontend for persistent account modes in channels
2018-05-30 21:27:28 +10:00
Shivaram Lingamneni
495705f538
implement SAJOIN, allow channel founders to join unconditionally
2018-05-25 02:47:50 -04:00
Shivaram Lingamneni
1016f86f70
implement CHANSERV AMODE
2018-05-23 16:00:49 -04:00
Shivaram Lingamneni
6533893863
optimized implementation of Channel.Names()
2018-04-26 03:22:52 -04:00
Shivaram Lingamneni
b97ae00fe3
refactor channel join and part
2018-04-25 00:58:54 -04:00
Shivaram Lingamneni
abbbd2c899
review fix
2018-04-23 20:05:02 -04:00
Shivaram Lingamneni
fad2475c3f
modes refactor, #255
2018-04-22 19:36:15 -04:00
Shivaram Lingamneni
8fb5a38851
Updates to channel persistence
...
1. Implement persistent channel keys (#208 )
2. Persist changes to registered channel modes
3. Backend changes for persisting operator status (partial #198 )
2018-04-03 21:49:40 -04:00
Shivaram Lingamneni
ef99bc48d1
fix #204
...
Empty channels were only cleaned up on PART, not QUIT.
2018-03-01 11:10:46 -05:00
Shivaram Lingamneni
ad73d68807
refactor account registration, add nick enforcement
2018-02-11 05:30:40 -05:00
Daniel Oaks
a70cc6713c
(hopefully) fix labeled-response behaviour
2018-02-11 08:57:15 +10:00
Daniel Oaks
e0fa97d344
Get labeled-reply working just fine
2018-02-06 00:21:08 +10:00
Daniel Oaks
2419f69879
Move all errors into errors.go
2018-02-03 22:03:36 +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
275227a461
Make like every client-facing string translatable
2018-01-22 21:26:01 +10:00
Daniel Oaks
f8b39cfe61
Send fake channel joins on RESUME
2018-01-22 17:58:10 +10:00
Shivaram Lingamneni
52b0fb71e7
refactor ClientManager
2017-11-22 05:09:38 -05:00
Shivaram Lingamneni
d4cb15354f
remove registeredChannelsMutex
...
This moves channel registration to an eventual consistency model,
where the in-memory datastructures (Channel and ChannelManager)
are the exclusive source of truth, and updates to them get persisted
asynchronously to the DB.
2017-11-08 22:24:33 -05:00
Shivaram Lingamneni
60b861e07e
fix a race in regenerateMembersCache
...
The rationale for why regenerateMembersCache didn't need to hold the Lock()
throughout was subtly wrong. It is true that at least some attempt to
regenerate the cache would see *all* the updates. However, it was possible for
the value of `result` generated by that attempt to lose the race for the final
assignment `channel.membersCache = result`.
The fix is to serialize the attempts to regenerate the cache, without adding
any additional locking on the underlying `Channel` fields via
`Channel.stateMutex`. This ensures that the final read from `Channel.members`
is paired with the final write to `Channel.membersCache`.
2017-11-07 14:38:18 -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
Shivaram Lingamneni
fa83ccd82b
refactor synchronization for Channel
2017-10-22 19:50:16 -04:00
Daniel Oaks
b8d47c3e4f
channel: Server opers shouldn't override nooutside, reggedonly and moderated modes. if they want to do that sort of thing, they have SAMODE and all to be explicit about it
2017-10-01 15:18:52 +10:00
Daniel Oaks
e3a0387cf5
channel: Fix +m (moderated) and +R (registeredonly) channel modes, add note about opers overriding +m/+R
2017-10-01 15:14:32 +10:00
Daniel Oaks
275449e6cc
caps: Move most capability-handling types into the caps package
2017-09-29 17:25:58 +10:00
Daniel Oaks
9bfdc4fdfb
Move caps to their own package to prevent conflicts
2017-09-29 12:07:52 +10:00
Shivaram Lingamneni
e8b1870067
refactor the rehash implementation
2017-09-28 02:13:24 -04:00
Daniel Oaks
79de443496
channel: Don't send TOPIC on entirely new channel
2017-09-26 08:01:10 +10:00
Daniel Oaks
3b0d9c4db9
Send nick parameter correctly on ERR_NOSUCHNICK numerics
2017-09-26 07:52:43 +10:00
Shivaram Lingamneni
333afe1062
make default channel modes configurable
2017-09-06 17:37:29 -04:00
Daniel Oaks
c9ed749538
Rename deps
2017-06-15 10:14:19 -06:00
Daniel Oaks
9a94121281
JOIN: Fix a dumb bug. Really dumb bug.
2017-04-17 20:28:01 +10:00
Daniel Oaks
22216d4d60
Fix lots of nits
2017-04-16 11:31:33 +10:00
Daniel Oaks
0046025d60
Enable chanmode +r, fix bug with registering channels
2017-03-28 17:32:03 +10:00
Daniel Oaks
317a804644
Fix dates at top of source files
2017-03-27 22:15:02 +10:00
Daniel Oaks
013635a827
channel: Give founder mode if channel already exists and founder joins
2017-03-27 14:52:34 +10:00
Daniel Oaks
6aebd4aad9
channel: Add comments, fix a small bug with moderated mode
2017-03-27 14:29:51 +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
861b65eb39
channels: Automagically save channel bans/excepts/invites
2017-03-26 20:37:13 +10:00
Daniel Oaks
e34475d536
Merge branch 'master' into devel+chanserv
2017-03-24 21:25:37 +10:00
Daniel Oaks
f5eeca5339
channel: Fix not being able to Part
2017-03-24 21:24:51 +10:00
Daniel Oaks
194411716d
channel: Automagically save topic updates on registered channels
2017-03-24 13:49:29 +10:00
Daniel Oaks
580385392a
channel: Alert of given modes (+o/+q) on join
2017-03-24 12:38:07 +10:00
Daniel Oaks
05074e966d
modes: Continue overhauling
2017-03-24 12:23:21 +10:00
Daniel Oaks
b33b217fab
Add very initial ChanServ and NickServ virtual clients
...
As well, add channel registration and re-applying founder privs on the first client joining the channel. I'm going to re-architect our modes system to better acocunt for this sort of change.
2017-03-11 22:01:40 +10:00
Daniel Oaks
439331cfb8
logger: Move to separate package, make *much* nicer
2017-03-10 22:02:08 +10:00
Daniel Oaks
b328a4fcd3
logging: Add userinput and output, fix up lots
2017-03-06 22:11:10 +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
62dc3c8f66
server: Implement TAGMSG draft command
2017-01-18 07:26:05 +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
e9324c3250
modes: Fix some more mutexes
2017-01-11 12:26:58 +10:00
Daniel Oaks
c39bebc696
Fix various locks around joining, kicking and quitting
2017-01-11 12:16:51 +10:00
Daniel Oaks
6f7c683247
channel: RWMutex for members access
2017-01-11 02:09:08 +10:00
Daniel Oaks
8eb8193b18
JOIN: Only give chanop, not chan founder (will save that for regged chans)
2016-12-01 18:12:51 +10:00
Daniel Oaks
5eafd2656e
channel: Send channel NOTICEs properly
2016-11-29 21:41:26 +10:00
Daniel Oaks
a7949b6cb4
irc: Assorted golint cleanups
2016-10-23 11:48:57 +10:00
Daniel Oaks
517893065b
Support STATUSMSG
2016-10-23 00:45:51 +10:00
Daniel Oaks
d9db688963
Implement echo-message capability
2016-10-22 22:29:01 +10:00
Daniel Oaks
a8d910e233
capability: Add invite-notify
2016-10-16 14:14:55 +10:00
Daniel Oaks
2e3ffd2f23
caps: Add message-tags draft capability
2016-10-16 12:54:15 +10:00
Daniel Oaks
06028e0117
modes: Remove channel.Persist mode
...
It's broken anyways, and we'll be replacing it with our custom channel ownership stuff later.
2016-10-14 21:04:04 +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
ae69ef5cd6
db: Remove SQLite db, hopefully looking up clients still works.Channel persistence is broken by this, will fix it later.
2016-09-17 21:23:04 +10:00
Daniel Oaks
0087de6092
client: Add AWAYLEN
2016-09-12 12:40:09 +10:00
Daniel Oaks
79d831bbb7
channel: Add KICKLEN and TOPICLEN
2016-09-12 12:22:50 +10:00
Daniel Oaks
754b74c21c
accounts: Add account-tag capability
2016-09-12 11:25:31 +10:00
Daniel Oaks
5269dc8776
accounts: Very roughly introduce account type
2016-09-05 22:35:13 +10:00
Daniel Oaks
6e66c5c8a7
channel: Prevent duping error code in channel.Persist -- from jlatt/ergonomadic#39 <3
2016-08-14 13:34:24 +10:00
Daniel Oaks
e33a810522
capability: Add extended-join and userhost-in-names
2016-08-14 11:59:33 +10:00
Daniel Oaks
bded3202c2
channels: send RPL_CHANNELCREATED and RPL_TOPICTIME
2016-06-26 21:06:28 +10:00
Daniel Oaks
e19c1527a4
modes: Fix modes, re-add channel modes
2016-06-22 21:35:26 +10:00
Daniel Oaks
9e7a590f23
server: Fix
2016-06-19 21:59:18 +10:00
Daniel Oaks
2a519c8061
use server.name and server.nameString, name for checking and getting nice comparison, nameString for reply outputs
2016-06-19 15:43:16 +10:00
Daniel Oaks
7fcc6bdbc4
channels: Fix
2016-06-19 14:55:24 +10:00
Daniel Oaks
2f08401a0f
Attempt to add mostly-correct license info at the top of each file... track this stuff a bit better
2016-06-15 21:50:56 +10:00
Daniel Oaks
cd7d30a997
Set default channel modes to +nt
2016-04-21 19:29:50 +10:00
Daniel Oaks
8b79662f1a
modes: use secret instead of private, it's the standard these days. fix secret channel hiding in whois
2016-04-14 22:33:38 +10:00
Daniel Oaks
3972fc49ed
privileges: Add founder/admin/halfop (qah), remove owner (O)
...
channel owner is from 2812 and unused in the real world
2016-04-14 09:36:02 +10:00
John Soros
65539a593b
this is related to https://github.com/fluffle/goirc/pull/71 : common irc server behaviour is to reply with an empty +
2016-02-20 22:19:32 -08:00
Jeremy Latt
63a46498ce
reuse replies where possible
2014-03-27 19:04:34 -07:00
Edmund Huber
2272aae213
spelling and gofmt
2014-03-23 06:50:07 +01:00
Edmund Huber
6267b6a40c
clean up /theater so that it doesn't need a bunch of pointers and that it reuses channel-scoped-user-modes machinery
2014-03-22 22:25:24 +01:00
Edmund Huber
d5bdc78d55
adding theater-mode, fixes #15
2014-03-20 05:05:18 +01:00
Jeremy Latt
874f3628c9
fix another Name => string conversion
2014-03-15 19:18:57 -07:00
Jeremy Latt
d85e6681d9
move modes code to its own file; fix SQL (un)marshalling
2014-03-13 13:22:38 -07:00
Jeremy Latt
96a108f8da
mark unicode normalization with type
2014-03-12 16:45:22 -07:00
Jeremy Latt
cf76d2bd77
persist and load channel mask lists
2014-03-07 18:14:39 -08:00
Jeremy Latt
04c30c8c9b
channel invite mode/list
2014-03-07 17:36:20 -08:00
Jeremy Latt
d4093e7f8b
mask lists (ban, except, invite)
2014-03-07 17:09:49 -08:00
Jeremy Latt
5d46e7d7fa
Merge remote-tracking branch 'origin/master' into user-mask
...
Conflicts:
irc/reply.go
irc/server.go
irc/types.go
2014-03-06 17:44:37 -08:00
Jeremy Latt
69cdad45ac
partially-working sqlite-based usermasks
2014-03-06 11:56:32 -08:00
Jeremy Latt
d54f530d13
Merge remote-tracking branch 'origin/master' into cap-protocol
...
Conflicts:
irc/server.go
2014-03-06 10:34:50 -08:00
Jeremy Latt
04bb79a610
fix invite message to clients
2014-03-05 22:55:22 -08:00
Jeremy Latt
36602c9a3c
basic capability negotiation
...
- multi-prefix is supported as an example
2014-02-28 19:24:38 -08:00
Jeremy Latt
8c8d371ae2
don't give operator to the first person to enter an empty persistent channel
2014-02-27 20:42:12 -08:00
Jeremy Latt
f17855fce9
check channel emptiness when anyone leaves
2014-02-27 18:33:44 -08:00
Jeremy Latt
e33a65ec72
fix channel persistence
2014-02-26 21:52:17 -08:00
Jeremy Latt
66f9b42125
avoid duplicate mode changes
2014-02-25 22:19:21 -08:00
Jeremy Latt
0d277025c1
fix channel insert statement
2014-02-25 21:59:49 -08:00
Jeremy Latt
45bb0d05e7
normalize all unicode input from the client
2014-02-25 20:22:07 -08:00
Jeremy Latt
c35d5d1b8a
code review
...
- SEM_VER instead of SEMVER
- persist user limit along with other params
2014-02-25 16:13:47 -08:00
Jeremy Latt
b30e247e77
properly persist channels
2014-02-25 15:57:35 -08:00
Jeremy Latt
e409bcec99
simplify new channel insert
2014-02-25 13:12:11 -08:00
Jeremy Latt
02abeeb164
persistent channels persisted to a sqlite db
2014-02-25 11:11:34 -08:00
Jeremy Latt
de5538f5d5
add persistent flag for channels
2014-02-25 10:04:59 -08:00
Jeremy Latt
f0305cf01a
invite command
2014-02-25 07:35:52 -08:00
Jeremy Latt
41e6baf9d4
get rid of a race; use pointers where possible
2014-02-23 18:05:06 -08:00
Jeremy Latt
f482b6b82f
add all channel mask list replies
2014-02-22 15:01:11 -08:00