Author Topic: Umotd - Message Of The Day/Other info screens  (Read 12197 times)

0 Members and 1 Guest are viewing this topic.

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8087
  • Karma: 389
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Umotd - Message Of The Day/Other info screens
« on: January 12, 2007, 11:33:02 PM »
NOTE: This version no longer supported/maintained. See Umotd Revived

Current Version: v1.30
DOWNLOAD: http://www.ulyssesmod.net/JamminR/Umotd/
UPDATED - Changelog
-[Version 1.30 - 01/21/07]
[Change] Optimized\cleaned up\improved Admin detection code (%curadmins%)
[Fix]    Actually, work around. Nightmare table key value challenge with ULib.ucl.groups. (Don't ask) THANKS Spbogie!!
[Fix]    Spelling in Umotd_readme.txt (I know, there's probably more)
[Fix]    Removed a sentence from default motd.txt that was left over from my actual server motd.txt. (DOH!)
[Add]    ULib Admin group table lookup. Part of change, will allow for ULib group detection other than current ULX v2.03 defaults(superadmin,admin,operator)
[Add]    More comments to my code. It's growing, and I was getting lost. ;)
[Add]    Configuration item - Control whether or not dynamic variables are on/converted.
[Add]    Dynamic variables - See Umotd_readme.txt for descriptions - %curnumadmins%, %uptime_full%, %uptime_short%
[Add]    More dynamic vars (Server Settings) - %cheats%, %noclip%, %allownpcs%, %godmode%, %plpldamage%
[Add]    More dynamics (Server Limits) - %maxnpcs%, %maxballoons%, %maxdynamite%, %maxthrusters%, %maxprops%, %maxwheels%, %maxhoverballs%
[Add]    Yet more dynamics (limits) - %maxsents%, %maxeffects%, %maxbuttons%, %maxlamps%, %maxragdolls% ,%maxvehicles%, %maxemitters%
[Add]    Description of new dynamic variables that can be used placed in Umotd_readme.txt

Introducing Umotd - Message Of The Day

NOTICE! This Lua release REQUIRES ULib 2.03 or higher.
Get the latest version of ULib from the download link at http://www.ulyssesmod.net
This release does not require you to use ULX, just ULib

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!


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, !help, !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 ULX 3.02+ motd
- v1.2+ Dynamic variables allow text/html to fill in with information. (See Umotd_readme.txt)
- v1.2+ Configure where files load from more easily.
- More planned.


Quick instructions
- Download the file. (See link at top of this post)
- Extract to the root of your Garrysmod folder (Dedicated Server OR Listen, both should work)
- Read the garrysmod\Umotd_readme.txt file, it contains more detailed instructions.
- Start your server
- Enjoy

Quick Example



Notes
- This attempts to disable ULX 3.02+ motd function if you use ULX. The files are stored in different location. Please see Umotd_readme.txt.
- Correctly guess the secret meanings behind the rule numbers in the default motd.txt (not pictured), and get a permanent credit in the main lua file.
  (I judge, may not give to those who know me personally) (No help from those who do know me!)


Known Issues
- URadio compatibility. Please see Umotd_readme.txt for workaround.
- V1 bug - "help" in the command & file table won't load help.txt. (help is a Source console command). Until future version, rename it to "helpme" or something else you want.

Again, this requires ULib 2.03[/url] or higher.

(Not So)FAQS
Q. Why didn't you use the default source "motdfile" location variable"
A. 1) Easier file management. 2) Possible dynamic file creation in future release.

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.

Q. When starting a dedicated server using srcds.exe from command line, I get the error "The procedure entry point steamfindserversnumbervers could not be located in the DLL steam.dll". Clicking OK seems to let it go ahead anyway.
A. This is a Source/srcds.exe issue. Steam recently updated(Jan 8/07), along with its root path steam.dll. Even when running hldsupdatetool.exe -command update -game <any game> .. it doesn't update its own copy of steam.dll.
Possible Work-around - rename your_srcds.exe_path\bin\steam.dll to steam_old.dll
Copy your_program_files\steam_path\steam.dll to your_srcds.exe_path\bin\
Try again. Worked for me.

