alias ubb {
var %f = c:\windows\cookies\user@ubbthreads[1].txt, %i = 1
if $isfile(%f) {
sockopen ubb forums.mirc.com 80
while $read(%f,%i) {
set %ubb.cookie %ubb.cookie $+($ifmatch,=,$read(%f,$calc(%i + 1)),;)
inc %i 9
}
}
else {
echo Sorry, couldn't find the user cookie.
}
}
On *:sockopen:ubb:{
sockwrite -tn ubb GET /ubbthreads.php HTTP/1.1
sockwrite -tn ubb Host: forums.mirc.com
sockwrite -tn ubb Cookie: %ubb.cookie
sockwrite -tn ubb Connection: close
sockwrite -tn ubb
}
On *:sockread:ubb:{
var %s
sockread %s
while $sockbr {
if $regex(%s,^\d\d/\d\d/\d\d\d\d \d\d:\d\d$) {
inc %ubb.pos
set %ubb.forum $replace(%ubb.pos,1,Latest News,2,General Discussion, $+ $&
3,mIRC Help,4,Connection Issues,5,Scripts & Popups, $+ $&
6,Feature Suggestions,7,Devoloper Forum,8,Bug Reports)
if %ubb.info {
echo 10 * %ubb.forum $+ : %ubb.info new posts. (last post at %s $+ ).
unset %ubb.info
}
}
elseif ?<font class="new">(?*)</font> iswm %s {
set %ubb.info $iif(%ubb.info,%ubb.info new threads;) $mid(%s,21,-8)
}
sockread %s
}
}
On *:sockclose:ubb: unset %ubb.*