… | |
… | |
3 | * Rights to this code are documented in doc/pod/license.pod. |
3 | * Rights to this code are documented in doc/pod/license.pod. |
4 | * |
4 | * |
5 | * Copyright © 2005-2007 Atheme Project (http://www.atheme.org) |
5 | * Copyright © 2005-2007 Atheme Project (http://www.atheme.org) |
6 | */ |
6 | */ |
7 | |
7 | |
8 | static char const rcsid[] = "$Id: packet.C,v 1.5 2007/08/30 19:56:26 pippijn Exp $"; |
8 | static char const rcsid[] = "$Id: packet.C,v 1.6 2007/09/05 11:23:15 pippijn Exp $"; |
9 | |
9 | |
10 | #include "atheme.h" |
10 | #include "atheme.h" |
11 | #include "uplink.h" |
11 | #include "uplink.h" |
12 | #include "datastream.h" |
12 | #include "datastream.h" |
13 | #include "connection.h" |
13 | #include "connection.h" |
… | |
… | |
24 | { |
24 | { |
25 | bool wasnonl; |
25 | bool wasnonl; |
26 | char parsebuf[BUFSIZE + 1]; |
26 | char parsebuf[BUFSIZE + 1]; |
27 | int count; |
27 | int count; |
28 | |
28 | |
29 | wasnonl = cptr->flags & connection_t::CF_NONEWLINE ? true : false; |
29 | wasnonl = cptr->flags & CF_NONEWLINE ? true : false; |
30 | count = recvq_getline (cptr, parsebuf, sizeof parsebuf - 1); |
30 | count = recvq_getline (cptr, parsebuf, sizeof parsebuf - 1); |
31 | if (count <= 0) |
31 | if (count <= 0) |
32 | return; |
32 | return; |
33 | cnt.bin += count; |
33 | cnt.bin += count; |
34 | /* ignore the excessive part of a too long line */ |
34 | /* ignore the excessive part of a too long line */ |
… | |
… | |
76 | { |
76 | { |
77 | /* add our server */ |
77 | /* add our server */ |
78 | |
78 | |
79 | if (cptr == curr_uplink->conn) |
79 | if (cptr == curr_uplink->conn) |
80 | { |
80 | { |
81 | cptr->flags = connection_t::CF_UPLINK; |
81 | cptr->flags = CF_UPLINK; |
82 | cptr->recvq_handler = irc_recvq_handler; |
82 | cptr->recvq_handler = irc_recvq_handler; |
83 | me.connected = true; |
83 | me.connected = true; |
84 | /* no SERVER message received */ |
84 | /* no SERVER message received */ |
85 | me.recvsvr = false; |
85 | me.recvsvr = false; |
86 | |
86 | |