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
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

Joined: Dec 2013
Posts: 779
N
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
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