mIRC Home    About    Download    Register    News    Help

Print Thread
Help with tracking messages? #244071 21/01/14 06:28 PM
Joined: Jan 2014
Posts: 4
U
UpcomingChris Offline OP
Self-satisified door
OP Offline
Self-satisified door
U
Joined: Jan 2014
Posts: 4
basically i want a bot that keeps track of how many messages each person in the chat has sent. So that i can pull them back with something like !Messages (username) and it will give me the ammount of messages that person has sent since the script has been active, also a !resetMessages (username) would be good, But i'm not sure how to go about doing this.. Any help would be appreciated

Re: Help with tracking messages? [Re: UpcomingChris] #244079 21/01/14 10:49 PM
Joined: Dec 2013
Posts: 779
N
Nillen Offline
Hoopy frood
Offline
Hoopy frood
N
Joined: Dec 2013
Posts: 779
This is untested, but should be what you're looking for.



Code:
alias -l add.msg {
writeini -n Messages.ini $1 Messages $calc($readini(Messages.ini,$1,Messages) + 1)
}

on $:text:!messages*:#: { 
if ($2 == $null) { msg $chan $nick has sent $readini(Messages.ini,$+(#,.,$nick),Messages) messages. | return }
else { msg $chan $2 has sent $readini(Messages.ini,$+(#,.,$2),Messages) messages. }
}

on *:text:*:#: { add.msg $+(#,.,$nick) }





Nillens @ irc.twitch.tv
Nillen @ irc.rizon.net
Re: Help with tracking messages? [Re: Nillen] #244092 23/01/14 11:07 AM
Joined: Jan 2014
Posts: 4
U
UpcomingChris Offline OP
Self-satisified door
OP Offline
Self-satisified door
U
Joined: Jan 2014
Posts: 4
Thanks!