gm_gntp (Growl notifications)

Here is a very barebones module for Growl notifications that I have been meaning to make.

Binary: http://github.com/downloads/sk89q/gmod/gm_gntp.dll
Source: http://github.com/sk89q/gmod/tree/master/gm_gntp/


require("gntp")
gntp.Notify("localhost", "Garry's Mod", "Notification ID", "Title", "Message", "Password")


What in blazes is a growl notification? Screenshots if that applies.

Growl is a desktop notification program (for those popups a la MSN or Steam) for Mac that is pretty de facto (from what I can gather). A Windows version was made by a third party, and it uses the same protocol. I find the Windows version pretty terrible, but there’s not anything else like it.

http://www.growlforwindows.com/gfw/

I would like to see a screen shot :3

Any of these:
http://www.growlforwindows.com/gfw/displays.aspx

If you play Gmod windowed and you alt-tab out a lot, then the notifications can be useful.

I can see this being useful when alt tabbing and someone says your name.

If you’ve only got one function, there’s no reason to use a table.
use something like
GrowlNotification()
Neat though.

If I add more functions later, then I don’t need to change my existing code. I was actually planning to add some more, but I didn’t really need them, so I didn’t bother.

I actually prefer global tables over functions. With global tables, you can almost always know what a module’s exports are by knowing its name.

the license is longer than the module source
:lol:

Who would have guessed legal documentation would be longer than a simple module.

This module looks EPIC! I’ll make it show the last thing said in chat! It annoyed me when I couldn’t see chat. And I’ll combine it with Steamworks to show steam messages outside of the game!(if it works, idk if i can recieve messages yet) EPIC!

Just need a way to check if I’m currently inside the menu(the escape menu) or even out of the game so I can send all chat events right onto my desktop.

I think you can do that with one of the functions in the SDK, I remember seeing something like it but I can’t remember where.

I’m confused, if it’s for Growl, and you don’t like the Windows version, were you doing this for when Gmod goes to Mac?

I don’t like cake, that doesn’t mean I won’t make forks.

I am using the Growl version for Windows, but only for Gmod (bots and their ilk).

Does anyone have an example for chat?

Here’s one that notifies for all chat messages:


require("gntp")

local function OnPlayerChat(ply, text, teamChat, playerIsDead)
    gntp.Notify("localhost", "Garry's Mod Chat", "Chat", "Message", ply:GetName() .. ": " .. text, "")
end

hook.Add("OnPlayerChat", "GrowlChat", OnPlayerChat)

Wait, this might seem like a stupid question, but do we have to have growl installed for this to work?

Not the dll, but the program.