mIRC Home    About    Download    Register    News    Help

Print Thread
#251783 03/03/15 01:18 PM
Joined: Nov 2014
Posts: 2
J
Bowl of petunias
OP Offline
Bowl of petunias
J
Joined: Nov 2014
Posts: 2
I have got a script that welcomes people every time they come into my stream but I want it to read joins.txt file to see if there name is already there. If their name is on that list I want it to say a welcome back $nick message instead. I have tried but it isn't working.

Quote:
on !*:join:#hiyapeopleofthe:{
if(!$read(joins.txt,nw,$nick)){
msg $chan Welcome $nick to my stream. Please follow if you haven't already
write joins.txt $nick
}
else msg $chan Welcome back $nick to hiyapeopleofthe's stream!
}

Joined: Dec 2013
Posts: 779
N
Hoopy frood
Offline
Hoopy frood
N
Joined: Dec 2013
Posts: 779
You if statement is invalid. You can't have it toucing the code.
if (!$read(joins.txt,nw,$nick)) {


Nillens @ irc.twitch.tv
Nillen @ irc.rizon.net
Joined: Dec 2008
Posts: 1,515
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,515
Try use this code:

Code:
ON !*:JOIN:#hiyapeopleofthe: {
  if (!$read(joins.txt,nw,$nick)) {
    msg $chan Welcome $nick to my stream. Please follow if you haven't already!
    write joins.txt $nick
  }
  else { msg $chan Welcome back $nick . }
}

Last edited by westor; 03/03/15 01:39 PM.

Need Online mIRC help or an mIRC Scripting Freelancer? -> https://irc.chathub.org <-

Link Copied to Clipboard