mIRC Home    About    Download    Register    News    Help

Print Thread
Need some help in remote scripting #97130 09/09/04 01:25 PM
Joined: Sep 2004
Posts: 11
K
killemall_ Offline OP
Pikka bird
OP Offline
Pikka bird
K
Joined: Sep 2004
Posts: 11
I'm new to IRC (started on Friday) and I got confused by the fact that it seems a variable is not always accessable.

Here's what I wrote:

---------- script start ----------
- in remote variables (remote.ini):
%tc = #tommys-channel

- in remote script (script.ini)
on 1:connect: {
echo channel name is: %tc
if ($network == TomNet) { join #Beginner,%tc
topic #tommys-channel today: one topic for free! laugh
mode #tommys-channel +n-t+l 10
}
}
---------- script end ----------

the echo command is printed out correct (channel name is: = #tommys-channel). But it is not working in the join command anymore (%tc No such channel).

Any idea what the problem can be?

Client: mIRC 6.16 (not registered yet) under M$ W2k, no add-ons or whatever.

I have a irc server (BewareIRC in W2k) running so I can tryout the irc features without working on a productive environment.
And with that server I tried the above scirpt.

cheers killemall

<edit>the echo command is also working when placed in the if(...) {} part.</edit>

Last edited by killemall_; 09/09/04 01:52 PM.
Re: Need some help in remote scripting #97131 09/09/04 01:39 PM
Joined: Feb 2004
Posts: 714
Z
Zyzzyx26 Offline
Hoopy frood
Offline
Hoopy frood
Z
Joined: Feb 2004
Posts: 714
I am not sure this will help, but it won't hurt to give it a try smile

Code:
on 1:connect: {
 echo channel name is: %tc
  if ($network == TomNet) { 
   join #Beginner,%tc
   topic #tommys-channel today: one topic for free! 
   mode #tommys-channel +n-t+l 10
  }
}

I have just put the /join command in a new line, like the /topic and /mode; maybe that will fix it?

BTW, +n-t+l 10 can be expressed by -t+nl 10 or +nl-t 10. It is exactly the same, only a few chars shorter wink

Hope this helps,
Zyzzyx


"All we are saying is give peace a chance" -- John Lennon
Re: Need some help in remote scripting #97132 09/09/04 01:50 PM
Joined: Sep 2004
Posts: 11
K
killemall_ Offline OP
Pikka bird
OP Offline
Pikka bird
K
Joined: Sep 2004
Posts: 11
Hi Zyzzyx26,

Thanx for ur answer. Unfortunately it didn't work but it was worth a try cool

Thanx for the tip about setting the modes!

cu killemall

Re: Need some help in remote scripting #97133 09/09/04 01:55 PM
Joined: Feb 2004
Posts: 714
Z
Zyzzyx26 Offline
Hoopy frood
Offline
Hoopy frood
Z
Joined: Feb 2004
Posts: 714
hmm.. try this: join #Beginner,$eval(%tc,2)

smile


"All we are saying is give peace a chance" -- John Lennon
Re: Need some help in remote scripting #97134 09/09/04 04:05 PM
Joined: Dec 2002
Posts: 1,922
O
Online Offline
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
In the variables section there shouldn't be a =, so delete it.

Also, change the join command to: /join #beginner, [color:blue]$+ %tc[/color]

Re: Need some help in remote scripting #97135 09/09/04 04:23 PM
Joined: Sep 2004
Posts: 11
K
killemall_ Offline OP
Pikka bird
OP Offline
Pikka bird
K
Joined: Sep 2004
Posts: 11
Ok, didn't help either confused . It really looks like it just don't evaluate this variable.

I changed the name (u never know smile, put the two joins on one line each, did the eval() thing, declared the var local, put an echo line before and after the /join. It works for /echo but not for /join (could it maybe a bug?)

-> it just don't evaluate the f#@*er!

Re: Need some help in remote scripting #97136 09/09/04 04:32 PM
Joined: Sep 2004
Posts: 11
K
killemall_ Offline OP
Pikka bird
OP Offline
Pikka bird
K
Joined: Sep 2004
Posts: 11
U r my hero Online!

So mIRC is really picky about spaces then? It doesn't accept any spaces between the channel list (/join #Beginner, #irc isn't working) but can't evaluate a variable if the space is missing?

That's a rather strange behavior but I memorize it, thanx again!!

killemall