WhatPulse; User stats
Posted: Tue Nov 30, 2004 11:50 pm
[code]alias wpw {
if ($hget(whatpulse1) != $null) { hfree whatpulse1 }
hmake whatpulse1
set %wpwho $1-
set %wpmethod aline -n @WhatPulse
window -ae @WhatPulse
if ($sock(whatpulse1).to != $null) { sockclose whatpulse1 }
if (%wpproxy == $null) {
sockopen whatpulse1 whatpulse.org 80
}
else {
sockopen whatpulse1 %wpproxy %wpproxyport
}
}
on *:sockopen:whatpulse1: {
if (%wpproxy == $null) {
sockwrite -n whatpulse1 GET /api/user.php?account= $+ %wpwho HTTP/1.1
}
else {
sockwrite -n whatpulse1 GET http://whatpulse.org/api/user.php?account= $+ %wpwho HTTP/1.1
}
sockwrite -n whatpulse1 Host: whatpulse.org
sockwrite -n whatpulse1 User-Agent: WhatPulse mIRC script
sockwrite -n whatpulse1
}
on *:sockread:whatpulse1: {
sockread %wptemp
wpsockparse1 %wptemp
}
alias -l wpsockparse1 {
if ($1 == W) {
hadd whatpulse1 $2 $3-
}
if ($1- == X END) {
%wpmethod AccountName: $hget(whatpulse1, AccountName)
%wpmethod Country: $hget(whatpulse1, Country)
%wpmethod DateJoined: $hget(whatpulse1, DateJoined)
%wpmethod Homepage: $hget(whatpulse1, Homepage)
%wpmethod LastPulse: $hget(whatpulse1, LastPulse)
%wpmethod Pulses: $hget(whatpulse1, Pulses)
%wpmethod TotalKeyCount: $hget(whatpulse1, TotalKeyCount)
%wpmethod TotalMouseClicks: $hget(whatpulse1, TotalMouseClicks)
%wpmethod AvKeysPerPulse: $hget(whatpulse1, AvKeysPerPulse)
%wpmethod AvClicksPerPulse: $hget(whatpulse1, AvClicksPerPulse)
%wpmethod AvKPS: $hget(whatpulse1, AvKPS)
%wpmethod AvCPS: $hget(whatpulse1, AvCPS)
%wpmethod Rank: $hget(whatpulse1, Rank)
%wpmethod TeamID: $hget(whatpulse1, TeamID)
%wpmethod TeamName: $hget(whatpulse1, TeamName)
%wpmethod TeamMembers: $hget(whatpulse1, TeamMembers)
%wpmethod TeamKeys: $hget(whatpulse1, TeamKeys)
%wpmethod TeamDescription: $hget(whatpulse1, TeamDescription)
%wpmethod TeamDateFormed: $hget(whatpulse1, TeamDateFormed)
%wpmethod RankInTeam: $hget(whatpulse1, RankInTeam)
%wpmethod -----------------------------------------------------
sockclose whatpulse1
unset %wpwho
unset %wpmethod
unset %wptemp
}
}[/code]
Just modified the script used to get your own stats, big and bulky because im awkward <img src=\'http://www.killanet.net/forum3/public/s ... /smile.gif\' class=\'bbc_emoticon\' alt=\':)\' /> ;; Usage /wpw <nick> (will not say if nick is invalid etc)
if ($hget(whatpulse1) != $null) { hfree whatpulse1 }
hmake whatpulse1
set %wpwho $1-
set %wpmethod aline -n @WhatPulse
window -ae @WhatPulse
if ($sock(whatpulse1).to != $null) { sockclose whatpulse1 }
if (%wpproxy == $null) {
sockopen whatpulse1 whatpulse.org 80
}
else {
sockopen whatpulse1 %wpproxy %wpproxyport
}
}
on *:sockopen:whatpulse1: {
if (%wpproxy == $null) {
sockwrite -n whatpulse1 GET /api/user.php?account= $+ %wpwho HTTP/1.1
}
else {
sockwrite -n whatpulse1 GET http://whatpulse.org/api/user.php?account= $+ %wpwho HTTP/1.1
}
sockwrite -n whatpulse1 Host: whatpulse.org
sockwrite -n whatpulse1 User-Agent: WhatPulse mIRC script
sockwrite -n whatpulse1
}
on *:sockread:whatpulse1: {
sockread %wptemp
wpsockparse1 %wptemp
}
alias -l wpsockparse1 {
if ($1 == W) {
hadd whatpulse1 $2 $3-
}
if ($1- == X END) {
%wpmethod AccountName: $hget(whatpulse1, AccountName)
%wpmethod Country: $hget(whatpulse1, Country)
%wpmethod DateJoined: $hget(whatpulse1, DateJoined)
%wpmethod Homepage: $hget(whatpulse1, Homepage)
%wpmethod LastPulse: $hget(whatpulse1, LastPulse)
%wpmethod Pulses: $hget(whatpulse1, Pulses)
%wpmethod TotalKeyCount: $hget(whatpulse1, TotalKeyCount)
%wpmethod TotalMouseClicks: $hget(whatpulse1, TotalMouseClicks)
%wpmethod AvKeysPerPulse: $hget(whatpulse1, AvKeysPerPulse)
%wpmethod AvClicksPerPulse: $hget(whatpulse1, AvClicksPerPulse)
%wpmethod AvKPS: $hget(whatpulse1, AvKPS)
%wpmethod AvCPS: $hget(whatpulse1, AvCPS)
%wpmethod Rank: $hget(whatpulse1, Rank)
%wpmethod TeamID: $hget(whatpulse1, TeamID)
%wpmethod TeamName: $hget(whatpulse1, TeamName)
%wpmethod TeamMembers: $hget(whatpulse1, TeamMembers)
%wpmethod TeamKeys: $hget(whatpulse1, TeamKeys)
%wpmethod TeamDescription: $hget(whatpulse1, TeamDescription)
%wpmethod TeamDateFormed: $hget(whatpulse1, TeamDateFormed)
%wpmethod RankInTeam: $hget(whatpulse1, RankInTeam)
%wpmethod -----------------------------------------------------
sockclose whatpulse1
unset %wpwho
unset %wpmethod
unset %wptemp
}
}[/code]
Just modified the script used to get your own stats, big and bulky because im awkward <img src=\'http://www.killanet.net/forum3/public/s ... /smile.gif\' class=\'bbc_emoticon\' alt=\':)\' /> ;; Usage /wpw <nick> (will not say if nick is invalid etc)