mIRC Home    About    Download    Register    News    Help

Print Thread
#244061 21/01/14 01:18 AM
Joined: Jan 2014
Posts: 6
A
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
A
Joined: Jan 2014
Posts: 6
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

Joined: Jan 2004
Posts: 1,358
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Jan 2004
Posts: 1,358
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
  }
}

Joined: Jan 2014
Posts: 6
A
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
A
Joined: Jan 2014
Posts: 6
Thanks that helps a lot still working on the spam thing.

Joined: Dec 2013
Posts: 779
N
Hoopy frood
Offline
Hoopy frood
N
Joined: Dec 2013
Posts: 779
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.


Nillens @ irc.twitch.tv
Nillen @ irc.rizon.net
Nillen #244100 24/01/14 12:59 AM
Joined: Jan 2014
Posts: 6
A
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
A
Joined: Jan 2014
Posts: 6
Yes thank you I was experimenting and I got ip banned to.


Link Copied to Clipboard