home · contact · privacy
Handle NOTICE messages from server to channel.
authorChristian Heller <c.heller@plomlompom.de>
Wed, 12 Nov 2025 11:57:19 +0000 (12:57 +0100)
committerChristian Heller <c.heller@plomlompom.de>
Wed, 12 Nov 2025 11:57:19 +0000 (12:57 +0100)
src/ircplom/msg_parse_expectations.py
src/tests/channels.test

index a1917a547e9474f992e6deafccc75453ae92c70c..27b973ea81f82a2dbb174328b7e538b016c06f91 100644 (file)
@@ -505,6 +505,12 @@ MSG_EXPECTATIONS: list[_MsgParseExpectation] = [
         ((_MsgTok.NICKNAME, 'setattr_db.users.me:nick'),
          (_MsgTok.ANY, 'setattr_db.messaging..to.:notice'))),
 
+    _MsgParseExpectation(
+        'NOTICE',
+        (_MsgTok.SERVER, ':SERVER'),
+        ((_MsgTok.CHANNEL, ':CHANNEL'),
+         (_MsgTok.ANY, 'setattr_db.messaging.SERVER.to.CHANNEL:notice'))),
+
     _MsgParseExpectation(
         'NOTICE',
         (_MsgTok.NICK_USER_HOST, ':USER'),
index ff8670d597798445775e5dc6808e2d37f26ec2ca..f8fbad45febd120a96003655288f485a9c206a78 100644 (file)
@@ -154,6 +154,10 @@ log 1 $ users:3:user set to: [~oof]
 log 1 $ users:3:host set to: [oof.oof]
 log 3 < (oof) msg_test5 msg_test6
 
+# check effect of server NOTICE to channel
+insert servermsglogged : +0 MSG :*.?.net NOTICE #ch_test0 :msg_test6 msg_test7
+log 3 < (*.?.net) msg_test6 msg_test7
+
 # check part of user visible in other channel
 insert servermsglogged : +0 MSG :bar!~bar@bar.bar PART :#ch_test0
 log 1 $ channels:#ch_test0:exits:1 set to: [P]