Jump to content

irc.au3, detect disconnection?


Vert
 Share

Recommended Posts

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
Link to comment
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  

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...