mIRC Home    About    Download    Register    News    Help

Print Thread
[Twitch] How many lines written in chat? #253796
06/07/15 11:27 PM
06/07/15 11:27 PM
Joined: Oct 2013
Posts: 16
S
ShuriStr Offline OP
Pikka bird
ShuriStr  Offline OP
Pikka bird
S

Joined: Oct 2013
Posts: 16
Hey there, I'd like to write a script saying "user" (Name in chat) has been writing "x" amount of lines in the chat when he/she subscribes, how do I do that? I have a file with logs from the chat and me thinking the "script" needs to count how many times "user" appears in the file.

How do I make this work? Any help would be appreciated.

Last edited by ShuriStr; 07/07/15 12:11 AM.
Re: [Twitch] How many lines written in chat? [Re: ShuriStr] #253799
07/07/15 02:24 AM
07/07/15 02:24 AM
Joined: Sep 2014
Posts: 259
S
Sakana Offline
Fjord artisan
Sakana  Offline
Fjord artisan
S

Joined: Sep 2014
Posts: 259
Read each line and use regex to search for their name. I guess you search for < $+ $nick $+ > and then increase a counter if there is a match

Re: [Twitch] How many lines written in chat? [Re: ShuriStr] #253802
07/07/15 06:22 AM
07/07/15 06:22 AM
Joined: Jun 2014
Posts: 248
B
Belhifet Offline
Fjord artisan
Belhifet  Offline
Fjord artisan
B

Joined: Jun 2014
Posts: 248
It seems like you'd want to have the totals stored somewhere ready to use instead of trying to call them on the fly which would be quite slow.

Re: [Twitch] How many lines written in chat? [Re: Sakana] #253806
07/07/15 12:17 PM
07/07/15 12:17 PM
Joined: Oct 2013
Posts: 16
S
ShuriStr Offline OP
Pikka bird
ShuriStr  Offline OP
Pikka bird
S

Joined: Oct 2013
Posts: 16
I see, I don't know how to write that script though, so if you or anyone else could lend a hand it would be very helpful.

Re: [Twitch] How many lines written in chat? [Re: ShuriStr] #253813
07/07/15 05:52 PM
07/07/15 05:52 PM
Joined: Dec 2013
Posts: 779
Sweden
N
Nillen Offline
Hoopy frood
Nillen  Offline
Hoopy frood
N

Joined: Dec 2013
Posts: 779
Sweden
Code:
Pseudo code LOG :

Someone writes
Check if user wrote before
If yes, increase value by 1, write value
Else write value 1

Pseudo code CHECK : 

Someone subs
Call log value
Message channel with log value?

Pseudo code CHECK v2 (Sakana) : 

Someone subs 
Call log file
Check entire log file for $nick matches
Message channel with log value?

Something like that.

You'll need the on text event, and some way to store it that you like. Note that this script is extremely inefficient to begin with as it will only take up unneccesary space and most likely have a redundant amount of users with <5 in value.


Nillens @ irc.twitch.tv
Nillen @ irc.rizon.net
Re: [Twitch] How many lines written in chat? [Re: Nillen] #253814
07/07/15 10:46 PM
07/07/15 10:46 PM
Joined: Oct 2013
Posts: 16
S
ShuriStr Offline OP
Pikka bird
ShuriStr  Offline OP
Pikka bird
S

Joined: Oct 2013
Posts: 16
I understand your point, I'm on the same line. I do really like the Pseudo V2 version.

If anyone has an idea how the code would look like feel free to suggest it since I'm not an expert on this situation.

Re: [Twitch] How many lines written in chat? [Re: ShuriStr] #253817
08/07/15 12:25 AM
08/07/15 12:25 AM
Joined: Jun 2014
Posts: 248
B
Belhifet Offline
Fjord artisan
Belhifet  Offline
Fjord artisan
B

Joined: Jun 2014
Posts: 248
If your talking about scanning an entire IRC log file this will become extremely slow, maybe even taking minutes--tens of minutes to complete. SCanning line by line of a 400 meg log ...yikes

Re: [Twitch] How many lines written in chat? [Re: Belhifet] #253818
08/07/15 01:04 AM
08/07/15 01:04 AM
Joined: Oct 2013
Posts: 16
S
ShuriStr Offline OP
Pikka bird
ShuriStr  Offline OP
Pikka bird
S

Joined: Oct 2013
Posts: 16
Yeah, it's not gonna happen, I want it immediately. Maybe throw the cmd? What do you guys think?

Re: [Twitch] How many lines written in chat? [Re: ShuriStr] #253830
08/07/15 08:30 PM
08/07/15 08:30 PM
Joined: Oct 2013
Posts: 16
S
ShuriStr Offline OP
Pikka bird
ShuriStr  Offline OP
Pikka bird
S

Joined: Oct 2013
Posts: 16
I'm still looking for a solution, any ideas or anyone that could help with a working script & explanation?