Raised This Month: $ Target: $400
 0% 

How to log output of a server command?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Cader
Senior Member
Join Date: Mar 2007
Old 12-05-2009 , 23:09   How to log output of a server command?
Reply With Quote #1

Hello,

I want to log the output of any server console command.

I have tried this one but didn't work :

new cmdOutput = server_cmd("status")

and there was nothing in the variable.

Any ideas?
Cader is offline
bibu
Veteran Member
Join Date: Sep 2010
Old 05-24-2014 , 05:29   Re: How to log output of a server command?
Reply With Quote #2

I am also looking for something like that.
But only message which is send to the server not client actually.

Something like this:

Quote:
] banid
Usage: banid <minutes> <uniqueid or #userid> { kick }
Use 0 minutes for permanent
I would like to get that output. Seems like plugin_log doesn't work in this case. I read that it is maybe possible with Orpheu by hooking Log_Printf. And that again requires a signature file and I am unsure if it would work.
__________________
Selling tons of my own private works.
Accepting paid work for clans and communities.
Don't hesitate to contact me.
bibu is offline
bibu
Veteran Member
Join Date: Sep 2010
Old 06-07-2014 , 05:43   Re: How to log output of a server command?
Reply With Quote #3

bümp
__________________
Selling tons of my own private works.
Accepting paid work for clans and communities.
Don't hesitate to contact me.
bibu is offline
Bos93
Veteran Member
Join Date: Jul 2010
Old 06-07-2014 , 12:30   Re: How to log output of a server command?
Reply With Quote #4

client-side
__________________
Bos93 is offline
Send a message via ICQ to Bos93 Send a message via Skype™ to Bos93
bibu
Veteran Member
Join Date: Sep 2010
Old 06-07-2014 , 13:41   Re: How to log output of a server command?
Reply With Quote #5

Quote:
Originally Posted by Bos93 View Post
client-side
Even if it is custom created command from a metamod module?
I tried to hook it with register_srvcmd but it blocks the whole function then..
__________________
Selling tons of my own private works.
Accepting paid work for clans and communities.
Don't hesitate to contact me.
bibu is offline
Bos93
Veteran Member
Join Date: Jul 2010
Old 06-07-2014 , 15:55   Re: How to log output of a server command?
Reply With Quote #6

Quote:
Even if it is custom created command from a metamod module?
You can. hook with FM_ClientCommand + read_argv.
__________________
Bos93 is offline
Send a message via ICQ to Bos93 Send a message via Skype™ to Bos93
bibu
Veteran Member
Join Date: Sep 2010
Old 06-07-2014 , 16:38   Re: How to log output of a server command?
Reply With Quote #7

Quote:
Originally Posted by Bos93 View Post
You can. hook with FM_ClientCommand + read_argv.
Anything in console written gets logged. But not the output of the command which is used actually.
Maybe Log_Printf works? But I am almost giving it up now..
__________________
Selling tons of my own private works.
Accepting paid work for clans and communities.
Don't hesitate to contact me.
bibu is offline
Bos93
Veteran Member
Join Date: Jul 2010
Old 06-07-2014 , 17:05   Re: How to log output of a server command?
Reply With Quote #8

Log_Printf only for game dll messages. https://forums.alliedmods.net/showpo...2&postcount=13
__________________
Bos93 is offline
Send a message via ICQ to Bos93 Send a message via Skype™ to Bos93
bibu
Veteran Member
Join Date: Sep 2010
Old 06-07-2014 , 20:01   Re: How to log output of a server command?
Reply With Quote #9

Quote:
Originally Posted by Bos93 View Post
Log_Printf only for game dll messages. https://forums.alliedmods.net/showpo...2&postcount=13
Yeah looks like.
Gotta give up on this then...
__________________
Selling tons of my own private works.
Accepting paid work for clans and communities.
Don't hesitate to contact me.
bibu is offline
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Stockholm, Sweden
Old 06-07-2014 , 21:06   Re: How to log output of a server command?
Reply With Quote #10

Just make a socket request like SourceQuery, but directly from the server.
That does require you to send the actual command yourself though.
__________________

Last edited by Black Rose; 06-07-2014 at 21:07.
Black Rose 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 13:02.


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