Raised This Month: $ Target: $400
 0% 

Upload file from client


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
kurian
Member
Join Date: Aug 2005
Old 06-08-2007 , 05:19   Upload file from client
Reply With Quote #1

I want the client to be able to save his CFG file on the server.
http://forums.alliedmods.net/showthr...935#post486935
How do I upload a file from the client side?

If thats not possible then can I atleast ask them to exec the cfg file and capture all the commands sent to the server and write the file on the server side ?
__________________
[IMG]http://img267.**************/img267/8526/userbarjg9.gif[/IMG]
kurian is offline
_Master_
Senior Member
Join Date: Dec 2006
Old 06-08-2007 , 05:50   Re: Upload file from client
Reply With Quote #2

I don't think that would work. Commands like "bind", "alias", etc WON'T be sent to the server as they are handled client-side.
_Master_ is offline
hlstriker
Green Gaben
Join Date: Mar 2006
Location: OH-IO!
Old 06-08-2007 , 12:59   Re: Upload file from client
Reply With Quote #3

I don't think any of your question is possible.

[offtopic]The image in your sig is not slow connection friendly at all...[/offtopic]
hlstriker is offline
stupok
Veteran Member
Join Date: Feb 2006
Old 06-08-2007 , 14:16   Re: Upload file from client
Reply With Quote #4

This is definitely doable. However, I can't figure out a way to send information from the client to the server that isn't incredibly annoying.

If you just say each line of your cfg file, that can be captured and recorded. Maybe you could do a setinfo, like setinfo crap "lots of text here" but I'm sure there's a limit to how many characters can be in the setinfo.
stupok is offline
pRED*
Join Date: Dec 2006
Old 06-08-2007 , 17:38   Re: Upload file from client
Reply With Quote #5

What about

setinfo numoflines 8
setinfo line0 "somestuff goes here"
setinfo line1 "more stuff"
..
..
setinfo line7 "end of stuff's"

And then on server side create a for loop
Code:
new String[8] get_user_info(id,"numofline",String,7) new num=str_to_num(String) for (new i=0; i<num; i++) {       new tempstring[100]       new linenum[10]       format(linenum,9,"line%i",i)       get_user_info(id,linenum,tempstring,99)       //do stuff with line here }
pRED* is offline
_Master_
Senior Member
Join Date: Dec 2006
Old 06-08-2007 , 19:13   Re: Upload file from client
Reply With Quote #6

Then you should be prepared for "Info string length exceeded" !!!
Oh, and another thing: How do you suppose those setinfo values would be filled ?!?

Last edited by _Master_; 06-08-2007 at 19:16.
_Master_ is offline
pRED*
Join Date: Dec 2006
Old 06-08-2007 , 19:40   Re: Upload file from client
Reply With Quote #7

Well I was hoping that stupok had an answer for that.. I was just expanding on what he said..
pRED* is offline
stupok
Veteran Member
Join Date: Feb 2006
Old 06-08-2007 , 21:48   Re: Upload file from client
Reply With Quote #8

Quote:
Originally Posted by stupok69 View Post
... I can't figure out a way to send information from the client to the server that isn't incredibly annoying. ...
stupok is offline
kurian
Member
Join Date: Aug 2005
Old 06-08-2007 , 23:15   Re: Upload file from client
Reply With Quote #9

Quote:
Originally Posted by pRED* | NZ View Post
What about

setinfo numoflines 8
setinfo line0 "somestuff goes here"
setinfo line1 "more stuff"
..
..
setinfo line7 "end of stuff's"

That wont be necessary as I only need to get the clients cvars.
I'll just put everysingle CVAR i can think of in a 2 dimentional string array.
And loop through it with get_user_info and write it as a file on the server.

Anyone have a list of everysingle cvar ?
__________________
[IMG]http://img267.**************/img267/8526/userbarjg9.gif[/IMG]
kurian is offline
kurian
Member
Join Date: Aug 2005
Old 06-08-2007 , 23:15   Re: Upload file from client
Reply With Quote #10

Let me put it this way instead... Is therer any cvar that ISNT in config.cfg ?

And what about commands. Things like +mlook and bind ? How do i get the bind status of the keys ?
__________________
[IMG]http://img267.**************/img267/8526/userbarjg9.gif[/IMG]

Last edited by kurian; 06-08-2007 at 23:20.
kurian is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:36.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode