Thu, 27 May 2021 20:25:24 -0500
Change the default irc server to libera.chat
This seems to make the most sense for users right now as many many channels have migrated away from freenode with many of them moving to libera.
Testing Done:
Compile only.
Reviewed at https://reviews.imfreedom.org/r/675/
| 2086 | 1 | /* This file is part of the Project Athena Zephyr Notification System. |
| 2 | * It contains source for the ZSendPacket function. | |
| 3 | * | |
| 4 | * Created by: Robert French | |
| 5 | * | |
| 6 | * Copyright (c) 1987,1991 by the Massachusetts Institute of Technology. | |
| 7 | * For copying and distribution information, see the file | |
|
31294
73607ab89c6f
Remove trailing whitespace
Richard Laager <rlaager@pidgin.im>
parents:
15435
diff
changeset
|
8 | * "mit-copyright.h". |
| 2086 | 9 | */ |
| 10 | ||
|
8792
b0645c9dc276
[gaim-migrate @ 9554]
Christian Hammond <chipx86@chipx86.com>
parents:
7475
diff
changeset
|
11 | #include "internal.h" |
| 10867 | 12 | #ifdef WIN32 |
| 13 | #include <winsock.h> | |
| 14 | #else | |
| 2086 | 15 | #include <sys/socket.h> |
| 10867 | 16 | #endif |
|
12424
af82a40f2488
[gaim-migrate @ 14731]
Richard Laager <rlaager@pidgin.im>
parents:
11105
diff
changeset
|
17 | |
|
af82a40f2488
[gaim-migrate @ 14731]
Richard Laager <rlaager@pidgin.im>
parents:
11105
diff
changeset
|
18 | static int wait_for_hmack(ZNotice_t *notice, void *uid); |
| 2086 | 19 | |
| 20 | Code_t ZSendPacket(packet, len, waitforack) | |
| 21 | char *packet; | |
| 22 | int len; | |
| 23 | int waitforack; | |
| 24 | { | |
| 25 | Code_t retval; | |
| 26 | struct sockaddr_in dest; | |
| 27 | ZNotice_t notice, acknotice; | |
|
31294
73607ab89c6f
Remove trailing whitespace
Richard Laager <rlaager@pidgin.im>
parents:
15435
diff
changeset
|
28 | |
| 2086 | 29 | if (!packet || len < 0) |
| 30 | return (ZERR_ILLVAL); | |
| 31 | ||
| 32 | if (len > Z_MAXPKTLEN) | |
| 33 | return (ZERR_PKTLEN); | |
|
31294
73607ab89c6f
Remove trailing whitespace
Richard Laager <rlaager@pidgin.im>
parents:
15435
diff
changeset
|
34 | |
| 2086 | 35 | if (ZGetFD() < 0) |
|
7475
987384816492
[gaim-migrate @ 8088]
Mark Doliner <markdoliner@pidgin.im>
parents:
2419
diff
changeset
|
36 | if ((retval = ZOpenPort((unsigned short *)0)) != ZERR_NONE) |
| 2086 | 37 | return (retval); |
| 38 | ||
| 39 | dest = ZGetDestAddr(); | |
|
31294
73607ab89c6f
Remove trailing whitespace
Richard Laager <rlaager@pidgin.im>
parents:
15435
diff
changeset
|
40 | |
| 2086 | 41 | if (sendto(ZGetFD(), packet, len, 0, (struct sockaddr *)&dest, |
| 42 | sizeof(dest)) < 0) | |
| 43 | return (errno); | |
| 44 | ||
| 45 | if (!waitforack) | |
| 46 | return (ZERR_NONE); | |
| 47 | ||
| 48 | if ((retval = ZParseNotice(packet, len, ¬ice)) != ZERR_NONE) | |
| 49 | return (retval); | |
|
31294
73607ab89c6f
Remove trailing whitespace
Richard Laager <rlaager@pidgin.im>
parents:
15435
diff
changeset
|
50 | |
| 2419 | 51 | retval = Z_WaitForNotice (&acknotice, wait_for_hmack, ¬ice.z_uid, |
| 2086 | 52 | HM_TIMEOUT); |
| 53 | if (retval == ETIMEDOUT) | |
| 54 | return ZERR_HMDEAD; | |
| 55 | if (retval == ZERR_NONE) | |
| 56 | ZFreeNotice (&acknotice); | |
| 57 | return retval; | |
| 58 | } | |
| 59 | ||
|
12424
af82a40f2488
[gaim-migrate @ 14731]
Richard Laager <rlaager@pidgin.im>
parents:
11105
diff
changeset
|
60 | static int wait_for_hmack(ZNotice_t *notice, void *uid) |
| 2086 | 61 | { |
|
12424
af82a40f2488
[gaim-migrate @ 14731]
Richard Laager <rlaager@pidgin.im>
parents:
11105
diff
changeset
|
62 | return (notice->z_kind == HMACK && ZCompareUID(¬ice->z_uid, (ZUnique_Id_t *)uid)); |
| 2086 | 63 | } |