mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jun 2014
Posts: 3
J
jewslox Offline OP
Self-satisified door
OP Offline
Self-satisified door
J
Joined: Jun 2014
Posts: 3
welcome_bot on twitch directed me to use the following script to greet users:

Code:
on *:join:#: { 
  if ($readini(wb.ini,$chan,$nick) == yes) && (%flood) { return } {
    set -u30 %flood on
  /msg $chan Welcome back to the stream $nick ( $+ $nick($chan,0) in chat) }
  else {
    /msg $chan Welcome to the stream $nick I hope you enjoy your stay ( $+ $nick($chan,0) in chat)
  }


The writing into wb.ini works, but the else command isn't activating, and even newcomers get the welcome back message. Any idea why?

Joined: Dec 2013
Posts: 9
R
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
R
Joined: Dec 2013
Posts: 9
Maybe this will help :P
I noticed that you want to welcome back users when they are in the wb.ini file, and if they are not they will be welcomed with an other msg. But there was not a write ini to get info and welcome users that join the channel for the 2nd, Nth time..
So I edited the code and there you go..
Don't know if this will do the trick, because I am not that kind of an expert on mSL.. So make sure you check the brackets etc.. :P

Code:
on *:join:#: { 
  if ($readini(wb.ini, n, $chan, $nick) == yes) {
    if (%flood) { return }
    set -u30 %flood on
    msg $chan Welcome back to the stream $nick ( $+ $nick($chan,0) in chat)
}
else {
    writeini wb.ini, $chan, $nick, yes
    if (%flood) { return }
      set -u30 %flood on
      msg $chan Welcome to the stream $nick I hope you enjoy your stay ( $+ $nick($chan,0) in chat)
}

Joined: Jun 2014
Posts: 3
J
jewslox Offline OP
Self-satisified door
OP Offline
Self-satisified door
J
Joined: Jun 2014
Posts: 3
Hi r4z0r, thanks for trying to help. I have another script that simply writes to wb.ini on quitting the twitch channel, btw.

I tried your code, but nothing pops up for first timers now. I had to delete some commas on the writeini. I think it's working now! I'll be back to confirm.

Last edited by jewslox; 29/06/14 02:09 PM.
Joined: Jun 2014
Posts: 3
J
jewslox Offline OP
Self-satisified door
OP Offline
Self-satisified door
J
Joined: Jun 2014
Posts: 3
Yep, seems to work.

Your code also made the other separate writing script unnecessary. Thanks! laugh


Link Copied to Clipboard