Re: [gnome-mud] plugin examples



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wednesday 21 January 2004 23:56, Boris Schmid wrote:
> Using version 10.4a, and apparently the hpbar plugin is working with a
> newer version, but not this one..

If you know how to apply source-patches, you may want to apply the attached 
patch to the 0.10.4a source tree. Should get you PyGTK support and therefore 
HP-info should work fine.

> Anyway, I'm a new user, and have some trouble figuring out how to do
> basic things in plugins. I can use the profiles and hotkeys and triggers
> and such in the client itself, but would like to make use of the plugin
> capabilities. Documentation seems somewhat incomplete.

The documentation explains the specific interfaces for GnomeMud, the scripting 
interface itself is either Python or C. Both are stand-alone languages in 
their own right. For Python, start at www.python.org. For C, I can't think of 
a website to recommend but I do recommend the book "The C Programming 
Language" by Brian Kernighan and Dennis Ritchie.

> Perhaps an example plugin could contain a few things:
>
> *Ticktimer.
> *variable setting with an alias (aka 'targ janitor'), so that other
> aliases / keybinds can use that target.

def aliasFunc(c,s):
	# check if S is your alias and modify it.
	return s

GnomeMud.register_output_handler(aliasFunc)

> *keybinds. (I'll have to check if the profiles are saved somewhere in a
> plugin-like format, so I can see how to make a plugin for keybinds)

At the moment, there isn't an interface for plugins to bind keys. A possible 
consideration for the future.

> *substitutes/highlights

Use register_input_handler, modify the text as appropriate and return it.

- -- 
"Software is like sex: It's better when it's free." - Linus Torvalds

Please avoid sending me Word or PowerPoint attachments.
See http://www.fsf.org/philosophy/no-word-attachments.html

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQFADpmL94zI/zB2CYURAu57AJ9Mrl2MCUfptiNFLlTQXVDjOTw2zwCgo2gX
dc/4/SxUw+Kkba9cz88dxIA=
=JXlz
-----END PGP SIGNATURE-----
Only in ./doc/gnome-mud-manual/C: Makefile
Only in ./doc/gnome-mud-manual/C: omf_timestamp
Only in ./doc/gnome-mud-manual: Makefile
Only in ./doc/gnome-mud-plugin-api/C: Makefile
Only in ./doc/gnome-mud-plugin-api/C: omf_timestamp
Only in ./doc/gnome-mud-plugin-api: Makefile
Only in ./doc: Makefile
Only in ./doc/omf-install: gnome-mud-manual-C.omf
Only in ./doc/omf-install: gnome-mud-plugin-api-C.omf
Only in ./doc/omf-install: Makefile
Only in ./: gnome-mud-0.10.4a-pygtk.patch
Only in ./plugins: Makefile
Only in ./po: Makefile
Only in ./po: Makefile.in
Only in ./po: POTFILES
Only in ./src: .deps
diff -r ../gnome-mud-0.10.4a/src/init.c ./src/init.c
44c44
< /* FIXME
---
> 
48c48
< */
---
> 
730c730
< /* FIXME
---
> 
735c735
< */
---
> 
diff -r ../gnome-mud-0.10.4a/src/python.c ./src/python.c
32d31
< /* FIXME
34a34
> #include <gtk/gtk.h>
36d35
< */
52c51
< /* FIXME
---
> 
56c55
< */
---
> 
266c265
< /* FIXME
---
> 
270a270
>   GtkWidget *gwidget;
277c277,281
< 	gtk_box_pack_start (GTK_BOX (box_user), GTK_WIDGET(pygobject_get(widget)), (gboolean)expand, (gboolean)fill, (guint)padding);
---
>   
>   gwidget = GTK_WIDGET(widget->obj);
> 
>   gtk_box_pack_start (GTK_BOX (box_user), gwidget, (gboolean)expand, (gboolean)fill, (guint)padding);
>   gtk_widget_show(gwidget);
283c287
< */
---
> 
385c389
< /* FIXME
---
> 
389c393
< */
---
> 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]