mIRC Homepage
Posted By: powerade661 I can't figure out how to do this - 12/05/15 03:36 AM
So I am wanting to make it so that if a user has typed any of the commands below, it doesn't display the message for notifying them that the streamer is away as viewers that are currently in the chat don't really need to know this information, and then have it reset their user when away mode is restarted (turned off and then turned on again.) I have tried increasing the flood nick times but if they aren't flooding the command, it's still going to allow the message to show up. Any help with this would be very much appreciated.

Code:

on *:TEXT:!away:#: {
  if ((%floodaway) || ($($+(%,floodaway.,$nick),2))) { return }
  set -u10 %floodaway On
  set -u30 %floodaway. $+ $nick 
  if ($nick isop #) {
    set %away.mode On    
    msg $chan Away mode activated, new users will be alerted that the streamer is away
  }
}
on *:TEXT:hello *:#: {
  if (!%away.mode) return
  if ((%floodhello_*) || ($($+(%,floodhello_*.,$nick),2))) { return }
  set -u10 %floodhello_* On
  set -u3600 %floodhello_*. $+ $nick 
  msg $chan $nick $remove(#,$chr(35)) is away, and will be back shortly  
}
on *:TEXT:sup *:#: {
  if (!%away.mode) return
  if ((%floodsup_*) || ($($+(%,floodsup_*.,$nick),2))) { return }
  set -u10 %floodsup_* On
  set -u3600 %floodsup_*. $+ $nick 
  msg $chan $nick $remove(#,$chr(35)) is away, and will be back shortly  
}
on *:TEXT:hi *:#: {
  if (!%away.mode) return
  if ((%floodhi_*) || ($($+(%,floodhi_*.,$nick),2))) { return }
  set -u10 %floodhi_* On
  set -u3600 %floodhi_*. $+ $nick 
  msg $chan $nick $remove(#,$chr(35)) is away, and will be back shortly  
}

on *:TEXT:hey *:#: {
  if (!%away.mode) return
  if ((%floodhey_*) || ($($+(%,floodhey_*.,$nick),2))) { return }
  set -u10 %floodhey_* On
  set -u3600 %floodhey_*. $+ $nick 
  msg $chan $nick $remove(#,$chr(35)) is away, and will be back shortly  
}

on *:TEXT:yo *:#: {
  if (!%away.mode) return
  if ((%floodyo_*) || ($($+(%,floodyo_*.,$nick),2))) { return }
  set -u10 %floodyo_* On
  set -u3600 %floodyo_*. $+ $nick 
  msg $chan $nick $remove(#,$chr(35)) is away, and will be back shortly  
}
on *:TEXT:!awayoff:#: {
  if ((%floodawayoff) || ($($+(%,floodawayoff.,$nick),2))) { return }
  set -u10 %floodawayoff On
  set -u30 %floodawayoff. $+ $nick 
  if ($nick isop #) {
    unset %away.mode    
    msg $chan The streamer is back! Enjoy the show. :) 

  }
}

Posted By: scdudedark Re: I can't figure out how to do this - 12/05/15 10:59 PM
I really like what I see here if it works (I am at work so I cant check) But I am a little confused about what your asking for? you dont want it to show up for people already in the channel?
Posted By: JB_uk Re: I can't figure out how to do this - 13/05/15 12:31 AM
So you're wanting to do it whereby when away mode is activated and somebody new joins the channel there will be a message in chat that says
"[Name], [Streamer] is away, and will be back shortly"

Am I understanding you correctly?
Posted By: powerade661 Re: I can't figure out how to do this - 13/05/15 12:36 AM
Yes that is correct. But if they type hey or hello as a newcomer or oldcomer it basically forbids them from using the command hello until away mode is turned off and then on again. The reason for this is so that people who are already aware that the streamer is away aren't getting spammed because they are trying to say hi to someone else. So basically if I type hello the bot replies once to that specific user if away mode is activated, otherwise it doesn't reply unless they are new to the stream after away mode has been activated.
Posted By: JB_uk Re: I can't figure out how to do this - 13/05/15 12:38 AM
I'm assuming you're using this for twitch, correct?
and you want it so that it only displays the message to the relevant user?
Posted By: powerade661 Re: I can't figure out how to do this - 13/05/15 12:40 AM
Correct. smile
Posted By: JB_uk Re: I can't figure out how to do this - 13/05/15 12:43 AM
I don't believe there is a way to display the message to only the relevant user on Default Twitch without extensions, so it would have to be a "global" message, instead of relying on the keyword commands you could do it so that it would automatically trigger when someone joins the chat. Obviously a flood could be added to this, if that's what you wanted...?
Posted By: powerade661 Re: I can't figure out how to do this - 13/05/15 12:46 AM
Yeah that's exactly what I want! Sorry I am sorta convoluted in my message.
Posted By: JB_uk Re: I can't figure out how to do this - 13/05/15 01:05 AM
Give this a small test for me, let me know if this is what you were after. I changed the flood for the message to be at minimum every 30 seconds.

Code:
on *:TEXT:!away:#: {
  if ((%floodaway) || ($($+(%,floodaway.,$nick),2))) { return }
  set -u10 %floodaway On
  set -u30 %floodaway. $+ $nick 
  if ($nick isop #) {
    set %away.mode On    
    msg $chan Away mode activated, new users will be alerted that the streamer is away.
  }
  else { return }
}
on !*:join:#:{
  if (!%away.mode) return
  if ((%floodhello_*) || ($($+(%,floodhello_*.,$nick),2))) { return }
  set -u30 %floodhello_* On
  set -u3600 %floodhello_*. $+ $nick 
  msg $chan Hi $nick $+ , $remove(#,$chr(35)) is away, and will be back shortly. 
}

on *:TEXT:!awayoff:#: {
  if ((%floodawayoff) || ($($+(%,floodawayoff.,$nick),2))) { return }
  set -u10 %floodawayoff On
  set -u30 %floodawayoff. $+ $nick 
  if ($nick isop #) {
    unset %away.mode    
    msg $chan *STREAMER NAME* is back! Enjoy the show. :) 

  }
}

Posted By: powerade661 Re: I can't figure out how to do this - 13/05/15 01:16 AM
Is it supposed to alert if someone types in the chat or does it just say it regardless?
Posted By: JB_uk Re: I can't figure out how to do this - 13/05/15 01:17 AM
It would alert the user if they joined the channel when the streamer is away. Is that what you'd want? Or if they typed?
Posted By: powerade661 Re: I can't figure out how to do this - 13/05/15 01:19 AM
When they joined if they typed in the chat if possible. Sorry I am troublesome.
Posted By: powerade661 Re: I can't figure out how to do this - 13/05/15 01:22 AM
Also the current script isn't working either frown It didn't display a message at all. frown
Posted By: scdudedark Re: I can't figure out how to do this - 13/05/15 01:27 AM
so my replies seem to be screened and arent getting through
Posted By: JB_uk Re: I can't figure out how to do this - 13/05/15 01:33 AM
Make sure you mIRC logs you as having joined, like this

[02:00] * jb_uk (jb_uk@jb_uk.tmi.twitch.tv) has joined #channel
[02:00] <@loz_bot> Hi jb_uk, *STREAMERNAME* is away, and will be back shortly.
[02:00] * jtv sets mode: +o jb_uk
Posted By: powerade661 Re: I can't figure out how to do this - 13/05/15 01:34 AM
I did, it has the same logs. Just no message frown
Posted By: JB_uk Re: I can't figure out how to do this - 13/05/15 01:37 AM
Join www.twitch.tv/jb_uk, let's see
© mIRC Discussion Forums