4 #include "SDL_thread.h"
51 char *address = (
char*) address_in;
52 char *port = (
char*) port_in;
53 if (address == NULL) {
60 test.append( address );
61 if (test.compare(
"default" ) == 0) {
62 address =
"ant.infice.com";
90 hellomsg.append(
"Vegastrike-user" );
104 SDL_mutex *m = SDL_CreateMutex();
108 bool returner = status;
110 SDL_DestroyMutex( m );
120 if ( ( teststart =
start.find(
"\n" ) ) < std::string::npos ) {
122 if (teststart <
start.size()-2) {
123 for (
unsigned int soda = teststart+1; soda <
start.size(); soda++)
124 tempstr +=
start[soda];
125 while (
start.size() > teststart) {
126 std::string::iterator iter =
start.end();
134 unsigned int end =
start.size();
135 std::string hackedup;
136 bool open =
false, ignore2close =
false;
137 unsigned int fopend = 0;
138 unsigned int counter;
140 for (counter = 0; counter < end; counter++) {
142 if (
start[counter] ==
'=') {hackedup.append(
"\" " ); }
else if (
start[counter] ==
'>') {
144 start.replace( fopend, (counter+1)-fopend,
"" );
145 unsigned int offset = (counter+1)-fopend;
146 counter = counter-offset;
151 hackedup +=
start[counter];
153 }
else if (
start[counter] ==
'<') {
156 hackedup.append(
"\"" );
160 unsigned int ender =
start.size();
161 for (counter = 0; counter < ender; counter++)
162 if (
start[counter] ==
'\r') {
163 start.replace( counter, 1,
"" );
165 ender =
start.size();
170 if (tempstr.size() > 0) {
171 start.append( tempstr );
176 while ( ( asdf =
start.find(
"\n" ) ) < std::string::npos )
193 const int MAXBUF = 1000;
196 while ( ( stat =
getStatus( 0 ) ) ==
true ) {
197 bzero( buffer, MAXBUF );
199 if (::
INET_Recv( socket, buffer,
sizeof (buffer)-1 ) <= 0) {
210 if (::
INET_Read( socket, reinterpret_cast< char* > (&position),
sizeof (
POSpack) ) <= 0) {
228 ::SDL_CreateThread(
startThread, reinterpret_cast< void* > (
this) );
238 unsigned int x = instring.find(
"send " );
239 if (x == 0) instring.replace( 0, 5,
"" );
240 instring.append(
"\r\n" );
241 send( (
char*) instring.c_str(), instring.size() );
245 std::vector< std::string* >::iterator iter = d->begin();
247 if ( iter >= d->end() )
return;
248 if ( ( *(iter) )->compare(
"P" ) ) {
266 mmoc *looper =
reinterpret_cast< mmoc*
> (mmoc2use);