mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jun 2016
Posts: 3
F
Self-satisified door
OP Offline
Self-satisified door
F
Joined: Jun 2016
Posts: 3
Good evening,

I've got a script that I would like to have send a message to a specific user (the broadcaster) whenever someone who's been in the channel, or joined the channel, speaks up for the first time within a 24 hour period.

The script applies a shared timer to this scenario based on all nicknames, as opposed to applying the timer to individual users, and I am not sure how to fix it.

For example, I would like for this to be triggered when user-a speaks, and again when user-b speaks, then c, d, etc.. shortly thereafter, but not to apply to users who have already triggered it, till 24 hours from their first message have passed.

Would someone please offer me some help?

I would appreciate it. Thank you.
__________________________________________

ON *:TEXT:*:#: {
if (!$($+(%,msgsend,$nick),2)) {
if (!$($+(%,msgsend,$chan),2)) {
set -u86400 $+(%,msgsend,$nick) 1
set -u86400 $+(%,msgsend,$chan) 1
msg $chan /w wolvesnofear User Message. $nick Just spoke in chat for the first time in 24h. Please notice them.
}
}
}
__________________________________________

Joined: Sep 2014
Posts: 52
Babel fish
Offline
Babel fish
Joined: Sep 2014
Posts: 52
To whisper a user on Twitch, instead of msg $chan you must /privmsg #jtv /w [username] [message]

Joined: Jun 2016
Posts: 3
F
Self-satisified door
OP Offline
Self-satisified door
F
Joined: Jun 2016
Posts: 3
Thank you. Any thoughts on why this behaves as a "global cooldown" as opposed to on a per-user basis?

Joined: Sep 2014
Posts: 52
Babel fish
Offline
Babel fish
Joined: Sep 2014
Posts: 52
Actually it is setting both. If you only want the per-nick cooldown, you have to remove the per-channel cooldown

Code:
if (!$($+(%,msgsend,$chan),2)) {
set -u86400 $+(%,msgsend,$chan) 1
}

Joined: Jun 2016
Posts: 3
F
Self-satisified door
OP Offline
Self-satisified door
F
Joined: Jun 2016
Posts: 3
Thank you Sir, you're a life-saver. This is exactly what I needed. smile


Link Copied to Clipboard