Sign in to follow this  
Followers 0
Vert

irc.au3, detect disconnection?

3 posts in this topic

#1 ·  Posted (edited)

Hello,

I am currently using the IRC UDF, irc.au3. You can find the original topic for this UDF here: http://www.autoitscript.com/forum/index.php?showtopic=43515

Is there way to detect if you have been disconnected from the IRC server? Also, is there a way to manually disconnect from the server?

Regards,

Vert

Edited by Vert

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

You got an socket identifier by start connection with _IRCConnect(). And in an loop you check receive from this.

$sock = _IRCConnect($server, $port, $nick)
While 1
    $recv = TCPRecv($sock, 8192)
    If @error Then ; server disconnected
    ;...

You'll also quit connection:

$msg = '' ; optional
TCPSend($sock, "QUIT :" & $msg & @CRLF)
Edited by BugFix

Best Regards BugFix  

Share this post


Link to post
Share on other sites

Much appreciated - thanks a lot.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0