1. Hey Guest, are you looking for a place to host your IRC related project? Then check out the Resource Manager on IRCForums! Click the resources tab above this notice!
  2. Hello Guest, are you new to IRCForums? Why not introduce yourself in the introduction forum!
  3. We have updated the layout of our forums. Please see this thread for more information.

[MSL] IRCFORUMS Top 10 Poster Socket

Discussion in 'Script Gallery (Depreciated)' started by Napa182, May 14, 2012.

  1. Offline

    Napa182 Moderator

    Member Since:
    Dec 18, 2011
    Message Count:
    222
    Likes Received:
    83
    Trophy Points:
    56
    This is just a socket that I made awhile back an now had to update it as the html has changed.
    What this socket does is looks-up the top 10 posters on www.ircforums.net

    Copy/Paste into a new remote of ur bot
    Trigger is @top10posters

    Example:
    Enjoy....
    Code (mirc):
    on $*:text:/^@top10posters$/iS:#:{
      if (!%tp) {
        if ($sock(tp)) sockclose tp
        sockopen tp www.ircforums.net 80
        sockmark tp msg #
        msg # "Looking up the top 10 posters on ircforums"
      }
    }
    on *:load: {
      echo 12 -a You Have Just Loaded Napa182's ircforums top 10 posters snippet
      echo 15 -a An Irc.EzzyChat.com Production
    }
    on *:sockopen:tp: {
      sockwrite -nt tp GET /index.php?members HTTP/1.1
      sockwrite -nt tp Host: $+($sock(tp).addr,$str($crlf,2))
    }
    on *:sockread:tp: {
      var %post | sockread %post
      if (%tp = 10) {
        $sock(tp).mark $regsubex($str(.,$hget(pt,0).item),/(.)/g,$hget(pt,\n) $chr(32))
        sockclose tp
      }
      if (*<li><a href="members/* iswm %post) { inc -u10 %tp
        hadd -mu10 pt %tp $+($ord(%tp),.) $regsubex(%post,/<[^>]*>|\x09/g,$chr(32))
      }
    }
    Bertrum and GrimReaper like this.
  2. Offline

    Trixar_za GigIRC

    Member Since:
    Dec 18, 2011
    Message Count:
    1,295
    Likes Received:
    182
    Trophy Points:
    178
    What I find most impressive about your scripts is how simple you make them. I haven't written anything in MSL for years and I can still understand how you did it.
    Bertrum likes this.
  3. Offline

    Napa182 Moderator

    Member Since:
    Dec 18, 2011
    Message Count:
    222
    Likes Received:
    83
    Trophy Points:
    56
    lol thank you Trixar_za. I try to make them easy for people to read an understand.
  4. Online

    GrimReaper Recruit

    Member Since:
    Feb 26, 2012
    Message Count:
    23
    Likes Received:
    8
    Trophy Points:
    18
    Very nicely coded Napa, I wish I was that good with regsubex and stuff. lol
  5. Offline

    Bertrum ParadoxIRC

    Member Since:
    Dec 17, 2011
    Message Count:
    1,821
    Likes Received:
    243
    Trophy Points:
    188
    I think I have to update mine to this, I have an early version of the script now that isn't working anymore :(

Share This Page