on 1:INPUT:#:{ if ($chan != #bela) { .msg #bela $1- | set -u10 %bela.text $1- }
raw 401:& #bela *: { if ($len(%bela.text)) { haltdef | write YOURFILENAME %bela.text | unset %bela.text }
That above well do you the job, it checks your not typing in #bela, and then msg's bela the text and also stores it incase the channel dont exist
the raw is the catcher for a non existing #bela channel , and if the text exists it writes it to your file, and deletes the text
if you do send messages to the channel from else where something closer to what was already supplied might be better like
alias msg { $iif(!$show, . $+) msg $1- | if (#* iswm $1) { .msg #bela $1- | set -u10 %bela.txt $1- } }
on 1:INPUT:#:{ if ($chan != #bela) { .msg #bela $1- }
raw 401:& #bela *: { if ($len(%bela.text)) { haltdef | write YOURFILENAME %bela.text | unset %bela.text }
That above well intercept any MSG sent to a channel (starting with #) and also send it to #bela and store it incase the channel doesnt exist
the on input no longer needs to store it as its done inside the /MSG
* one warning it wont pick up something like
/msg bob,#blah message to bob and #blah as being sent to a channel