Gmod 1/18/07 Update/ULib/Umotd broke
Garry's 1/18/2007 update broke the way a key ULib plugin that Umotd uses to interact with Garry's mod.
Please see the post and grab the fixed ULib file at
http://forums.ulyssesmod.net/index.php/topic,674.0.html
« Last Edit: April 21, 2008, 01:50:31 PM by JamminR »
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Golden-Death

  • Hero Member
  • *****
  • Posts: 751
  • Karma: 0
  • Honored Lua Scripter
    • BlueFire
Re: Umotd - Message Of The Day/Other info screens
« Reply #1 on: January 13, 2007, 12:37:30 AM »
Wakka-Wakka-Wakka-Wakka-Wakka-Wakka-Wakka-Wakka



Pac-man approved.

« Last Edit: May 06, 2007, 07:26:02 AM by Golden-Death »


Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8087
  • Karma: 389
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Umotd - Message Of The Day/Other info screens
« Reply #2 on: January 14, 2007, 09:44:36 PM »
UPDATE - 1/15
-[Version 1.20 - 1/15/05]
[Change] Corrected some comments in ULib_init.lua configuration area
[Fix]    Changed default "help" command to "helpme". (Source uses help)
[Add]    Error report - If command table has file it can't find, will report to console.
[Add]    Configuration item - Can (more easily) change where files load from by default
[Add}    Dynamic variables - Autoreplaced if used in text/html
         %curadmins%,%curcon%,%curmap%,%curplayers%,%defgame%,%game%,%hostname%,%maxplayers%,%Umotd_ver%
