|
@@ -290,7 +290,7 @@ internal class ChannelStateHandlerTest {
|
290
|
290
|
fakeChannelState += channel
|
291
|
291
|
fakeServerState.features[ServerFeature.ChannelModes] = arrayOf("ab", "cd", "ef", "gh")
|
292
|
292
|
|
293
|
|
- handler.processEvent(ircClient, ModeChanged(EventMetadata(TestConstants.time), "#thegibson", "+", emptyArray(), true))
|
|
293
|
+ handler.processEvent(ircClient, ModeChanged(EventMetadata(TestConstants.time), User("acidBurn"), "#thegibson", "+", emptyArray(), true))
|
294
|
294
|
|
295
|
295
|
assertTrue(channel.modesDiscovered)
|
296
|
296
|
}
|
|
@@ -301,7 +301,7 @@ internal class ChannelStateHandlerTest {
|
301
|
301
|
fakeChannelState += channel
|
302
|
302
|
fakeServerState.features[ServerFeature.ChannelModes] = arrayOf("ab", "cd", "ef", "gh")
|
303
|
303
|
|
304
|
|
- handler.processEvent(ircClient, ModeChanged(EventMetadata(TestConstants.time), "#thegibson", "+ceg", arrayOf("CCC", "EEE"), true))
|
|
304
|
+ handler.processEvent(ircClient, ModeChanged(EventMetadata(TestConstants.time), User("acidBurn"), "#thegibson", "+ceg", arrayOf("CCC", "EEE"), true))
|
305
|
305
|
|
306
|
306
|
assertEquals("CCC", channel.modes['c'])
|
307
|
307
|
assertEquals("EEE", channel.modes['e'])
|
|
@@ -317,7 +317,7 @@ internal class ChannelStateHandlerTest {
|
317
|
317
|
fakeChannelState += channel
|
318
|
318
|
fakeServerState.features[ServerFeature.ChannelModes] = arrayOf("ab", "cd", "ef", "gh")
|
319
|
319
|
|
320
|
|
- handler.processEvent(ircClient, ModeChanged(EventMetadata(TestConstants.time), "#thegibson", "-c+d-eh+fg", arrayOf("CCC", "DDD", "FFF"), true))
|
|
320
|
+ handler.processEvent(ircClient, ModeChanged(EventMetadata(TestConstants.time), User("acidBurn"), "#thegibson", "-c+d-eh+fg", arrayOf("CCC", "DDD", "FFF"), true))
|
321
|
321
|
|
322
|
322
|
assertNull(channel.modes['c'])
|
323
|
323
|
assertEquals("DDD", channel.modes['d'])
|
|
@@ -334,7 +334,7 @@ internal class ChannelStateHandlerTest {
|
334
|
334
|
fakeChannelState += this
|
335
|
335
|
}
|
336
|
336
|
|
337
|
|
- handler.processEvent(ircClient, ModeChanged(EventMetadata(TestConstants.time), "#thegibson", "+o", arrayOf("zeroCool")))
|
|
337
|
+ handler.processEvent(ircClient, ModeChanged(EventMetadata(TestConstants.time), User("acidBurn"), "#thegibson", "+o", arrayOf("zeroCool")))
|
338
|
338
|
|
339
|
339
|
assertEquals("o", fakeChannelState["#thegibson"]?.users?.get("zeroCool")?.modes)
|
340
|
340
|
}
|
|
@@ -346,7 +346,7 @@ internal class ChannelStateHandlerTest {
|
346
|
346
|
fakeChannelState += this
|
347
|
347
|
}
|
348
|
348
|
|
349
|
|
- handler.processEvent(ircClient, ModeChanged(EventMetadata(TestConstants.time), "#thegibson", "+v", arrayOf("zeroCool")))
|
|
349
|
+ handler.processEvent(ircClient, ModeChanged(EventMetadata(TestConstants.time), User("acidBurn"), "#thegibson", "+v", arrayOf("zeroCool")))
|
350
|
350
|
|
351
|
351
|
assertEquals("ov", fakeChannelState["#thegibson"]?.users?.get("zeroCool")?.modes)
|
352
|
352
|
}
|
|
@@ -358,7 +358,7 @@ internal class ChannelStateHandlerTest {
|
358
|
358
|
fakeChannelState += this
|
359
|
359
|
}
|
360
|
360
|
|
361
|
|
- handler.processEvent(ircClient, ModeChanged(EventMetadata(TestConstants.time), "#thegibson", "+o", arrayOf("zeroCool")))
|
|
361
|
+ handler.processEvent(ircClient, ModeChanged(EventMetadata(TestConstants.time), User("acidBurn"), "#thegibson", "+o", arrayOf("zeroCool")))
|
362
|
362
|
|
363
|
363
|
assertEquals("ov", fakeChannelState["#thegibson"]?.users?.get("zeroCool")?.modes)
|
364
|
364
|
}
|
|
@@ -370,7 +370,7 @@ internal class ChannelStateHandlerTest {
|
370
|
370
|
fakeChannelState += this
|
371
|
371
|
}
|
372
|
372
|
|
373
|
|
- handler.processEvent(ircClient, ModeChanged(EventMetadata(TestConstants.time), "#thegibson", "+vo", arrayOf("zeroCool", "zeroCool")))
|
|
373
|
+ handler.processEvent(ircClient, ModeChanged(EventMetadata(TestConstants.time), User("acidBurn"), "#thegibson", "+vo", arrayOf("zeroCool", "zeroCool")))
|
374
|
374
|
|
375
|
375
|
assertEquals("ov", fakeChannelState["#thegibson"]?.users?.get("zeroCool")?.modes)
|
376
|
376
|
}
|
|
@@ -382,7 +382,7 @@ internal class ChannelStateHandlerTest {
|
382
|
382
|
fakeChannelState += this
|
383
|
383
|
}
|
384
|
384
|
|
385
|
|
- handler.processEvent(ircClient, ModeChanged(EventMetadata(TestConstants.time), "#thegibson", "-vo", arrayOf("zeroCool", "zeroCool")))
|
|
385
|
+ handler.processEvent(ircClient, ModeChanged(EventMetadata(TestConstants.time), User("acidBurn"), "#thegibson", "-vo", arrayOf("zeroCool", "zeroCool")))
|
386
|
386
|
|
387
|
387
|
assertEquals("", fakeChannelState["#thegibson"]?.users?.get("zeroCool")?.modes)
|
388
|
388
|
}
|
|
@@ -395,7 +395,7 @@ internal class ChannelStateHandlerTest {
|
395
|
395
|
}
|
396
|
396
|
fakeServerState.features[ServerFeature.ChannelModes] = arrayOf("ab", "cd", "ef", "gh")
|
397
|
397
|
|
398
|
|
- handler.processEvent(ircClient, ModeChanged(EventMetadata(TestConstants.time), "#thegibson", "oa-v+b", arrayOf("zeroCool", "aaa", "zeroCool", "bbb")))
|
|
398
|
+ handler.processEvent(ircClient, ModeChanged(EventMetadata(TestConstants.time), User("acidBurn"), "#thegibson", "oa-v+b", arrayOf("zeroCool", "aaa", "zeroCool", "bbb")))
|
399
|
399
|
|
400
|
400
|
assertEquals("o", fakeChannelState["#thegibson"]?.users?.get("zeroCool")?.modes)
|
401
|
401
|
assertEquals("aaa", fakeChannelState["#thegibson"]?.modes?.get('a'))
|