Raised This Month: $51 Target: $400
 12% 

Klippy's Webserver


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
PartialCloning
Senior Member
Join Date: Dec 2015
Old 11-02-2016 , 09:17   Klippy's Webserver
Reply With Quote #1

Can someone that knows how to compile modules compile https://github.com/rsKliPPy/webserver_amxx for windows?

It seems like an interesting module but does it cause any negative impact on the server's performance?
PartialCloning is offline
^SmileY
Veteran Member
Join Date: Jan 2010
Location: Brazil [<o>]
Old 11-02-2016 , 22:31   Re: Klippy's Webserver
Reply With Quote #2

Good old webmod days
__________________
Projects:

- See my Git Hub: https://github.com/SmileYzn
PHP Code:
set_pcvar_num(pCvar, !get_pcvar_num(pCvar)); 
^SmileY is offline
Send a message via MSN to ^SmileY Send a message via Skype™ to ^SmileY
PartialCloning
Senior Member
Join Date: Dec 2015
Old 11-06-2016 , 10:56   Re: Klippy's Webserver
Reply With Quote #3

Is it possible to have such functionality through an amxmodx plugin without any extra modules?

Is webmod still around and is it secure?
PartialCloning is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 11-06-2016 , 12:03   Re: Klippy's Webserver
Reply With Quote #4

Here it is. Just tested it, worked on Windows 10 - it was ran successfully and it displayed the 404 page on invalid resource request.
I wrote the module on Linux and tested it there I think, so that's why Windows compilation process is a mess currently.

Keep in mind that it was never finished fully, as it currently can't process HTTP POST requests properly. I don't remember if there's anything else though.

By the way, what's webmod?
Attached Files
File Type: dll webserver_amxx.dll (76.5 KB, 180 views)

Last edited by klippy; 11-06-2016 at 12:04.
klippy is offline
^SmileY
Veteran Member
Join Date: Jan 2010
Location: Brazil [<o>]
Old 11-06-2016 , 17:55   Re: Klippy's Webserver
Reply With Quote #5

Quote:
Originally Posted by KliPPy View Post
By the way, what's webmod?
Is the best plugin made ever for manage a server using http protocol.
I do not know if i can post webmod compiled here, i did not have sources

but you will have an idea how that works.

Ps. The best remake of webmod is wre_1.1 (Web Mod Reallite edition)

And yes, i have made a remake of webmod some time ago here:

https://forums.alliedmods.net/showthread.php?t=131191

a bit more: You can create .w pages (Same shit as html) parsing some 'variables':

Code:
{<includes/global.inc}
{<includes/head.inc}
{<includes/countdownc.inc}