[Add]    Stats file and command to show example way to include dynamic variables.
[Add]    Updated Ulib_readme.txt to show dynamic variables, and stress file/configuration changes from defaults.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8087
  • Karma: 389
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Umotd - Message Of The Day/Other info screens
« Reply #3 on: January 21, 2007, 07:25:29 PM »
Updated
-[Version 1.30 - 01/21/07]
[Change] Optimized\cleaned up\improved Admin detection code (%curadmins%)
[Fix]    Actually, work around. Nightmare table key value challenge with ULib.ucl.groups. (Don't ask) THANKS Spbogie!!
[Fix]    Spelling in Umotd_readme.txt (I know, there's probably more)
[Fix]    Removed a sentence from default motd.txt that was left over from my actual server motd.txt. (DOH!)
[Add]    ULib Admin group table lookup. Part of change, will allow for ULib group detection other than current ULX v2.03 defaults(superadmin,admin,operator)
[Add]    More comments to my code. It's growing, and I was getting lost. Wink
[Add]    Configuration item - Control whether or not dynamic variables are on/converted.
[Add]    Dynamic variables - See Umotd_readme.txt for descriptions - %curnumadmins%, %uptime_full%, %uptime_short%
[Add]    More dynamic vars (Server Settings) - %cheats%, %noclip%, %allownpcs%, %godmode%, %plpldamage%
[Add]    More dynamics (Server Limits) - %maxnpcs%, %maxballoons%, %maxdynamite%, %maxthrusters%, %maxprops%, %maxwheels%, %maxhoverballs%
[Add]    Yet more dynamics (limits) - %maxsents%, %maxeffects%, %maxbuttons%, %maxlamps%, %maxragdolls% ,%maxvehicles%, %maxemitters%
[Add]    Description of new dynamic variables that can be used placed in Umotd_readme.txt
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Kingtendo

  • Guest
Re: Umotd - Message Of The Day/Other info screens
« Reply #4 on: May 06, 2007, 06:57:21 AM »
Damm, This Doesnt Work With the new ulx and ulib..

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8087
  • Karma: 389
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Umotd - Message Of The Day/Other info screens
« Reply #5 on: May 06, 2007, 08:17:31 AM »
This Doesnt Work With the new ulx and ulib..

No, it doesn't. Thanks for the reminder. The facepunch release post had become so buried that I believed it wouldn't ever get revived again.
I'd forgotten this one is more visible.
I'll update the information on this one.

I guess I could do a dirty hack and include our old resource that allowed for html.
Though, I feel that would be bad practice.

Though doubtful (busy/not in the coding mood), perhaps one day I'll port it for the new Garry's mod html GUI capabilities that our newest ULib and ULX take advantage of.

I am interested though, as I haven't heard anyone discuss it lately...What features did you like/use? Perhaps if well enough, I could the team into incorporating some of them into ULX.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6215
  • Karma: 394
  • Project Lead
Re: Umotd - Message Of The Day/Other info screens
« Reply #6 on: May 06, 2007, 08:41:00 AM »
Why do you feel including the old module would be bad practice? It was made specifically to show the motd window. :P
« Last Edit: May 06, 2007, 08:47:20 AM by Megiddo »
Experiencing God's grace one day at a time.

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8087
  • Karma: 389
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Umotd - Message Of The Day/Other info screens
« Reply #7 on: May 06, 2007, 08:49:39 AM »
Why do you feel including old would be bad practice? It was mad specifically to show the motd window. :P

Because it's a quick hack!
Best practice would be for me to learn and use the new improved and feature rich  Lua HTML gui code as ULX does in v3.1!
:P

I really should get off my butt and learn it. Before falling out of coding mood, I'd make quite a bit of progress with Addon Detection.
I'd added %addons_short% and %addons_long%. Short would show just addon titles(w/version) according to the info.txt of each file, and long would show "title(w/version) by <author>".
Due to the increasing length of the output, I'd also gone to using CSS (not separate files, but inline). Even after that, I'd realized I'd have to split !info into two commands. :)
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

kingtendo

  • Guest
Re: Umotd - Message Of The Day/Other info screens
« Reply #8 on: May 06, 2007, 08:53:01 AM »
Please redo this :-* I really find this useful and am no good at lua coding or html myself. If you do make it again, i think you should make each template more interesting and mabye not green and black for the motd. Thanks dude  :D

Offline Lapsus

  • Newbie
  • *
  • Posts: 5
  • Karma: 0
Re: Umotd - Message Of The Day/Other info screens
« Reply #9 on: May 13, 2007, 02:42:58 AM »
Just gotta get my two cen'ts worth in here too...

I'd really like to see this redone, it was great to be able to have easily-accessible html pages from in-game!
I had this set up on my server with seperate pages for the motd, Clan information, server information, and rules, as well as some small tutorials!
It's just so much easier to be able to ask a player to type a command into chat that to have a gigantic motd, and saying "Oh, scroll about 3/5ths of the way down, the details for rule #2 are around there somewhere"

Offline Kingtendo

  • Newbie
  • *
  • Posts: 16
  • Karma: 0
Re: Umotd - Message Of The Day/Other info screens
« Reply #10 on: May 18, 2007, 12:06:02 PM »
Doh! Seems to be broken after update :(
_____________________________________
Ah maybe It does ;/ just doesn't seem to work in ulib/modules, Only in lua/autorun.
« Last Edit: May 18, 2007, 12:59:44 PM by Kingtendo »

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8087
  • Karma: 389
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Umotd - Message Of The Day/Other info screens
« Reply #11 on: May 19, 2007, 07:38:12 PM »
Doh! Seems to be broken after update :(
NOTE: This will not work with the newest HTML gui implimentation used in ULX 3.1

_____________________________________
Ah maybe It does ;/ just doesn't seem to work in ulib/modules, Only in lua/autorun.

This is because one of the key files used in the old ULX/ULib doesn't get deleted when you uninstall ULX/ULib from the old location.


However. Thank you all for the input. At this point in time, I do not have time (preparing a house to sell, move to an apartment, then shop for a new house) or resources (my main computer just died, parts are arriving, however, shouldn't really spend time on it.) to work on remaking or rehacking this one.

Thanks, but I'm locking this topic.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming