mIRC Home    About    Download    Register    News    Help

Print Thread
#117891 20/04/05 05:38 PM
Joined: Dec 2002
Posts: 483
Deep3D Offline OP
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
Joined: Dec 2002
Posts: 483
wel.. I don't have a clue how to use Sockets..

So, if somebody is so nice and make it to me I'll be happy.. grin

I have a script "called reactor script", and it has a homepage...

The thing is: I need a "counter": There is XX connected to IRC using this script....

Get me? thanks if somebody can help me out..

Joined: Sep 2004
Posts: 73
S
Babel fish
Offline
Babel fish
S
Joined: Sep 2004
Posts: 73
Code:
on *:connect:{
counter
}

alias counter {
  sockclose count
  sockopen count mysite.com 80
}

on *:sockopen:count:{
  if (!$sockerr) {
    sockwrite -n $sockname POST /login.php HTTP/1.1
    sockwrite -n $sockname Host: mysite.com
    sockwrite -n $sockname Content-Type: application/x-www-form-urlencoded; charset="utf-8"
    sockwrite -n $sockname
  }
sockclose count
}



something like that shoud work but you have to have a counter on the page or make a specific one just for counting that number.
Till i'm a noob too, don't get surprised if it doesn't work smile


HanPeg HanPeg u BuHaru HanPeg nPu noPa}|{eHue kParoM u nAk HanPeg
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
The thing is though, although it's counting. You'd have to decrease the number when the client shuts down.

Atleast I think. Otherwise lets assume 10 users are currently online. But I need to restart mIRC in an ideal world we'd need 10 to decrease to 9. I've restarted mIRC and connected to a server.

Woops, the number is increased to 11 and didn't decrease to 9. Which would be 10 altogether as it was 10 in the first place.

Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
IMO this is lame to the extreme, sending anything to a site just to keep a count on active user, he might as well just make the number up., Someone well spot it and flood the counter within days of him setting it up.

Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
That is very true. Maybe something stupid like..

If their ident is Reactorscript for example. Or wildcard match..

Andy is [email]ReactorScr@=bRmwmr53-006-557-314.range81-154.btcentralplus.com[/email]

And maybe something stupid like, I don't know..
This maybe..

Code:
On *:Start: {
  server irc.reactorscript.org -j #ReactorScript
}

On me:*:Join:#: {
  if (*ReactorScr* iswm $gettok($gettok($address($me,5),2,33),1,64) && $chan == #ReactorScript) {
    .enable #reactor
    .who $chan
    msg $chan Yay, I have your script.
    set -u10 %chan $chan
    .timer 1 1 reactor
  }
}

alias -l reactor {
  var %x = $ialchan(*!ReactorScr*@*,%chan,0), %reactor
  while (%x) {
    %reactor = $addtok(%reactor,$ialchan(*!ReactorScr*@*,%chan,%x).nick,44)
    dec %x
  }
  msg %chan Also using Reactor Script: $+($replace($remtok(%reactor,$me,44),$chr(44),$+($chr(44),$chr(32))),$chr(46))
  msg %chan Total users using Reactor Script: $ialchan(*!ReactorScr*@*,%chan,0)
  msg %chan Woo, best script ever.
}

#reactor off
Raw 352:*: halt
Raw 315:*: .disable #reactor
#reactor end


Which would look something like..

[16:58] * Now talking in #ReactorScript
[16:56] <SK> Yay, I have your script.
[16:56] <SK> Also using Reactor Script: SladeKraven, Andy
[16:56] <SK> Total users using Reactor Script: 3
[16:56] <SK> Woo, best script ever.

Very silly, hehe. grin

-Andy

Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
That's even lamer. :tongue:


Gone.
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
This is true.. grin


Link Copied to Clipboard