|
Joined: Aug 2004
Posts: 237
Fjord artisan
|
OP
Fjord artisan
Joined: Aug 2004
Posts: 237 |
------------------------------------------------------------------------------ raw 396:& LethPhaos.users.quakenet.org is now your hidden host:{ var %i = 0,%a,%b while $readini($+(",$mircini,"),chanfolder,n $+ %i) { %b = $v1 if $findtok($v1,$network,34) { %a = $addtok(%a,$gettok($gettok(%b,1,44),2,61),44) } inc %i } join %a } ------------------------------------------------------------------------------ This is a follow-up of my previous thread which has stopped pulling the attention of all l33t scripters around here This script is not working. It is meant to make me join the channels in the mIRC Favorites after I got usermode +x The error I get is: * /join: insufficient parameters (line 25, script.mrc) line 25 is the " join %a " part. Could anyone help? Thanks in advance!
|
|
|
|
Joined: Feb 2004
Posts: 2,019
Hoopy frood
|
Hoopy frood
Joined: Feb 2004
Posts: 2,019 |
The error lies in this: $gettok($gettok(%b,1,44),2,61)
The $readini returns the value which is already the 2nd equal sign delimited token, so that $gettok(...,2,61) isn't needed there, and actually makes the return value empty.
n10=#channel, "blabla", "blabla"
$readini returns: #channel, "blabla", "blabla" $gettok(%b,1,44) returns: #channel $gettok($gettok(%b,1,44),2,61) returns:
Greets
Gone.
|
|
|
|
Joined: Aug 2004
Posts: 237
Fjord artisan
|
OP
Fjord artisan
Joined: Aug 2004
Posts: 237 |
Now I have: ------------------------------------------------------------------------------ raw 396:& LethPhaos.users.quakenet.org is now your hidden host:{ var %i = 0,%a,%b while $readini($+(",$mircini,"),chanfolder,n $+ %i) { %b = $v1 if $findtok($v1,$network,34) { %a = $addtok(%a,$gettok(%b,1,44),44) } inc %i } join %a } ------------------------------------------------------------------------------ It only joins 9 of the 13 channels in favorites. Any help?
|
|
|
|
Joined: Aug 2004
Posts: 237
Fjord artisan
|
OP
Fjord artisan
Joined: Aug 2004
Posts: 237 |
is it because you can only join 9 channels this way? /join #channel1,#channel2,#channel3,...
Last edited by LethPhaos; 26/01/05 06:03 PM.
|
|
|
|
Joined: Oct 2003
Posts: 96
Babel fish
|
Babel fish
Joined: Oct 2003
Posts: 96 |
Most likely yes .. that's a lot higher than most networks allow check the raw 005 when you connect for MAXTARGETS that is what the limit is .. I think you can get the raw 005 by typing /!raw version as well.
maxtargets also covers messaging multiple targets .. /msg nick1,nick2,nick3 ... /msg #chan1,#chan2,#chan3 ... and so on.
Last edited by JoeDaddy; 26/01/05 06:13 PM.
|
|
|
|
Joined: Aug 2004
Posts: 237
Fjord artisan
|
OP
Fjord artisan
Joined: Aug 2004
Posts: 237 |
WHOX WALLCHOPS WALLVOICES USERIP CPRIVMSG CNOTICE SILENCE=15 MODES=6 MAXCHANNELS=20 MAXBANS=45 NICKLEN=15 TOPICLEN=250 AWAYLEN=160 KICKLEN=250 are supported by this server CHANTYPES=#& PREFIX=(ov)@+ CHANMODES=b,k,l,imnpstrDcCNu CASEMAPPING=rfc1459 NETWORK=QuakeNet are supported by this server Nothing MAXTARGET alike, but I suppose that is indeed the problem. I'll try to fix it, you'll probably hear from it again
|
|
|
|
Joined: Aug 2004
Posts: 237
Fjord artisan
|
OP
Fjord artisan
Joined: Aug 2004
Posts: 237 |
I've got this now: ---------------------------------------------------------------------------- raw 396:& LethPhaos.users.quakenet.org is now your hidden host:{ var %i = 0,%a,%b var %count = 0 while ( $readini($+(",$mircini,"),chanfolder,n $+ %i) ) { while ( %count < 5 ) { %b = $v1 if $findtok($v1,$network,34) { %a = $addtok(%a,$gettok(%b,1,44),44) } inc %i inc %count } %count = 0 join %a } } ---------------------------------------------------------------------------- I'm getting the same error as before (join insufficient parameters) Help! It doesn't join anything anymore.
|
|
|
|
Joined: Feb 2004
Posts: 2,019
Hoopy frood
|
Hoopy frood
Joined: Feb 2004
Posts: 2,019 |
while ( %count < 5 ) { %b = $v1
$v1 stores the left part of the last if comparison, in this case %count.
Gone.
|
|
|
|
Joined: Aug 2004
Posts: 237
Fjord artisan
|
OP
Fjord artisan
Joined: Aug 2004
Posts: 237 |
Still get: * /join: insufficient parameters (line 29, LethPhaos Script - On Action - Raw.mrc) with: ---------------------------------------------------------------------------------- raw 396:& LethPhaos.users.quakenet.org is now your hidden host:{ var %i = 0,%a,%b var %count = 0 while ( $readini($+(",$mircini,"),chanfolder,n $+ %i) ) { while ( %count < 5 ) { %b = $readini($+(",$mircini,"),chanfolder,n $+ %i) if $findtok($v1,$network,34) { %a = $addtok(%a,$gettok(%b,1,44),44) } inc %i inc %count } %count = 0 join %a } } ---------------------------------------------------------------------------------- Anything else?
|
|
|
|
Joined: Feb 2004
Posts: 2,019
Hoopy frood
|
Hoopy frood
Joined: Feb 2004
Posts: 2,019 |
Man, you really need to review your code carefully and learn how to debug.
I immediately saw the error: if $findtok($v1,$network,34)
You're still using $v1 there.
Gone.
|
|
|
|
Joined: Aug 2004
Posts: 237
Fjord artisan
|
OP
Fjord artisan
Joined: Aug 2004
Posts: 237 |
In fact, this is code I got in the previous thread I spoke about in first post of this thread, srry if I'm askinf noob questions but this is in fact a bit above my skill. Srry :s EDIT: Still only joining nine of thirteen, please help me out someone. EDIT2: Added %a = 0, but now mirc crashes in some way EDIT3: Code now looks like: ------------------------------------------------------------------------------ raw 396:& LethPhaos.users.quakenet.org is now your hidden host:{ var %i = 0,%a,%b var %count = 0 while ( $readini($+(",$mircini,"),chanfolder,n $+ %i) ) { while ( %count < 5 ) { %b = $readini($+(",$mircini,"),chanfolder,n $+ %i) if $findtok($readini($+(",$mircini,"),chanfolder,n $+ %i),$network,34) { %a = $addtok(%a,$gettok(%b,1,44),44) } inc %i inc %count } join %a %a = 0 %count = 0 } } ------------------------------------------------------------------------------ Joins some channels, leaves them , joins some other channels, leaves them again, stops with 2 channels joined, which are NOT the last ones in the favorites. Going to watch a movei, chacking back later this evening. Thanx for any help !!!
Last edited by LethPhaos; 26/01/05 07:59 PM.
|
|
|
|
Joined: Aug 2003
Posts: 1,831
Hoopy frood
|
Hoopy frood
Joined: Aug 2003
Posts: 1,831 |
raw 396:& LethPhaos.users.quakenet.org is now your hidden host:{
var %i = 0,%a,%b
while $readini($+(",$mircini,"),chanfolder,n $+ %i) {
%b = $v1
if $findtok(%b,$network,34) { %a = $addtok(%a,$gettok(%b,1,44),44) }
[color:blue] if $numtok(%a,44) == 5 { join %a | var %a }[/color]
inc %i
}
[color:blue] if %a { join %a }[/color]
}
PS sorry about the extra $gettok(), I was going to loadbuf the topic from mircini and use that data but decided to just use $readinii instead and forgot to change it :tongue:
|
|
|
|
Joined: Aug 2004
Posts: 237
Fjord artisan
|
OP
Fjord artisan
Joined: Aug 2004
Posts: 237 |
Thanks a lot, but it has the problem of joining only 9 channels, would you be so kind as to add the second while so that it joins the channels in strings of 5 each time?
eg if you have 13 favourite channels it would do: /join #channel1,#channel2,#channel3,#channel4,#channel5 /join #channel6,#channel7,#channel8,#channel9,#channel10 /join #channel11,#channel12,#channel13
Thanks!
|
|
|
|
Joined: Aug 2004
Posts: 237
Fjord artisan
|
OP
Fjord artisan
Joined: Aug 2004
Posts: 237 |
Just found out that this could be your solution to my while problem, if it is it isn't working like it should if $numtok(%a,44) == 5 { join %a | var %a } please help, can't figure it out myself thanks
|
|
|
|
Joined: Aug 2003
Posts: 1,831
Hoopy frood
|
Hoopy frood
Joined: Aug 2003
Posts: 1,831 |
It doesn't need a second while loop. It joins any number of chans in lots of 5 (or less for the last few).
/debug @debug and see what gets sent.
Obviously there will be a limit on the amount of channels you can join that is set by the server.
|
|
|
|
Joined: Aug 2004
Posts: 237
Fjord artisan
|
OP
Fjord artisan
Joined: Aug 2004
Posts: 237 |
Thanx! I know what the problem is: It joins the channels for this server connection, but not all my channels are for a server, some og them are for all server and therefore the server field in the ini is empty. Following to this it skips these channels. Now that I know why it "doesn't work" I still can't solve it myself I appreciate all given help and patience very much, could anyone please add the feature to join a channel also when no server is set? Please, Thanks a lot!!! I hope I was clear enough
|
|
|
|
Joined: Aug 2003
Posts: 1,831
Hoopy frood
|
Hoopy frood
Joined: Aug 2003
Posts: 1,831 |
Nothing to add, just remove the network check..
raw 396:& LethPhaos.users.quakenet.org is now your hidden host:{
var %i = 0,%a
while $readini($+(",$mircini,"),chanfolder,n $+ %i) {
%a = $addtok(%a,$gettok($v1,1,44),44)
if $numtok(%a,44) == 5 { join %a | var %a }
inc %i
}
if %a { join %a }
}
|
|
|
|
Joined: Aug 2004
Posts: 237
Fjord artisan
|
OP
Fjord artisan
Joined: Aug 2004
Posts: 237 |
Indeed... Thanks a lot guys!!!
|
|
|
|
|