Jump to content
Sign in to follow this  

irc.au3, detect disconnection?

Recommended Posts



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?



Edited by Vert

Share this post

Link to post
Share on other sites

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

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  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.