All pastes #960337 Raw Edit

Miscellany

public text v1 · immutable
#960337 ·published 2008-03-28 00:57 UTC
rendered paste body
bind pub - !check dlx:whatson

proc dlx:whatson { nick host hand chan arg } {
        if { $chan == "#channel" } {
        set arg [string map { " " "_" } $arg]
        set gotrelease [regexp {[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]} $arg gotrelease release]

        if { $gotrelease } {
                set arg $release
        }

        set url "URL:HERE"
        set page [exec curl -s $url]

        regexp {Total@([0-9][0-9])} $page gottotal tcount
        regexp {QueryDate@([A-Za-z0-9.,]+)} $page gotddate ddate
        regexp {TimeNow@([0-9:]+)} $page gottimenow tnow

        putquick "PRIVMSG $nick :TOTAL-> $tcount"
        putquick "PRIVMSG $nick :DisplayDate-> $ddate"
        putquick "PRIVMSG $nick :TimeNow-> $tnow"
}
}