Ulysses

Ulysses Stuff => Releases => Ulysses Release Archives => Topic started by: JamminR on April 12, 2008, 11:31:30 PM

Title: [BROKEN] UMotd Revived - Motd and OTHER informational screens.
Post by: JamminR on April 12, 2008, 11:31:30 PM
This mod was broken by garry's updates and currently does not work!



Introducing Umotd Revived - Ulysses Message Of The Day Revived

Want a message of the day server intro screen like days of old?
Want a way for your server visitors to see help, rules or other informative screens you create?

Then Umotd is the release for you!


NOTICE! This release requires ULib 2+
Get the latest version of ULib from the download link at http://www.ulyssesmod.net (http://www.ulyssesmod.net)
This release does not require you to use ULX, just ULib

Features
- Display HTML or text (File must still be named .txt)
- Enable/Disable whether or not players see a motd when joining your server. They will still be able to run the commands in game from console or chat.
- Configure which screen appears when players join your server.
- Multi-command, Multi-file support. A configurable table allows you to add your own command and associated file. Defaults to !motd, !helpme, !serverinfo and !rules, but you're not limited to just those!
- Configure what character opens the command from chat. Defaults to !, but you could switch to /, \, or any that you may wish.
- Can run with or without ULX. By default, attempts to disable/override ULX motd command.
- ULX support - If you use ULX, Umotd will add a "Informational" category to "ulx help", and add autocomplete "ulx <command>" listings.
- Dynamic variables allow text/html to fill in with information. (See Umotd_readme.txt)
- Configure where files load from ... they can load from gmod/data if you wish.
- URL display - Will attempt to load a page if you give a URL instead of a file name in the config. (No dynamic variables supported) (New as of SVN revision 10 (v2.A6)
- Plays one of six random sounds at screen show.

Quick instructions
- If you don't know how to use/get SVN code...see our tutorials in the SVN release
- Create a Umotd_Revived folder in your server/garrysmod/addons.
- Use checkout on that folder using SVN information provided below.
- Read the garrysmod\addons\Umotd_revived\Umotd_readme.txt file, it contains more detailed instructions.
- Start your server
- Enjoy

Notes
- This attempts to disable ULX 3+ motd function if you use ULX.
- Correctly guess the secret meanings behind the rule numbers in the default motd_template.txt, and get a permanent credit in the main lua and readme file.
  (I judge winners on any basis I wish)

Known Issues
- Currently only detects SuperAdmin and Admin as %curadmins%
- Locks client when links are included and clicked. Unknown bug. I can't figure out why (ULX does this too) Fixed in 2.A1
- %maxsents% returns blank when used. I've left it in the code and my info_template.txt anyway. Hope Garry adds it back (he removed it 3/31/08 Gmod release)

Again, this requires ULib 2 (http://www.ulyssesmod.net) or higher.

(Not So)FAQS
Q. Why didn't you use the default source "motdfile" location variable"
A. 1) Easier file management. 2) You can change where files are stored by default. See readme for where to edit.

Q. Why can't I name my files .htm or .html? This would make it easier to track what file type it is for me.
A. Source API Limitation. Will only read files named .txt

Q. Why don't scroll bars appear correctly?
A. Source API Limitation. Something about memory usage increase/leaks. Removed by Source until fixed.

I'll be keeping a running changelog here of the past few changes per SVN commit.
If you don't see an older change here, look in my changelog.txt
Code: [Select]
-[Version 2.A6 - 5/00/08]
          [Change] HTTP in A5 removed, placed on Client side. Garry's http.Get is buggy, more so than a hound dog travelling flea circus.
                   No dynamic variables when URLs are given due to this.
-[Version 2.A4 - 4/00/08]
          [Added] If motdfile points to root, and no motd file is in root gmod directory, loads template instead of TF2 default motd.
          [Added] Added %maptime_short%, %maptime_long%, %maptime_secs%. Gives time since map load in 3 different formats.
          [Added] Map time explanations to Umotd_readme.txt
          [Added] Map time demonstration to data/Umotd/info_template.txt
          [Change] Optimized math of uptime(used in map and server uptime)
-[Version 2.A3 - 4/21/08]
 ULX module added - ULX NOT required. This just adds the Umotd functions to "ulx help" if you have ULX installed.

Current Version: 2 ALPHA #?
DOWNLOAD: SVN Only - http://ulyssesmod.net/Umotd/trunk/
SVN username : pass = anonsvn : anonsvn

Do not upload any SVN you download to any website, as Umotd will be changing frequently over the next few weeks/months.
Report bugs. Don't just come here and say "It doesn't work". Provide detail. Error messages. Who, what, where, when, why, and how.
Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: JamminR on April 12, 2008, 11:34:03 PM
Note to all who download, though I don't expect this to crash your server, it is pretty rough around the edges, and doesn't include a feature or two (or the features it does aren't as robust) I'd wanted in it.
Consider this alpha code.
I'm not posting it to Facepunch until I get some feedback on it, polish it up a bit.
If you think of any more dynamic variables you'd like to see, let me know. Perhaps I'll add them
Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: Megiddo on April 12, 2008, 11:56:15 PM
Good work JamminR! :D
Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: JamminR on April 16, 2008, 09:05:30 PM
I've placed this on our UHQ gmod server.
It worked fine for me. However, another person, who'd never loaded it before, had trouble with it.
He'd also been having trouble with ULX autocomplete usermessage errors too though. This seems to be a pattern for some as of late.
I have no idea what's causing it.

Edit (spbogie): Fixed your typo
Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: Typo001 on April 17, 2008, 02:35:05 PM
Thank You, I could never get the it to work right. It works for me, but could you tell me which file it shows when you first get on the server, I can not find that for some reason. I have eddited all of them and I am still seeing the basic rules.
Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: blacksythe on April 17, 2008, 02:45:42 PM
delete the team fortress motd and it should fix a few problems

As html is now usable would it be possible to set this up to stream it from a website. I know you have probably been asked this 100 times

perhaps a suggestion for a future version.
Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: JamminR on April 17, 2008, 03:36:22 PM
Thank You, I could never get the it to work right. It works for me, but could you tell me which file it shows when you first get on the server, I can not find that for some reason. I have eddited all of them and I am still seeing the basic rules.

I believe I made the Umotd_readme file, mentioned in the original post "Quick Instructions", "usage" section very clear. That section points to another file which I also believe I commented well.
If you believe I could make either one clearer, please suggest how.

{edit - corrected readme file name}
Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: Megiddo on April 17, 2008, 03:39:04 PM
I fixed the link crash problem in ULX Jam. Talk to me if you want further details. :)
Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: JamminR on April 17, 2008, 08:06:33 PM
would it be possible to set this up to stream it from a website.

