| 907 | } |
| 908 | |
| 909 | void DedicatedSocketputs(char *str) { |
| 910 | char newstr[300]; |
| 911 | char buf[2]; |
| 912 | |
| 913 | memset(newstr, 0, 300); |
| 914 | int len = strlen(str); |
| 915 | for (int i = 0; i < len; i++) { |
| 916 | if (str[i] == '\n') { |
| 917 | strcat(newstr, "\r\n"); |
| 918 | } else { |
| 919 | buf[0] = str[i]; |
| 920 | buf[1] = '\0'; |
| 921 | strcat(newstr, buf); |
| 922 | } |
| 923 | } |
| 924 | |
| 925 | dedicated_socket *conn; |
| 926 | conn = Head_sock; |
| 927 | while (conn) { |
| 928 | if (conn->validated) { |
| 929 | send(conn->sock, newstr, strlen(newstr) + 1, 0); |
| 930 | } |
| 931 | conn = conn->next; |
| 932 | } |
| 933 | } |
| 934 | |
| 935 | dedicated_socket *DedicatedLogoutTelnet(dedicated_socket *conn) { |
| 936 | // user is no longer valid (so we don't attempt to send them a message |
no outgoing calls
no test coverage detected