cvs: php4 /ext/ircg ircg.c

From: Date: Mon, 10 Dec 2001 13:17:35 +0000
Subject: cvs: php4 /ext/ircg ircg.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-8555@lists.php.net to get a copy of this message
sas Mon Dec 10 08:17:35 2001 EDT Modified files: /php4/ext/ircg ircg.c Log: Add a generic disconnect format message which is written to the file upon termination of the connection and free file messages appropiately. Index: php4/ext/ircg/ircg.c diff -u php4/ext/ircg/ircg.c:1.120 php4/ext/ircg/ircg.c:1.121 --- php4/ext/ircg/ircg.c:1.120 Mon Dec 10 05:04:11 2001 +++ php4/ext/ircg/ircg.c Mon Dec 10 08:17:35 2001 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: ircg.c,v 1.120 2001/12/10 10:04:11 sas Exp $ */ +/* $Id: ircg.c,v 1.121 2001/12/10 13:17:35 sas Exp $ */ /* {{{ includes */ @@ -98,6 +98,7 @@ FMT_MSG_MODE_OP, FMT_MSG_BANLIST, FMT_MSG_BANLIST_END, + FMT_MSG_DISCONNECTED, NO_FMTS }; /* }}} */ @@ -237,7 +238,8 @@ "%f sets voice flag of %t to %m on %c<br />", "%f sets channel operator flag of %t to %m on %c<br />", "banned from %c: %m<br />", - "end of ban list for %c<br />" + "end of ban list for %c<br />", + "You have been disconnected<br />" }; /* }}} */ @@ -327,6 +329,12 @@ shutdown(conn->fd, 2); } if (conn->file_fd != -1) { + smart_str m = {0}; + + format_msg(MSG(conn, FMT_MSG_DISCONNECTED), NULL, NULL, NULL, NULL, + &m, conn->conn.username, conn->conn.username_len); + msg_send(conn, &m); + close(conn->file_fd); conn->file_fd = -1; } @@ -677,6 +685,7 @@ if (conn->file_fd != -1) { write(conn->file_fd, msg->c, msg->len); + smart_str_free_ex(msg, 1); return; }

« previous php.cvs (#8555) next »