Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有这个用于 onjoin 事件的命令:
on !*:join:#:{ msg $chan MESSAGE }
如何使用示例打开/关闭此消息:
!onjoin on OR !onjoin off
谢谢
您可以使用一个变量来指示此选项的状态。此变量将由您指定的命令设置。
脚本应如下所示:
on !*:join:#: if (%onJoinMessage) { msg # MESSAGE } on *:text:!onjoin *:#: { if ($1 == on) { inc %onJoinMessage } elseif ($1 == off) { unset %onJoinMessage } }