Twitch !watch command(s)

By ^WeSt on Oct 10, 2014

Requested for: http://forums.mirc.com/ubbthreads.php/topics/248497/Anyone_solve_this?#Post248497

Contact: http://westor.ucoz.com/contact


Commands:

!Watchtime = Will display the total time of the user that is watching your stream.

!Totalwatch = Will display the total users that are watching your stream.

!Watchnicks = Will display all the users that are watching your stream, and total time if exist.

NOTE: Cause an hawkee parser problem try copy the code from here: http://pastebin.com/Q8gWHEGV

http://pastebin.com/Q8gWHEGV

Comments

Sign in to comment.
jessRD   -  Oct 12, 2016

Thanks for the detailed explanation on the usage of brackets and I also got confused by the fact that a user data storage part is missed. I'll ask at http://pimion.com to complement script.

 Respond  
^WeSt   -  Oct 16, 2014
  • Code has been moved to an pastebin cause an hawkee mirc parser problem.
 Respond  
Yawhatnever   -  Oct 11, 2014

I would use $+([, $nick, ]:) to surround $nick with brackets because you will be less likely to accidentally introduce a ] bracket somewhere. Since [ ] are eval brackets in mSL, it could potentially lead to risky code in some cases. Perhaps not for twitch, but it's one of those things that's good to get in the habit of watching out for.

Is there a reason you didn't just reply to the original thread on the mIRC forums instead of posting here? This is only half of a script; it's missing the part where user data is stored. That makes it kind of useless for anyone who views it here.

!watchnicks will easily reach Twitch spam limits if more than 20 (or 100 if the bot is a mod) nicks are in the list, causing the bot to be locked out of chat for 8 hours. There is also no flood protection limit that I can see, so even if there are only 10 users in the list somebody could use the command 2-10 times in a row to get the bot banned for 8 hours.

Since the part where points/time are increased is missing I can't tell if this tracks every viewer or just specific ones, but I would assume it tracks all viewers. The system should really use something besides an ini file to store the data, because many twitch channels are VERY large and storing everything in points.ini will eventually start causing mIRC to freeze. I guarantee this will happen much more frequently than you think. You should at least use a hash table, and perhaps set up a system that periodically either removes users after a period of inactivity or archives their data to speed up operations on the table of active users.

^WeSt  -  Oct 12, 2014

You have spend 10-15 minutes to say bullshits for an simple requested code if you see that this is wrong go on the forum and post your code, also in your reply the 90% of your reply is wrong first of all the [ $+ $nick $+ ] inside the [] brackets there are $chr(3) but the hawkee parser does not recognized them. and about the flood that you said, the user wanted that way so i follow him request step by step, and i am not an magician to guess if the IRCD server will ban him or the channel modes or the channel services settings, also the why i post here the code and not directly this does not make sense and you are not the person who will tell me where to post my codes, if feel free to post them here and i post them, if you have a better job go and do it and don't fill the my posts with your silly comments.

Yawhatnever  -  Oct 16, 2014

You posted the script to hawkee, so I responded to it on hawkee. If you only intended for the person who made the original post on the mIRC forums to see it or use it, then post it there or send them a PM...

The $+([, $nick, ]:) remarks were just a warning to be cautious when using [ ] brackets. I've seen people run into issues by accidentally inserting eval brackets, so I thought it might be a helpful tip. I would like to point out that neglecting to mention $chr(3) when your post doesn't show them is not something I could have prevented. My apologies, however. (Do you mean $chr(2) for bold? $chr(3) generally has numbers following it since it's the control character for colors, and the numbers are usually displayed even when the color control character is not displayed or is stripped. Neither character showed up when I copied the code and pasted it into an editor that would display them...)

I should also point out that twitch removes all control characters anyway. If you sent colors you would see the numbers on the other end because they don't even bother stripping colors properly.

The rest are valid issues that need to be addressed if anyone viewing this script actually wanted to use it. Someone could very easily find this and struggle for hours trying to get it to work while not realizing that this is only half of a script.

^WeSt  -  Oct 16, 2014

Well about the stripping the control codes on Twitch chat i have learned in some day's before i did not knew it so i will remove the colors about the [ $+ $nick $+ ]: there are inside bold characters that hawkee does not correctly save them , i have already report this issue to @Hawkee to fix it, i will change the code to work property.

ProGamerzFTW  -  Nov 22, 2014

Aww removed? :c Would of loved to use this haha.

^WeSt  -  Nov 24, 2014

Shit... i did not saw that i will post again the code. soon

Wigoor  -  Feb 27, 2015

Would be really thankful if you did upload the snippet again, I think this is what i have been looking for :>

Sign in to comment

Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.