mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jan 2014
Posts: 4
U
Self-satisified door
OP Offline
Self-satisified door
U
Joined: Jan 2014
Posts: 4
First of all, I am a complete newbie when it comes to this language.

A friend gave me some code that track each users amount of messages sent through to Twitch.TV, I tried editing the code to track all messages total, not just individual people's,

Code:
ON 1:TEXT:!messagetotal*:#upcomingchris: {  
  msg $chan %linepointstotal total messages sent since 23/01/2014 $+
}

ON 1:TEXT:*:#upcomingchris: {
  if (%linepointstotal > 0) {
    INC %linepointstotal $+  1
  }

  if (%linepointstotal  < 1) {
    SET %linepointstotal  $+  1
  }
}


Any help?, i wan't to be able to type !messagetotal to display the total messages sent by everyone, i currently have it set up so !messages displays the total messages sent by the person that initiated the command, Any help is appreciated!

Joined: Dec 2013
Posts: 6
S
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
S
Joined: Dec 2013
Posts: 6
i would use a ini to track all messages send, you even could save it in total AND for every single person...

i would do it like:

Code:
 on *:text:*:#:{
writeini -n textamount.ini $+(#,.,totalmessages) messages $calc($readini(textamount.ini,$+(#,.,totalmessages),messages) $+(+ 1)) } 


this would add 1 number to the ini-file "textamount.ini" for the "user" "totalmessages" everytime something is written in your channel.

greetings

Joined: Jan 2014
Posts: 4
U
Self-satisified door
OP Offline
Self-satisified door
U
Joined: Jan 2014
Posts: 4
Thanks!


Link Copied to Clipboard