perhaps a suggestion for a future version.

Give a bit more detail as to what you mean?
Do you mean instead of displaying a local file, display a site from the web such as "sv_welcomemessage" used to do when joining a server?
That gets a bit more than I intended, but this could do just about anything that Source html allowed for.

Also, all, ulx motd allowed for html too. My html addition isn't new, the main feature this adds are multiple file support and dynamic variables.

I've updated the script to fix linking (thanks to Megiddo), and add links to addons if the author included them.
Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: JamminR on April 18, 2008, 08:51:19 PM
I've been working some Umotd code tonight. I HAVE NOT uploaded it here at this time.
If ULX is installed, Umotd will now attempt to create a "informational" category in ULX help, and displays the following (defaults are shown, any you edit/create would appear)

Category: Informational
   o serverinfo  - Shows the serverinfo screen using Umotd (say:!serverinfo)
   o motd  - Shows the motd screen using Umotd (say:!motd)
   o helpme  - Shows the helpme screen using Umotd (say:!helpme)
   o rules  - Shows the rules screen using Umotd (say:!rules)

Again, ULX is not required...this just attempts to add it if ULX is installed.

Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: JamminR on April 21, 2008, 01:31:46 PM
This is now released to the public at large here at Ulysses forums through SVN. See information in original post.
Do not upload any SVN you download to any website, as Umotd will be changing frequently over the next few weeks/months.
At some point in time, I'll be posting a 'release' to Facepunch and here.

Biggest change as of this moment since I went SVN is that the ULX code to add to menus has now been placed in it's own ULX module, and (I believe) is more reliable about adding to those menus.

Report bugs. Don't just come here and say "It doesn't work". Provide detail. Error messages. Who, what, where, when, why, and how.
Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: Kingtendo on April 26, 2008, 10:07:25 AM
Does it support transparent PNG's and/or GIF's ?
Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: Marlamin on April 26, 2008, 10:21:58 AM
Yes! It works perfectly! Though I'm not a HTML expert at all, I made a pretty nice MOTD. (I think.)

I was wondering, I have a huge list of addons with download links behind them in my MOTD so people can download all important addons immediatly. Though is there any chance of this:

(Example)

www.google.com

being automaticly parsed to:

<A HREF="www.google.com">[/url]

So people can click those links?