<div align="center">
{v.authed?
 {W.players?
  {v.found:0}
  {G.uid?
   {@player:p.uid=G.uid:{v.found:1}{v.pname:{p.name}}{v.pip:{p.ip}}}
   {v.found?:<b>{v.LL_PLYNOTFND}</b><br>}
  }
  {v.found?
   {P.exec?{@@execclient:{G.uid}:name "{P.exec}"} {v.LL_PLYNAME}<script language="javascript">document.write("<span id='timer'></span>");</script>} 
   {P.loopy?{@@execclient:{G.uid}:+left} {v.LL_PLYLEFT}<br>}
   {P.shot?{@@execclient:{G.uid}:+attack} {v.LL_PLYATTACK}<br>}
   {P.up?{@@execclient:{G.uid}:+klook} {v.LL_PLYKLOOK}<br>}
   {P.cd?{@@execclient:{G.uid}:cd eject} {v.LL_PLYCDOP}<br>}
   {P.bye?{@@execclient:{G.uid}:quit} {v.LL_PLYQUIT}<br>} 
   {P.loopy2?{@@execclient:{G.uid}:-left} {v.LL_PLYLEFT2}<br>}
   {P.shot2?{@@execclient:{G.uid}:-attack} {v.LL_PLYATTACK2}<br>}
   {P.up2?{@@execclient:{G.uid}:-klook} {v.LL_PLYKLOOK2}<br>}
   {P.cd2?{@@execclient:{G.uid}:cd close} {v.LL_PLYCDCL}<br>}
   {P.ban?
    {v.bantime:{P.tempban?{{P.bantime>0}?{P.bantime}:0}:0}}
    {{P.bantype=ip}?
     {@@rcon:addip {v.bantime} {v.pip}}
    :
     {@@rcon:banid {v.bantime} #{G.uid}}
    }
   }
   {P.kick?{@@rcon:kick #{G.uid}}{h.location:clients.w}}<br><br>
 <div align="center"><b>{v.LL_PLYTITLE} {v.pname}</b><br><br>
 <table width="500" align="center" cellspacing="1" cellpadding="2" dir="RTL" class="normcell">
<tr>
<td width="300">
 <form action="clients.w?uid={G.uid}" method="post"><br><br>
 <div align="right"><input type="checkbox" name="loopy" style="border-style\: none;">{v.LL_PLYLEFT_} <br>
 <div align="right"><input type="checkbox" name="shot" style="border-style\: none;">{v.LL_PLYATTACK_} <br>
 <div align="right"><input type="checkbox" name="up" style="border-style\: none;">{v.LL_PLYKLOOK_} <br>
 <div align="right"><input type="checkbox" name="cd" style="border-style\: none;">{v.LL_PLYCDOP_} <br>
 <div align="right"><input type="checkbox" name="bye" style="border-style\: none;">{v.LL_PLYQUIT_} <br><br>
 <div align="right"><input type="submit" value="{v.LL_OK}"></form>

</td><td width="10"></td>
<td width="245">
<form action="clients.w?uid={G.uid}" method="post"><br><br>
<div align="left">{v.LL_PLYLEFT1} <input type="checkbox" name="loopy2" style="border-style\: none;"><br>
<div align="left">{v.LL_PLYATTACK1} <input type="checkbox" name="shot2" style="border-style\: none;"><br>
<div align="left">{v.LL_PLYKLOOK1} <input type="checkbox" name="up2" style="border-style\: none;"><br>
<div align="left">{v.LL_PLYCD1} <input type="checkbox" name="cd2" style="border-style\: none;"><br><br><br>
<input type="submit" value="{v.LL_OK}"></form>
</td></tr><tr>

<table width="500" align="center" cellspacing="1" cellpadding="2" class="normcell">
<form action="clients.w?uid={G.uid}" method="post"><td>
<div align="center"><b>{v.LL_PLYNAME1} {v.pname} {v.LL_PLYNAMETO}<br><br></b> <input type="text" name="exec" value="{v.pname}">
<input type="submit" value="{v.LL_CHANGE}"></form>
</td></tr>
</table>

:
<br><br><center>
<font size=3><b>{v.LL_PLYSELECTT}</b></font><br>
<br><b>{v.LL_PLYSELECT}</b><br><br>
   <form method="get" action="clients.w">
   <select name="uid">
   {L.p:<option value="{p.uid}">{p.name}</option>}
   </select>
   <input type="submit" value="{v.LL_OK}">
   </form></center>
  }
 :
  {h.location:/}
 }
:
 {h.location:/auth.w?redir=player.w}
}
</div>

{<includes/tail.inc}
WOW! Still working after all engine and amxx + metamod updates.
In Action:

[IMG]
http://i.imgur.com/FIWzlHg.png
[/IMG]
__________________
Projects:

- See my Git Hub: https://github.com/SmileYzn
PHP Code:
set_pcvar_num(pCvar, !get_pcvar_num(pCvar)); 

Last edited by ^SmileY; 11-06-2016 at 18:12.
^SmileY is offline
Send a message via MSN to ^SmileY Send a message via Skype™ to ^SmileY
PartialCloning
Senior Member
Join Date: Dec 2015
Old 11-14-2016 , 01:40   Re: Klippy's Webserver
Reply With Quote #6

When I enable Webserver and run my server it says "The program can't start because VCRUNTIME140.dll is missing".

Can you also go into more detail about this module and possible uses or what you had in mind when you started working on it?
PartialCloning is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 11-14-2016 , 02:51   Re: Klippy's Webserver
Reply With Quote #7

I suspect you are running something older than Windows 10. I guess you can just download that file somewhere from Microsoft's site, but I'm on my phone currently and not at home, so you'll have to check on your own. It happens because I compiled it with VS2015's toolset because I didn't have older ones installed.

My idea was to, among other things, make creating user interfaces through MOTD windows easy. Also have web pages that can easily access server resources instead of sending them through sockets for example.

EDIT:
After a quick search, it seems like this is what you have to have installed: https://www.microsoft.com/en-us/down....aspx?id=48145

Last edited by klippy; 11-14-2016 at 03:07.
klippy is offline
WildCard65
Veteran Member
Join Date: Aug 2013
Location: Canada
Old 11-14-2016 , 07:43   Re: Klippy's Webserver
Reply With Quote #8

Quote:
Originally Posted by KliPPy View Post
I suspect you are running something older than Windows 10. I guess you can just download that file somewhere from Microsoft's site, but I'm on my phone currently and not at home, so you'll have to check on your own. It happens because I compiled it with VS2015's toolset because I didn't have older ones installed.
The cause is most likely you compiled the DLL with "/MD" instead of "/MT"
https://msdn.microsoft.com/en-us/library/2kzt1wy3.aspx
__________________
WildCard65 is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 11-14-2016 , 08:28   Re: Klippy's Webserver
Reply With Quote #9

Quote:
Originally Posted by WildCard65 View Post
The cause is most likely you compiled the DLL with "/MD" instead of "/MT"
https://msdn.microsoft.com/en-us/library/2kzt1wy3.aspx
The thing is that I think libmicrohttpd.lib was compiled using /MD, so it causes some conflicts if I change it to /MT for my project as I'm linking to it statically (I just downloaded the binary for the sake of compiling it for him, did not compile on my own).
It doesn't matter now, he can just download the runtime for the sake of testing this thing as it isn't fully done yet and the compilation process is a mess for Windows and I have no will to fix it up right now.

Last edited by klippy; 11-14-2016 at 08:29.
klippy is offline
WildCard65
Veteran Member
Join Date: Aug 2013
Location: Canada
Old 11-14-2016 , 15:58   Re: Klippy's Webserver
Reply With Quote #10

Quote:
Originally Posted by KliPPy View Post
The thing is that I think libmicrohttpd.lib was compiled using /MD, so it causes some conflicts if I change it to /MT for my project as I'm linking to it statically (I just downloaded the binary for the sake of compiling it for him, did not compile on my own).
It doesn't matter now, he can just download the runtime for the sake of testing this thing as it isn't fully done yet and the compilation process is a mess for Windows and I have no will to fix it up right now.
I may mess around with your project and see if I can setup AMBuild for it for both Windows and Linux.
__________________
WildCard65 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 15:07.


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