mIRC Homepage
Posted By: truguce On join from raw - 08/03/06 09:38 PM
I cant figure out why this script stops after the second room
Code:
on ^*:notice:Your vhost*:*: {
  if ($nick == HostServ) {
    .enable #rawjoin
    /join #botz
  }
}
#rawjoin off
raw 329:*: {
  if ($2 == #botz) { 
    /join #scorpio-lounge
    halt
  }
}
raw 329:*: {
  if ($2 == #my-lounge) {
    /join #w4rgod
    halt
  }
}
raw 329:*: {
  if ($2 == #w4rgod) {
    /join #my-training
    halt
  }
}
raw 329:*: {
  if ($2 == #my-training} {
    /join #help
    halt
  }
}
raw 329:*: {
  if ($2 == #help) {
    .disable #rawjoin
  }
}
#rawjoin end
  

no matter what order i put it in it always stops after the second room opens.
Posted By: schaefer31 Re: On join from raw - 08/03/06 11:01 PM
Well, take a look at your code. You have the exact same event over and over, so only the first one is going to get executed.

Also, why not just do this. It's much simpler and does exactly the same thing.

Code:
on *:notice:Your vhost*:*: {
  if ($nick == HostServ) {
    join #botz,#my-lounge,#w4rgod,#my-training,#help
  }
}
Posted By: truguce Re: On join from raw - 08/03/06 11:07 PM
I will try that out. The reason i have it setup that way is because the bot is going to be joining around 13 channels and did not want it to join all at the same time. Thought i could get away with using the raw events in that manner.
Posted By: schaefer31 Re: On join from raw - 08/03/06 11:10 PM
Yes, you could do it that way still but it would require each raw to be in a separate file.

Though, doing it that way can be simplified into a single raw event.

Code:
raw 329:*: {
  if ($2 == #botz) join #scorpio-lounge
  else if ($2 == #my-lounge) join #w4rgod
  else if ($2 == #w4rgod) join #my-training
  else if ($2 == #my-training) join #help
  .disable #rawjoin
}
Posted By: Om3n Re: On join from raw - 09/03/06 04:38 AM
Small code correction..
Code:
on ^*:notice:Your vhost*:?: {
  if ($nick == HostServ) {
    .enable #rawjoin
    join #botz
  }
}
#rawjoin off
raw 329:*: {
  if ($2 == #botz) join #scorpio-lounge
  else if ($2 == #my-lounge) join #w4rgod
  else if ($2 == #w4rgod) join #my-training
  else if ($2 == #my-training) join #help
  else if ($2 == #help) .disable #rawjoin
}
#rawjoin end
Posted By: truguce Re: On join from raw - 09/03/06 07:36 AM
I thought about that after reading the first responce and i used what you put and it works perfectly. Thanks a bunch. I just got into using dlls today so i might have questions about that soon.
Thanks again
© mIRC Discussion Forums