mIRC Homepage
Posted By: AMTraxTGE Help I'm stuck - 21/01/14 01:18 AM
I know I'm new at this but I am stuck on this..
When someone joins my channel a message will say that they joined and writes to a file to keep their name so when they rejoin the message correctly says user has rejoined..
This is for Twitch.tv for my channel

Code:
on *:JOIN:#amtraxtge:{
  var %person = $read(AMTraxTGE.txt)
  if (!$read(AMTraxTGE.txt,nw,$nick)) { 
    msg $chan $nick has joined! 
    write AMTraxTGE.txt $nick
  }
}
on *:JOIN:#amtraxtge:{
  var %person = $read(AMTraxTGE.txt)
  if (!$read(AMTraxTGE.txt,nw,$nick)) {
    msg $chan $nick has rejoined
  }
}


The code does not work after the second on *:JOIN:

Thanks,
AMTraxTGE
Posted By: Loki12583 Re: Help I'm stuck - 21/01/14 02:48 AM
Only a single event is triggered for any event type, combine them. You should be mindful however that a number of people have come here looking for greeting scripts, and always end up disabling them because all they do is spam (and they get booted).

Code:
on *:JOIN:#amtraxtge:{
  if ($read(AMTraxTGE.txt,nw,$nick)) {
    msg $chan $nick has rejoined
  }
  else {
    msg $chan $nick has joined! 
    write AMTraxTGE.txt $nick
  }
}
Posted By: AMTraxTGE Re: Help I'm stuck - 21/01/14 09:54 PM
Thanks that helps a lot still working on the spam thing.
Posted By: Nillen Re: Help I'm stuck - 21/01/14 10:31 PM
Note that if you flood a channel with 20 messages within 30 seconds, you will get ip banned from the twitch chat for 8 hours. (Happened to me by accident).

Code:
on *:JOIN:#amtraxtge:{
  if (%joinspam == on) { return } 
  set -u3 %joinspam on
  if ($read(AMTraxTGE.txt,nw,$nick)) {
    msg $chan $nick has rejoined
  }
  else {
    msg $chan $nick has joined! 
    write AMTraxTGE.txt $nick
  }
}


Should be what you're looking for.
Posted By: AMTraxTGE Re: Help I'm stuck - 24/01/14 12:59 AM
Yes thank you I was experimenting and I got ip banned to.
© mIRC Discussion Forums