Since running through that hole block of HTML (I copied it from my clan's forums. To my surprise it works.) and adding <A HREF="URL"> tag's to every link I come by is a bit to much for me.

But still, this addon rocks. Can't wait to see what the future brings!!

Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: JamminR on April 26, 2008, 11:20:48 AM
Does it support transparent PNG's and/or GIF's ?
This uses GMod html interperter, which uses Source html interpreter, which (loosely) uses Internet Explorer from your machine.
I believe GIF is used, unsure of PNG.

Though is there any chance of this:
<snip>
adding <A HREF="URL"> tag's to every link I come by is a bit to much for me.
<snip>

Marlamin, Very little. Though possible, this would add unnecessary time parsing the files that are read and looking for %blah%
I'm already trying to figure out ways to optimize the dynamic replacement loop, and feel that the actual html coder should do any linking.
You might be interested in using %addons_long% in a !addons page you make or something. See my current version !serverinfo (or Umotd serverinfo from console), which has a section showing %addons_blah% which loops through addons.
Any addons in which the author included an "author_url" in the info.txt of the addon gets linked. Though, unfortunately, not many authors seem to use that.
Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: MrPresident on April 26, 2008, 11:27:53 AM
We use a .PNG image in our MOTDs so I can confirm support for .png files.
Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: spbogie on April 26, 2008, 11:44:48 AM
PNG's should be supported, although transparency in them will only work for clients running IE7.
Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: Kingtendo on April 27, 2008, 04:55:40 AM
Do you have to use images from a URL, or can you use them from a directory in the UMOTD addons folder. I.e. would background: url('bg.png') work or would it have to be background: url('URL').
Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: JamminR on April 27, 2008, 05:15:31 AM
Do you have to use images from a URL, or can you use them from a directory in the UMOTD addons folder. I.e. would background: url('bg.png') work or would it have to be background: url('URL').
URL.
FYI - This is true of any Source game.

Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: Marlamin on April 28, 2008, 05:21:10 AM
Hmm. I somehow broke it. The only thing I changed is this part in the config:

Code: [Select]
Umotd_command_files = {
                    ["motd"] = "motd.txt",
                    ["addons"] = "addons.txt",
                    ["helpme"] = "help.txt",
                    ["serverinfo"] = "info.txt",
    ["svn"] = "svn.txt",
                    ["Ulysses"] = "http://forums.ulyssesmod.net",
    ["stargate"] = "stargate.txt",
            ["apply"] = "http://stargateclan.prophpbb.com/topic10.html",
            ["cookies"] = "cookies.txt",
                      }

And now, in-game the MOTD isn't showing up, and all the stuff doesn't work anymore except the console command umotd help.

...What did I do to break it?
Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: JamminR on April 28, 2008, 05:27:59 PM
Forgot commas ,
Place one after every line/quote.
Go ahead and place a comma after the ending line too before the bracket. It won't hurt anything, and will be there for next lines.

Oh, as for URLs... they aren't working anywhere near as well as I originally thought.
You may want to remove them for now.

[EDIT] - I edited your code sample to include them. Hope you don't mind, easier to copy/paste that way.
Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: Marlamin on April 29, 2008, 01:49:41 AM
Thanks a lot! :D
Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: jay209015 on April 29, 2008, 02:40:11 PM
My motd isn't showing up when you join the servers. Here's my config

Code: [Select]
Uchat_prefix = "!" -- When command is said in chat, this character will presede it. Example. !motd


Umotd_SpawnCommand = "motd" -- If below is true, show this command at start-up. See Umotd_command_files example comments
-- WARNING! Above command MUST be a command within range of your commands in table below.
Umotd_ShowatPlayerSpawn = "true" -- true = Show above command to player at connect. false = Don't show at connect.

--[[
["Command"] will show "file.txt", Must be stored in Umotd_LoadDir location above EXCEPT for the motd.txt.
Add the commands you want to use from chat and console here into this table. Commands are case sensitive
Chat will be auto-prefix by Uchat_prefix above.
NOTE! Though file format itself can be TEXT or HTML, name of file must always end in ".txt"
WARNING - NOTICE - ATTENTION - motd.txt will automatically load from your Garrymod's mod "motdfile" variable. Usually /gmod/motd.txt.
If the file can't be found there, it will load from the "Umotd_LoadDir" location listed above.
]]
Umotd_command_files = {
                    ["motd"] = "motd.txt",
                    ["rules"] = "rules.txt",
                    ["helpme"] = "help.txt",
                    ["serverinfo"] = "info.txt",
                    ["Ulysses"] = "http://forums.ulyssesmod.net",
                    ["svn"] = "svn.txt",
                    ["admins"] = "admins.txt"
                      }

--[[
The following controls various dynamic variable options. ]]--
-- true = convert dynamic variables %blah%. false = Leave them as is in your .txt. If you dont' use them, turn this false.
Umotd_dynvar = true
Umotd_AddOnSep1 = ", <br>" -- this sets what to use as separator if you use %addon_long%
Umotd_AddOnSep2 = ", " -- this sets what to use as separator if you use %addon_short%

==EDIT==
Found the fix accidentally. Admins.txt didn't exist, so I created it and motd worked again.
Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: jay209015 on April 29, 2008, 03:45:15 PM
BTW is it possible to make Umotd read files from a different folder Ex: garrysmod/data. because I'm making a script to automatically write a list of admins to an admins.txt file located in the data folder.
Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: JamminR on April 29, 2008, 04:14:57 PM
BTW is it possible to make Umotd read files from a different folder Ex: garrysmod/data. because I'm making a script to automatically write a list of admins to an admins.txt file located in the data folder.
Yes. Read the Umotd_config file. It's well commented which variable to edit.
In fact, you left it out of your above config example. Its the first one at the top above chat prefix.

Oh, also, what are you trying to make admins output? A list of all the admins, even not connected?
Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: jay209015 on April 29, 2008, 04:25:24 PM
I'm only writing a list for admins that have connected to the server(see my posts in developers corner for code).
I got the file working in the garrysmod/data/Umotd instead of garrysmod/addons/data/Umotd I wasn't paying attention to the addon format before. It would of answered my question. Thanks for you help :D
Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: JamminR on April 29, 2008, 06:32:09 PM
I'm only writing a list for admins that have connected to the server
Using %curadmins% in your admins.txt file?
Umotd searches for Superadmin and Admin by default and will replace that.
I'm hoping to add a table in the config file for custom groups to look for as admins eventually.

Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: jay209015 on April 29, 2008, 06:35:28 PM
No, I'm writing them into the file myself with my script in the developers corner.

Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: JamminR on April 30, 2008, 08:45:04 PM
I've added client side URL loading.
If you place a URL in the config area "command" = "url" - It will be passed to the client side. No parsing/dynamic variables.

Everyone please test the heck out of that.
Remember, if you get non-Lua scripting errors from pages you link to, this (99% most likely) isn't due to Umotd, but due to the limitation Source html limits to it's interpreter.
Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: blacksythe on May 01, 2008, 02:00:34 PM
Reading through this is it possible to set it up to load the motd from the same computer which also hosts php/html based webpages, I don't know load snazzy backgrounds e.t.c. for example use the html auto redirect feature I forget the code but I know its there because I have used it myself. or is the source interpreter limited too much to use that feature. I would like to give clients the opportunity to browse the community website a bit maybe look at some flat file based forums. Yes messy I know but I didn't make it, we plan to move to sql based forums a little later for easier forum/game intergration.
Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: Sc00by22 on May 03, 2008, 01:00:13 AM
When i type ulx help in my console it displays motd instead of the ulx help commands
Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: JamminR on May 03, 2008, 10:51:22 AM
Reading through this is it possible to set it up to load the motd from the same computer which also hosts php/html based webpages
If the same server your game server runs on also runs the http server and php parser services, yes.
If you use a dynamic dns (such has http://<your_dyndns_name>. dyndns.org) service, or have http://<your_current_IP>/ , then yes, it could redirect the end viewer.
Any browsing they do will take up any bandwidth you already offer to your game clients.

You wouldn't have to use redirect. Just place the URL in the config of where you want the viewer to view.
Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: JamminR on May 03, 2008, 11:17:09 AM
Scooby, are you using Umotd?
If so, don't make a "help" command. Use "helpme", as I originally had it, or some other command "assistance, guidance, etc".
If you have ULX installed and use Umotd, any command you make will add a ULX menu item

If you are not using Umotd, then.. I have no idea how this could happen. Have you attempted to edit any of the ULX code yourself?
Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: Sc00by22 on May 03, 2008, 11:52:16 AM
Ahh, Thats why then, I changed it to help from helpme
Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: Kingtendo on May 04, 2008, 06:25:42 AM
Can't seem to center Divs and Tables, and whenever i create a table it appears a lot lower down the page than it should do.  ???
Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: Megiddo on May 04, 2008, 07:41:36 AM
When i type ulx help in my console it displays motd instead of the ulx help commands

Paste what you see.
Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: JamminR on May 04, 2008, 09:28:32 AM
Paste what you see.
Megiddo, we found the issue on this.
If the user also runs ULX, the Umotd "ULX helper" module makes each command in Umotd config add itself to the ULX 'help' menu.
Scooby had changed the "helpme" command I have by default to "help", which, over wrote the "ulx help" function.

Can't seem to center Divs and Tables, and whenever i create a table it appears a lot lower down the page than it should do.  ???
I too have noticed this, and believe it is more the way that Gmod/Source handle the html panels than it is something Lua could be used to correct.
Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: smegy on May 05, 2008, 06:07:32 AM
Hey folks, im having a problem with this, im unsure what the problem is but this is what shows up in console, any suggestions?


Warning: Unhandled usermessage 'UMotdStart'
Warning: Unhandled usermessage 'UMotdText'
Warning: Unhandled usermessage 'UMotdText'
Warning: Unhandled usermessage 'UMotdText'
Warning: Unhandled usermessage 'UMotdText'
Warning: Unhandled usermessage 'UMotdText'
Warning: Unhandled usermessage 'UMotdText'
Warning: Unhandled usermessage 'UMotdText'
Warning: Unhandled usermessage 'UMotdEnd'
Warning: Unhandled usermessage 'SendUMotd'
Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: JamminR on May 05, 2008, 05:08:37 PM
Hey folks, im having a problem with this, im unsure what the problem is but this is what shows up in console, any suggestions?

What revision of Umotd? Latest?
What type of server? (Listen or dedicated)
Do you have your server configured to send files from your server lua cache to your connecting clients?
Have you restarted your server since you added Umotd, and then reuploaded your cache? (A simple map change won't do)

The error means that the client connecting isn't running the script that sets up those commands.
Does reconnecting work to help it?
Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: smegy on May 06, 2008, 07:35:40 AM
1. Latest
2. Dedicated
3. Umm im unsure of this, and you saying that makes me think that may be the cause, as were having a few problems with files being transfered at the moment
4. Yes
5. No reconnecting doesn't help

Ill work out number 3, and get back to you if that fixed it, thanks :)
Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: smegy on May 06, 2008, 01:13:20 PM
Just posting to let you know that its sorted.. the problem was our downloadurl not working correctly.. one more thing, some of the players and myself crashed when we first started using it, just thought id let you know.
Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: jay209015 on May 11, 2008, 01:12:18 AM
I have a suggestion. I think it would be cool to have a dynamic variable %rules% that could read from a txt EX: rules.txt as a table or plane text, so that you could just add %rules% to your motd.
Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: JamminR on May 11, 2008, 04:03:57 PM
I have a suggestion. I think it would be cool to have a dynamic variable %rules% that could read from a txt EX: rules.txt as a table or plane text, so that you could just add %rules% to your motd.

I understand what you want, but don't think it's a good idea.
That would just be overcomplicating things.
Either change the screen your players see when joining to a rules command, or just add the rules to your motd.
Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: jay209015 on May 11, 2008, 07:48:38 PM
The reason I want it, is because I made A script that allows you to add/remove rules from the rules.txt ingame, but I would like those same rules to appear in the Motd.
Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: JamminR on May 13, 2008, 08:13:11 PM
The reason I want it, is because I made A script that allows you to add/remove rules from the rules.txt ingame, but I would like those same rules to appear in the Motd.
I understand why you want it. I just don't see this as a feature I'd add to the full release. Too few would use it.

If you want, add it yourself for now.
Should only take you one addition.
Find the dynamic variable table in Umotd_server.lua.
Add something like [%%rules%%] = function() local rules = file.Read(<your_file>) return rules end,
I'm not looking at my code right now to remember what the table exactly looks like, but the above line would be similar to what you need.
Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: jay209015 on May 14, 2008, 05:10:58 AM
K, I will look into it. Thank you.

==EDIT==
worked great.
Code: [Select]
["%%rules%%"]          = function() return ajoin_rules() end,
Code: [Select]
function ajoin_rules()
local found_rules = file.Read("Umotd/rules2.txt")
return found_rules
end
Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: jay209015 on May 25, 2008, 06:01:49 AM
Maybe you could try FireBox for displaying the actual web-pages, or try to work around their concept. http://forums.facepunchstudios.com/showthread.php?t=327935 (http://forums.facepunchstudios.com/showthread.php?t=327935)
Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: JamminR on May 25, 2008, 09:49:48 AM
Maybe you could try FireBox for displaying the actual web-pages, or try to work around their concept.

Which concept are you wanting?
I have no wish to make this addon a full fledged 'type in a URL' web browser.
The release says it has fixed scroll bars, and I might possibly look into that.
However, the notes later say, with big red sirens, "Don't message about scroll bars, I have no control over that".
Sounds like the author hacked his own for the main window, but couldn't fix Source's actual scrollbar issue.
Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: jay209015 on May 25, 2008, 01:20:32 PM
Well, one thing that I really like about it, is that you can press the back button.
Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: JamminR on May 25, 2008, 04:38:24 PM
I probably won't add any extra browsing functionality.
To be honest, adding in URL ability was so that a single page could be viewed. Possibly use direct file links from a page to download addons, etc.
Adding back buttons (or any other browse buttons) goes farther past the team motto of "Striving for simplicity" than I intend.

Not saying never. Just unlikely.
Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: spbogie on May 27, 2008, 02:56:33 PM
The scrollbar "fix" in firebox is to wrap the page in an iframe.

If you wish to have full browser functionality like firebox, then why not just use firebox? The Message Of The Day is designed for just that, a message. Welcoming your users, explaining your rules, etc... It's not meant to be a browser.
Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: Sc00by22 on May 27, 2008, 03:27:50 PM
Firebox is really buggy, always crashes my garrys mod
Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: spbogie on May 27, 2008, 04:32:51 PM
Then go post it the firebox thread requesting a fix.
Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: XTZGZoReX on June 16, 2008, 09:00:23 AM
How come players can't click + follow URLs/links on pages? That would've been a very neat feature.

Would it be possible to implement this? Or am I just doing something wrong?

Edit: Just read posts above - does this mean it simply is not possible to use links?
Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: JamminR on June 16, 2008, 10:49:13 AM
You have to use html to put links in pages. Should work fine as long as you do it right.
Simply pasting in http://blah blah won't make it a link (and I don't plan on making autolinks, for various reason)
Google "html anchors" for how to add links to html.
Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: LUADuck on July 28, 2008, 07:21:52 AM
The SVN just points you to UClip now after the server change. Any ideas? I need this for my script!
Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: Megiddo on July 28, 2008, 05:27:56 PM
Oops, I'll fix that when I have some time.
Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: JamminR on July 28, 2008, 07:28:08 PM
I've not looked at this code in a while, and at this point in my personal life, have no time or motivation.
I can't guarantee it will work with all the recent GMod (and actually, a few key ULib updates.)
It can suffer the same usermessage issue after a map change that ULib once did, due to it using what was believed to be a safe player spawn command.
Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: Zenox on September 09, 2008, 05:53:01 PM
Am I the only one or is the SVN link broken? Please help me, I really want UMotd
Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: WildWill on September 10, 2008, 09:08:24 AM
After reading the thread again there I don't think you would want the download at this time there Zenox as in the post above yours Jammin says it's most likely busted. 
Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: JamminR on September 10, 2008, 11:18:00 AM
Our SVN url changed, some months ago. (See, It's been a while since I worked on it)
http://ulyssesmod.net/Umotd/trunk/
Try that instead. Not sure a user/pass is required anymore. If it asks, use anonsvn:anonsvn

Feel free to try it out.
Telling me an error might, at the least, get me to update it to work if not put any extra features/optimization into it.
Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: WildWill on September 11, 2008, 07:14:20 AM
Jam I've tried that link there before and just now again and there doesn't seem to be much there other then uclip. Maybe I'm doing something wrong here..
Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: Megiddo on September 11, 2008, 04:54:39 PM
Oops sorry. I accidentally copied the wrong svn dump over for Umotd. I'll put this next on my todo list.
Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: JamminR on September 11, 2008, 08:43:08 PM
Oops sorry. I accidentally copied the wrong svn dump over for Umotd. I'll put this next on my todo list.
EEk. Thanks Meg.
Sorry Will.
/me really should think about updating to the ULib player spawn check at the least.
Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: Zenox on September 13, 2008, 02:30:32 PM
Great!!! This is the first thing to download tomorow !!! Ty guys.

-Zenox
Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: WildWill on September 13, 2008, 10:31:20 PM
Did you see something that I missed there Zenox?  They may or may not have that there by then, right now Meg is very busy doing some other things.  Just hang in there and it will come.
Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: Megiddo on September 14, 2008, 07:39:21 PM
Sorry 'bout the delay folks, should be all fixed up now. You may have to delete your local copy and re-checkout.
Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: angrykid on September 18, 2008, 07:38:36 PM
It seems that CSS does not work in-game. D:
Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: jay209015 on September 18, 2008, 07:45:35 PM
CSS works for me, show me your code, and I'll check it out for you.
Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: JamminR on September 18, 2008, 07:59:06 PM
It seems that CSS does not work in-game. D:
Not sure external CSS links work. Think you have to put it inline like I did for my stats template.
Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: angrykid on September 18, 2008, 10:11:44 PM
Not sure external CSS links work. Think you have to put it inline like I did for my stats template.

Feh...
Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: jay209015 on September 19, 2008, 04:57:22 AM
I've used inline, and I've placed it in the head tags and it still works.

Code: [Select]
<style type="text/css">
     div.main {
     width:800px;
     background-color: #CCCCCC;
     border: 2px solid #000000;
}
</style>
Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: Reiko on September 29, 2008, 08:43:49 AM
Would it be possible to add an option to each UMOTD entry in the config to keep the page loaded after the window has been closed? Such as steam MOTD behaviour.

I use this to my advantage by streaming media into an embedded media player, however with Umotd when you close the window, the page unloads and the stream stops. D= I don't know if it's Garry's doing, or even Steams doing with the Orangebox engine, but I have tried using SourceMod to bring up an old style MOTD box to see if that still works but it just sits there like a lemon.

Would it be possible to add that feature, and if not; any ideas for how I could acieve this again?
Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: JamminR on September 29, 2008, 07:01:29 PM
Reiko,
 There is no way to do this in configuration.
I have far off "to do" plans of adding a radio function, but it will require several lines of code change.
Well, yes, maybe only one, but, I want the frame to close if not a radio (save memory), or hide if a radio page.

If you (or anyone else for that matter) knows GLua (The Gmod functions of Lua) and want to tinker, look into Umotd_client.lua.
The button is now set to :Close()
I'm pretty sure that would need to change to :SetVisible( false )
Problem is, I've looked around the GMod Lua Wiki. Panel has a SetVisible. The DFrame I'm using doesn't show one in the Wiki.

Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: Megiddo on September 29, 2008, 07:04:37 PM
I'm pretty sure that would need to change to :SetVisible( false )
Problem is, I've looked around the GMod Lua Wiki. Panel has a SetVisible. The DFrame I'm using doesn't show one in the Wiki.

It inherits from EditablePanel which should have that function. :)
Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: JamminR on September 29, 2008, 07:14:51 PM
Yeah, I'd seen code examples using it too, just not blatantly in the DFrame library listing.
I think I remember even seeing it the oooold URadio.
Thanks.
Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: Reiko on September 29, 2008, 08:03:12 PM
That's great! I'll have a fiddle around with it myself then.

Thanks for the hint!
Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: Reiko on September 29, 2008, 08:54:24 PM
Sorry for the double post. I decided to grab myself an account since I modify guest posts.

I've changed a bit of "Umotd_client.lua" to;
Code: [Select]
if UMotd.command == "radio" then
Ubutton:SetText( "Hide" )
Ubutton.DoClick = function() Uwindow:SetVisible( false ) end
else
Ubutton:SetText( "Close" )
Ubutton.DoClick = function() Uwindow:Close() end
end

Which works a dream, which in itself is amazing because I know no LUA. However, I've come across another problem. Although this works well now, you can open up multiple radio windows at once because the old window just stays hidden, I was wondering if someone could tell me if there is any way to have the previous radio window close upon a new radio window opening? And if not, if there was a way to just make every window (hidden or not) close whenever a new window is opened so that there can only ever be one window open at once.

Thanks for all the help!
Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: JamminR on September 29, 2008, 10:14:55 PM
My guess, untested...
At the very top of the function before Uwindow gets set, check if it is nil and command = radio.
If it isn't nil and command = radio, Uwindow:Close() (Radio was shown already, close it)
If it is nil, do nothing. (Radio wasn't shown, this is first time)
Uwindow should stay the same in memory, and be able to be closed later before being reset in the function.
Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: Reiko on September 30, 2008, 02:36:12 AM
I currently have it set up like this;

Code: [Select]
function UMotd.showUMotd()

        if Uwindow != nil then
                Uwindow:Close()
        end

local Uwindow = vgui.Create( "DFrame" )
if ScrW() > 640 then -- Make it larger if we can.
Uwindow:SetSize( ScrW()*0.9, ScrH()*0.9 )
else
Uwindow:SetSize( 640, 480 )
end
Uwindow:Center()
Uwindow:SetTitle( "UMotd v" .. UMotd.version .." - Viewing the " .. UMotd.command .. " screen." )
Uwindow:SetVisible( true )
Uwindow:MakePopup()

        etc...

I've also tried every variation of the;
Code: [Select]
if Uwindow != nil then
        Uwindow:Close()
        end
That I can think of and sometimes I would get this error;
Quote
Couldn't include file 'Umotd/umotd_client.lua' (File not found)
So basiclly the server refused to send it, and every other time there were no errors, but nothing happened.
It behaved exactly as I described before.

Any ideas?

Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: JamminR on September 30, 2008, 03:06:14 PM
Try removing 'local' from in front of the Uwindow = vgui... line.
I forgot about that.
Up near the top of the client file,
Code: [Select]
local HTML = { }
local UMotd = { }
Add "local Uwindow"
(Lua lesson for you, 'local' inside a function makes the variable local to the function only)

I'm thinking that may cause other issues, but we'll go from there.
Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: Reiko on September 30, 2008, 08:56:10 PM
Sorry about posting this unfinished. I accidentilly hit tab, then space and the form submitted. Editing it now.
Code: [Select]
local HTML = { }
local UMotd = { }
local UWindow = { }

--local UMotd_sc
local UMotd_sstart

for k, v in ipairs ( UMotd_sounds ) do
    util.PrecacheSound( v )
    UMotd_sc = k
end

function HTML:StatusChanged( text )
end

function HTML:ProgressChanged( progress )
end

function HTML:FinishedURL( url )
end

function HTML:OpeningURL( url, target )
end

vgui.Register( "UMotd", HTML, "HTML" )

function UMotd.showUMotd()

if Uwindow != nil then
Uwindow:Close()
end

Uwindow = vgui.Create( "DFrame" )
if ScrW() > 640 then -- Make it larger if we can.
Uwindow:SetSize( ScrW()*0.9, ScrH()*0.9 )
else
Uwindow:SetSize( 640, 480 )
end
Uwindow:Center()
Uwindow:SetTitle( "UMotd v" .. UMotd.version .." - Viewing the " .. UMotd.command .. " screen." )
Uwindow:SetVisible( true )
Uwindow:MakePopup()
       
Right, this is a lot closer. Now; the first time you open up a radio (hiding) window the window opens up fine, then the next time, the old one closes first. However, upon using the "X" button at the top of the window or using a different window such as !motd and closing we get an error;
Quote
Umotd/umotd_client.lua:56: attempt to call method 'Close' (a nil value)
Which I thought the if was suppost to take of. Any ideas?

Thanks again for all the help
Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: JamminR on October 01, 2008, 12:06:24 PM
Lua is case sensitive. And you've tried to convert Uwindow to a table.
At the top, you have
Code: [Select]
local HTML = { }
local UMotd = { }
local UWindow = { }
Change that to
Code: [Select]
local HTML = { }
local UMotd = { }
local Uwindow
I simply changed W to w. And I changed it from the assignment you were doing that declared a table to just a local variable.
Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: Reiko on October 01, 2008, 08:00:19 PM
Code: [Select]
MsgN( Uwindow )
if Uwindow != nil then
Uwindow:Close()
end

Uwindow = vgui.Create( "DFrame" )
MsgN( Uwindow )
if ScrW() > 640 then -- Make it larger if we can.
Uwindow:SetSize( ScrW()*0.9, ScrH()*0.9 )
else
Uwindow:SetSize( 640, 480 )
end
Uwindow:Center()
Uwindow:SetTitle( "UMotd v" .. UMotd.version .." - Viewing the " .. UMotd.command .. " screen." )
Uwindow:SetVisible( true )
Uwindow:MakePopup()

local html = vgui.Create( "UMotd", Uwindow )

local Ubutton = vgui.Create( "DButton", Uwindow )

if UMotd.command:lower() == "radio" then
Ubutton:SetText( "Hide" )
Ubutton.DoClick = function() Uwindow:SetVisible( false ) end
else
Ubutton:SetText( "Close" )
Ubutton.DoClick = function() Uwindow:Close() Uwindow = nil MsgN( Uwindow ) end
end
This helped a lot, didn't realize I was making it a table however, using MsgN as debug I found that even after the panel is closed, the variable keep's it... ID (or whatever that code was) so to get around that, after I noticed that the button was in a function, I added in that once the close button had been pushed, it set Uwindow to nil. Now it works perfectly UNLESS you press the "X" button up in the corner. Is there any way to register when that has been pressed or just when the panel has been closed in general?
Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: JamminR on October 01, 2008, 08:33:39 PM
I found that even after the panel is closed, the variable keep's it... ID
<clip>
 Is there any way to register when that has been pressed or just when the panel has been closed in general?
Ah, sorry about that. I forgot to tell you to account for the fact that Uwindow wasn't local to the function anymore, just the script.
When it's local to a function, it gets set back to nil after the function is over. When we removed it from the function and declared it local to the script, we have to manipulate it ourselves. Though we didn't want it to be nil at the beginning if the radio was playing, we do want it to go nil if the radio is stopped.
Glad to see you learned how to account and fix it yourself now though.
Wow, you seem to be learning quite nicely.

As for the X button, yes, there's a way to detect it. Unfortunately, I cant' find it on the Gmod wiki at the moment.
You know about the Gmod Lua wiki, right? Lots of insight to GLua can be found there to tinker with for various projects and ideas.
Several tutorals too.
Anyway, I found this that could be used to now show the X (http://wiki.garrysmod.com/wiki/?title=DFrame.ShowCloseButton). Perhaps that would work for you.

[Edit] Oh, that 'id' as you call it by the way is I believe a memory address where the object is stored. One of my fellow team mates can correct me on this, or elaborate if I'm close. It's not a string variable, so it doesn't get printed as a 'readable' string.
Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: Reiko on October 01, 2008, 08:43:37 PM
Anyway, I found this that could be used to now show the X (http://wiki.garrysmod.com/wiki/?title=DFrame.ShowCloseButton). Perhaps that would work for you.
That's perfect! It's now fool proof.

[Edit] Oh, that 'id' as you call it by the way is I believe a memory address where the object is stored. One of my fellow team mates can correct me on this, or elaborate if I'm close. It's not a string variable, so it doesn't get printed as a 'readable' string.
That makes sense.

Great! It's working perfectly now. Thanks so much for all your help!
Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: JamminR on October 01, 2008, 08:59:43 PM
Great! It's working perfectly now. Thanks so much for all your help!

And thank you for the inspiration and practice.
It's been months since I've done any hobby coding I could enjoy.
Now that we've helped each other debug, I'll know what not to do when I incorporate streaming radio into UMotd.

If you ever have ideas or projects you need help with now that you've dabbled in Lua, please feel free to visit our Developer's corner forum.
I personally don't always know the direct answer, but I like learning from our community and my team.

Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: Frostyfrog on October 07, 2008, 05:23:29 PM
The MOTD on player spawn thing won't work :(
I think somewhere here is the problem:
Code: [Select]
function Umotd_help(ply, cmd, argv, args)
         ULib.console(ply, "[Umotd] - The following are available; help(this context), " .. string.Implode( ", ", Ucmds ) )
end
--ULib.concommand( "Umotd", Umotd_help )
ULib.begin_subconcommand( "Umotd", Umotd_help, nil, ULib.ACCESS_ALL  )

  Umotd_content = { }
  for Umotd_cmd, Ufile in pairs( Umotd_command_files ) do
      Umotd_content[Umotd_cmd] = { }
      Umotd_content[Umotd_cmd].cmd_name = Umotd_cmd

      if Ufile:lower():find("http:", 1, true) then
         Umotd_content[Umotd_cmd].path = Ufile -- It's a URL!
      else
         Umotd_content[Umotd_cmd].path = Umotd_LoadDir .. Ufile
      end

      if string.lower( Umotd_cmd ) == "motd" then
        if not Umotd_content[Umotd_cmd].path:lower():find("http:", 1, true) then

           local motdpath = "../" .. GetConVarString( "motdfile" )
           if file.Exists( motdpath )
           and not file.Read( motdpath ):find( "Welcome to Team Fortress 2", 1, true ) then
               Umotd_content[Umotd_cmd] = { path = motdpath } --Use motdfile variable if it exists, otherwise use config.
           end
        end
      end

      if file.Exists( Umotd_content[Umotd_cmd].path ) or Umotd_content[Umotd_cmd].path:lower():find("http:", 1, true) then
         Umotd_funcname = Umotd_cmd
         table.insert( Ucmds, Umotd_cmd )

         function Umotd_funcname(ply)
                 if not ply:IsValid() then
                    ULib.console(ply, "[Umotd] - You can't see the "..Umotd_cmd.." from the console.\n" )
                    return
                 end
                  UshowMotd( ply, Umotd_cmd, Umotd_content[Umotd_cmd].path )
         end
         Umotd_content[Umotd_cmd].func = Umotd_funcname
--print("Created ".. Umotd_cmd .." and passing ".. Umotd_content[Umotd_cmd].path )

         ULib.add_subconcommand( "Umotd", Umotd_cmd, Umotd_funcname, ULib.ACCESS_ALL )
         ULib.addSayCommand( Uchat_prefix .. Umotd_cmd, Umotd_funcname, "Umotd " .. Umotd_cmd )

      else
         Msg("[Umotd] Error - I can't create function \"" .. Umotd_cmd .. "\", file\URL " .. Umotd_content.Umotd_cmd.path .. " couldn't be found/understood.\n" )
         Msg("[Umotd] Error - Function \"" .. Umotd_cmd.. "\" not created\n" )
         --       Don't create functions.
      end
  end

  function UShow_motd(ply)
           if util.tobool( GetConVarString( "ulx_showMotd" ) ) then -- If ULX is loaded, attempt to disable its motd.
              game.ConsoleCommand( "ulx showMotd 0\n" )
           end
           ply:ConCommand("Umotd "..Umotd_SpawnCommand .."\n")
  end

local function Umotdinit()
                 if util.tobool(Umotd_ShowatPlayerSpawn) then
                    hook.Add( "PlayerInitialSpawn", "Umotd_Spawner", UShow_motd)
                 end
                 Umotd_map_starttime = os.time()
        end
hook.Add( "Initialize", "UmotdInitialize", Umotdinit )

--[[ ToDo
--table.HasValue - look it up ]]--

end -- UmotdLoaded
end -- Server

My configuration file:
Code: [Select]
Umotd_LoadDir = "Umotd/"
Uchat_prefix = "!"
Umotd_SpawnCommand = "listaddons"
Umotd_ShowatPlayerSpawn = "true"
Umotd_command_files = {
                    ["motd"] = "motd_template.txt",
                    ["rules"] = "rules.txt",
                    ["helpme"] = "help.txt",
                    ["serverinfo"] = "info_template.txt",
                    ["ulysses"] = "http://www.ulyssesmod.net/",
["donations"] = "donations.txt",
["listaddons"] = "addons.txt",
["website"] = "http://www.pawspubserver.co.uk/",
                      }
Umotd_dynvar = true
Umotd_AddOnSep1 = ", <br>" -- this sets what to use as separator if you use %addon_long%
Umotd_AddOnSep2 = ", " -- this sets what to use as separator if you use %addon_short%
Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: JamminR on October 07, 2008, 05:35:06 PM
Any errors at server startup? Any errors when you join your server? When other people join your server?
Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: Frostyfrog on October 10, 2008, 08:39:03 PM
nope, no errors. then again, not really my server. I'm just the Lua guy for it. When I have this, it works: Umotd_ShowatPlayerSpawn = "false"
I shows the default (which isn't what we want)...
Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: angrykid on October 12, 2008, 01:05:43 AM
nope, no errors. then again, not really my server. I'm just the Lua guy for it. When I have this, it works: Umotd_ShowatPlayerSpawn = "false"
I shows the default (which isn't what we want)...

It's not showing up for me either. I don't really care, though, since nobody ever visits my server. :P


Oh, non-inline CSS works now! Kickass!
Now all I need for it to do is not lag so badly when trying to make a post on my forums... :P
Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: locololo2 on January 02, 2009, 10:02:50 AM
Does this still work? Last time I tried it, I don't think it did.
Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: JamminR on January 02, 2009, 10:28:04 AM
It's major problem I know of is that Gmod usermessages can get sent out of order.
I've not changed it to help fight out of order usermessages.
ULib incorporated a way to prevent sending too early, but I'd been planning on making this not require ULib.
I really should find time to update it.
Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: Alex on January 29, 2009, 10:24:10 AM
Is this going to be fixed?
Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: JamminR on January 29, 2009, 03:15:26 PM
*sigh* Some day.
Every time I think about using the Ulib 'fix broken usermessages' function, I end up not doing anything because again, when I go fully public with this, I hope not to use ULib.
I've just not had the urge to really code lately.
Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: Alex on January 29, 2009, 03:24:59 PM
ULib is awesome! Why not use it?
Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: JamminR on January 29, 2009, 04:54:55 PM
ULib is awesome! Why not use it?
Compatibility. Yes, ULib is awesome.
Unfortunately, not everyone wants to use it.
Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: Alex on January 29, 2009, 07:20:27 PM
 :o well then f^%#! them this is a ULX and ULib community.
Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: jay209015 on January 29, 2009, 08:27:55 PM
Quote
Shocked well then f^%#! them this is a ULX and ULib community.
     - Not necesarry, the Ulyssesmod moto is  "Striving for Simplicity" so requiring only one addon would add to the simplicity
Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: JamminR on January 29, 2009, 08:44:19 PM
Alex, though we appreciate your, uh, fervor for our project, Jay is right. We like simplicity.
If I only had plans to release it here, I might make it rely on ULib.
However, I hope some day to release it in the wild (aka garrysmod.org and facepunch.com)
With all the competition out for various releases, I like having a broader market for the ULib haters.
Perhaps when they see what members of Ulysses release without relying on ULib, they won't be so afraid of modules that rely on it.
(Big dream, I know, but still a fun one) ;D
Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: Black_Knight on March 02, 2009, 02:00:03 AM
I use this, and love it.. Just one quick question, I edited my info page and added 3 iframes, they are html files, saved as .txt which is presumably the correct format seeing as the rest of html in gmod is in text format. They show up as though they aren't there. If I save them as .html filles would I just put them where the motd is located for easy navigation?
Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: JamminR on March 02, 2009, 05:14:55 PM
Knight, your iframe pages would have to be stored on an actual http web server somewhere and converted to iframe links within your info page.
The HTML/text that is displayed to the client is sent to the client in one file, and then the client sees that one file in his screen. Any other content shown would need to be accessible from the client, not the server.
Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: JCDenton on May 24, 2009, 08:02:57 AM
JamminR, sorry, but your position at ULib looks weird for me. UMotd just doesn't work in a proper way! It doesn't show the motd at spawn, cause usermessages get unsyncronized. I always get "Unhandled usermessage [UMotdText]" errors, but when I write in chat !motd it shows the motd. So I'm going to fix that using ULib...but I need help, cause I'm not sure what ULib functions I should use. Can anyone help me?
Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: JamminR on May 24, 2009, 09:12:44 PM
UMotd doesn't work due to Garry's updates over the past year. Just like our official release of ULX menu's don't, only SVN.
I've just not found time to work on UMotd.
However, when/if I did, I'd be using ULib's game mode hooks from ULib SVN, as they've been patched to work and properly detect when a player is ready.
http://ulyssesmod.net/docs/files/lua/ULib/server/gamemode_hooks-lua.html
Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: pump1er on June 21, 2009, 03:59:11 AM
I'm having problems with the motd not showing on spawn, i have ulx ulib umotd all svn and up to date, typing !motd works, but when i go to console and type ulx showMotd i get this
] ulx showMotd
"showMotd" = "0"
admin
  CVAR generated by ULib
, when i try ulx showMotd 1 or rcon "ulx showMotd 1 then rejoin the game and type ulx showMotd in the console again its back to zero, i cant figure out what i messed up. the last thing i remember doing before it quit showing up was i deleted ulx_motd, and put motd_template into gmod/data/Umotd

edit, i joined my game and noticed a error in console,
Warning: Unhandled usermessage 'UMotdStart'
Warning: Unhandled usermessage 'UMotdText'
Warning: Unhandled usermessage 'UMotdText'
Warning: Unhandled usermessage 'UMotdText'
Warning: Unhandled usermessage 'UMotdText'
Warning: Unhandled usermessage 'UMotdText'
Warning: Unhandled usermessage 'UMotdText'
Warning: Unhandled usermessage 'UMotdEnd'
Warning: Unhandled usermessage 'SendUMotd'
Title: Re: UMotd Revived - Motd and OTHER informational screens.
Post by: Megiddo on June 21, 2009, 09:47:53 AM
Read the post above yours...

UMotd doesn't work due to Garry's updates over the past year
Title: Re: [BROKEN] UMotd Revived - Motd and OTHER informational screens.
Post by: pump1er on June 21, 2009, 10:15:10 AM
odd, it seem to all work properly except for showing on spawn,           what was not working about it from the gmod updates?
Title: Re: [BROKEN] UMotd Revived - Motd and OTHER informational screens.
Post by: lavacano201014 on July 12, 2009, 05:13:07 PM
If I use this, can I use ULX default MOTD alongside it?
Title: Re: [BROKEN] UMotd Revived - Motd and OTHER informational screens.
Post by: JamminR on July 12, 2009, 07:27:21 PM
- Can run with or without ULX. By default, attempts to disable/override ULX motd command.

ULX's motd command has changed since I last updated this.
Before the change, typing in "ulx motd" would show whichever UMotd screen was configured to load on spawn.

Again, this hasn't been updated in a long while, several Gmod updates may have broken it, and ULX motd has been changed.
Your results may vary, but, Megiddo did add [Broken] to the subject title.
Title: Re: [BROKEN] UMotd Revived - Motd and OTHER informational screens.
Post by: lavacano201014 on July 14, 2009, 03:24:58 PM
ULX's motd command has changed since I last updated this.
Before the change, typing in "ulx motd" would show whichever UMotd screen was configured to load on spawn.

Again, this hasn't been updated in a long while, several Gmod updates may have broken it, and ULX motd has been changed.
Your results may vary, but, Megiddo did add [Broken] to the subject title.

All I really want to do is have a seperate screen or two that popped up on command. No need for an MOTD on Spawn.
Title: Re: [BROKEN] UMotd Revived - Motd and OTHER informational screens.
Post by: JamminR on July 14, 2009, 07:33:24 PM
According to pumpers post, (http://forums.ulyssesmod.net/index.php/topic,3343.msg14853.html#msg14853) some of it still works.
Title: Re: [BROKEN] UMotd Revived - Motd and OTHER informational screens.
Post by: JamminR on July 17, 2009, 03:33:36 PM
All - until I find time (and self motivation) to continue this, I'm locking the thread.
Thanks for all input many of you have made.
My team mates are more than welcome to fix/change/update/and optimize.

To do
Fix umsg
Better group detection
Optimize (gmatch! (Find is sloooow) - which means me learning string pattern expressions.)
(this list may or may not grow)

Maybe some day-
Random buttons (Allow for express instruction in text that says press certain button, have button not always same place)
Group based motds