Author Topic: [BROKEN] UMotd Revived - Motd and OTHER informational screens.  (Read 60406 times)

0 Members and 2 Guests are viewing this topic.

Offline spbogie

  • Ulysses Team Member
  • Sr. Member
  • *****
  • Posts: 456
  • Karma: 41
Re: UMotd Revived - Motd and OTHER informational screens.
« Reply #15 on: April 26, 2008, 11:44:48 AM »
PNG's should be supported, although transparency in them will only work for clients running IE7.
I have not failed. I've just found 10,000 ways that won't work. - Thomas A. Edison
I reject your reality and substitute my own. - Adam Savage

Offline Kingtendo

  • Newbie
  • *
  • Posts: 16
  • Karma: 0
Re: UMotd Revived - Motd and OTHER informational screens.
« Reply #16 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').

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: UMotd Revived - Motd and OTHER informational screens.
« Reply #17 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.

"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Marlamin

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
Re: UMotd Revived - Motd and OTHER informational screens.
« Reply #18 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?
« Last Edit: April 28, 2008, 05:30:56 PM by JamminR »

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: UMotd Revived - Motd and OTHER informational screens.
« Reply #19 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.
« Last Edit: April 28, 2008, 05:32:04 PM by JamminR »
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Marlamin

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
Re: UMotd Revived - Motd and OTHER informational screens.
« Reply #20 on: April 29, 2008, 01:49:41 AM »
Thanks a lot! :D

Offline jay209015

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 934
  • Karma: 62
    • Dev-Solutions
Re: UMotd Revived - Motd and OTHER informational screens.
« Reply #21 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.
« Last Edit: April 29, 2008, 02:58:14 PM by jay209015 »
An error only becomes a mistake when you refuse to correct it. --JFK

"And thus the downfall of the great ULX dynasty was wrought not by another dynasty, but the slow and steady deterioration of the leaders themselves, followed by the deprecation of the great knowledge they possessed." -Gmod, Chapter 28, verse 34 -- Stickly

Offline jay209015

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 934
  • Karma: 62
    • Dev-Solutions
Re: UMotd Revived - Motd and OTHER informational screens.
« Reply #22 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.
An error only becomes a mistake when you refuse to correct it. --JFK

"And thus the downfall of the great ULX dynasty was wrought not by another dynasty, but the slow and steady deterioration of the leaders themselves, followed by the deprecation of the great knowledge they possessed." -Gmod, Chapter 28, verse 34 -- Stickly

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: UMotd Revived - Motd and OTHER informational screens.
« Reply #23 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?
« Last Edit: April 29, 2008, 04:18:03 PM by JamminR »
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline jay209015

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 934
  • Karma: 62
    • Dev-Solutions
Re: UMotd Revived - Motd and OTHER informational screens.
« Reply #24 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
An error only becomes a mistake when you refuse to correct it. --JFK

"And thus the downfall of the great ULX dynasty was wrought not by another dynasty, but the slow and steady deterioration of the leaders themselves, followed by the deprecation of the great knowledge they possessed." -Gmod, Chapter 28, verse 34 -- Stickly

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: UMotd Revived - Motd and OTHER informational screens.
« Reply #25 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.

"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline jay209015

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 934
  • Karma: 62
    • Dev-Solutions
Re: UMotd Revived - Motd and OTHER informational screens.
« Reply #26 on: April 29, 2008, 06:35:28 PM »
No, I'm writing them into the file myself with my script in the developers corner.

An error only becomes a mistake when you refuse to correct it. --JFK

"And thus the downfall of the great ULX dynasty was wrought not by another dynasty, but the slow and steady deterioration of the leaders themselves, followed by the deprecation of the great knowledge they possessed." -Gmod, Chapter 28, verse 34 -- Stickly

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: UMotd Revived - Motd and OTHER informational screens.
« Reply #27 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.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline blacksythe

  • Newbie
  • *
  • Posts: 38
  • Karma: -1
Re: UMotd Revived - Motd and OTHER informational screens.
« Reply #28 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.

Offline Sc00by22

  • Jr. Member
  • **
  • Posts: 98
  • Karma: 0
Re: UMotd Revived - Motd and OTHER informational screens.
« Reply #29 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