This is the calling code
Quote:
set %statnick $1-
sockopen idlelevel wrathirc.cjb.net 80
sockclose idlelevel
notice $nick 14[2 $+ %statnick $+ 14] %class | %alignment | %level
unset %statnick


What does it do: set %statnick to $nick, open and immediately close a socket, notice someone a %level that isn't set and unset %statnick.

What you need to realize is that connecting to a website can take seconds or even days. That is a lot longer than the time between the /sockopen and the /sockclose. Once you understand how the whole socket opening writing and reading works, then you can start doing stuff.

You can only send the notice once all required info from that website is transferred. The easiers way is in the on SOCKCLOSE event, since that means the entire web page is sent. You could also parse the web site and once you have all (3) levels you notice the user and /sockclose immediately.

The website sends HTML and in packets. This means that one line gotten is not guaranteed to be a complete line. On some websites one line might be a lot longer than what mIRC can handle too. Not on this website afaics.

Make sure to do read up some mIRC socket tutorials to understand what is going on. Socket scripting is not that easy, so be prepared to read a lot of documentation and spend a lot of time in debugging.