Server programming |
by Icefex
on 01/21/2007 14:33, 10 messages, last message: 01/28/2007 04:09, 1291 views, last view: 04/28/2024 04:04 |
|
Is it possible to programm a Sauerbraten server into a CGI with C,C++(or other languages) or as a PHP script?
|
|
Board Index
|
|
#1: Re: .. |
by Icefex
on 01/21/2007 14:41, refers to #1
|
|
How can I make it?
reply to this message
|
|
#2: Re: .. |
by Drakas
on 01/21/2007 15:27, refers to #1
|
|
It is possible, yes.
But why would you do it as a CGI?
By the way, if doing with PHP, you will experience massive lags because of how much data control is involved!
http://www.slash7.com/images/stories/help_vampire.png
http://www.slash7.com/pages
reply to this message
|
|
#3: Re: .. |
by Icefex
on 01/21/2007 16:40, refers to #2
|
|
I would host it on an non root server.
reply to this message
|
|
#4: Re: .. |
by Icefex
on 01/21/2007 17:40, refers to #3
|
|
Has anyone a tip or a little bit of code for me.(I don't know how to start)
reply to this message
|
|
#5: Re: .. |
by Drakas
on 01/21/2007 17:49, refers to #4
|
|
erm, google.com <- "how to create a sauerbraten server as a cgi"
reply to this message
|
|
#6: Re: .. |
by Icefex
on 01/21/2007 19:02, refers to #5
|
|
I don't wan't exploits.
reply to this message
|
|
#7: .. |
by Der/Nalia
on 01/21/2007 19:04
|
|
it seems to me that you want line for line help. why don't you use someone else's server. and change it to however you need?
reply to this message
|
|
#8: Re: .. |
by Aardappel_
on 01/21/2007 22:04, refers to #2
|
|
Haha, great article about the "help vampire"... very recognisable. Though I think she needs to add the special class of "Answer vampire", people that operate along the same line but don't actually have any answers and are out to misinform serious people.
reply to this message
|
|
#9: .. |
by GNU_Jeffz
on 01/28/2007 04:04
|
|
What is the original question?
To me it reads "how do I turn the sauerbraten server into a cgi script".
This is simple, edit src/engine/main.cpp and add 6 lines, why was this so hard for everyone else? ;)
here is a diff:
--- old-main.cpp 2007-01-28 13:59:59.000000000 +1100
+++ main.cpp 2007-01-28 14:02:17.000000000 +1100
@@ -319,6 +319,11 @@ int main(int argc, char **argv)
#endif
#endif
#endif
+ if(argc == 1)
+ {
+ puts("Content-Type: text/plain\r\nHi, I'm sauerbraten as a cgi!");
+ return EXIT_SUCCESS;
+ }
bool dedicated = false;
int fs = SDL_FULLSCREEN, par = 0, depth = 0, bpp = 0, fsaa = 0;
reply to this message
|
|
#10: .. |
by GNU_Jeffz
on 01/28/2007 04:09
|
|
ok, ok, 5 lines, counted incorrectly when I was proof reading my post.
Icefex, obviously you need to ask a more intelligent question.
reply to this message
|
|
|
Board Index
|
|