mIRC Home    About    Download    Register    News    Help

Print Thread
#130575 19/09/05 03:30 PM
Joined: Sep 2005
Posts: 9
S
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
S
Joined: Sep 2005
Posts: 9
Hello!

If I want to message to a channel, and the channel doesn't exist because nobody on it, then i got a message, that #<channel name> No such channel. How can I do that, if this channel doesn't exsit then my mirc automatically write the text what i wrote to a file.

#130576 19/09/05 03:42 PM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Do you mean error message "Cannot send to channel"?

[code]
alias msg {
msg $1-
set %msg $2-
}

Raw 404:*: {
if (%msg) { write $+($2,.txt) %msg }
}

#130577 19/09/05 03:43 PM
Joined: Sep 2005
Posts: 9
S
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
S
Joined: Sep 2005
Posts: 9
Oh thank you very much smile

#130578 19/09/05 03:58 PM
Joined: Sep 2005
Posts: 9
S
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
S
Joined: Sep 2005
Posts: 9
on 1:INPUT:#:/.msg #bela $1-

So here is my script. This script is doing, that if I write something to a channel, then the message is sending to a channel where i write, and to channel #bela, but sometimes the #bela channel doesn't exist. And I can't combine it with this

Raw 404:*: {
if (%msg) { write $+($2,.txt) %msg }
}

frown

Please help me again frown
Your script is good, and I thank you, but I can't combine with mine frown

#130579 19/09/05 04:08 PM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Well, I actually thought you was sending messages from outside the channel as (allowing external messages)..

-Andy

#130580 19/09/05 04:19 PM
Joined: Sep 2005
Posts: 9
S
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
S
Joined: Sep 2005
Posts: 9
Yes, yes I am sending outside the channel from #Bela
And if #Bela channel doesn't exist, then I get a message that this isn't exist.

#130581 19/09/05 04:41 PM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
You don't need an On Input event if you're sending the message and you're not on the channel. If it says cannot send to channel it writes to chan.txt.

/msg #ABC123 Test

If you aren't on the channel and it says Cannot send it writes to #ABC123.txt

-Andy

#130582 19/09/05 10:29 PM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
Code:
on 1:INPUT:#:{ if ($chan != #bela) { .msg #bela $1- | set -u10 %bela.text $1- }
raw 401:&amp; #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

Code:
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:&amp; #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


Link Copied to Clipboard