# HG changeset patch # User Eric Warmenhoven # Date 1001010975 0 # Node ID f74eefb55a78947a2cbad6cc322b39ae9b613195 # Parent 1add424e55444a75ff7f737b3b828f7009700d5c [gaim-migrate @ 2337] removed CRAZY, it was outdated. various other touch-ups. committer: Tailor Script diff -r 1add424e5544 -r f74eefb55a78 plugins/CRAZY --- a/plugins/CRAZY Thu Sep 20 18:06:06 2001 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,65 +0,0 @@ -Figure out a user's IP address if they have the same plugin loaded - - This would be a really interesting and pretty useful plugin. It - could work possibly by sending 'hidden' text in the form of an - HTML tag or something, and if it receives the same hidden text, - it could then pass messages back and forth to send and receive - the IP addresses. - -Perform extra HTML-highlighting and HTML-stripping - - Ever get annoyed because gaim doesn't support some HTML markup? - Here's a work-around. (Although, if you're this determined, you - might as well just hack gaim and send us the patches ;-) .) - -Auto-reply - - If someone sends you a message, immediately send them a message - back. Add fun things to the message. Reverse their text, then - send it back to them. Play with fonts and colors and HTML tags. - Really annoy the hell out of them. :-) - -Control gaim by monitoring a file - - I have to admit, I blatently stole this idea from LICQ. But it - is a really interesting concept. What happens is it watches a - certain file to see if it's empty or not. If it's not, it reads - the contents and executes any commands stored in there (such as - send a message to someone). This can be nice for having remote - control of gaim. - - -These are just some of the ideas I came up with in about ten minutes. A -really nice thing about having plugins is as long as your code doesn't -segfault, you can keep testing and debugging without having to restart -gaim. Plus the plugins tend to be small, and quick and easy to compile, -so development should be quick. Try to have FUN with these plugins :-). -(BTW, dibs on the 'control by file' plugin. :-) .) - -Other useful ideas I came up with later: - --Auto-reconnect on kick --Stock/News ticker (I don't want it, but some people do) --Spell check - - This one watches what you're sending and replaces common misspelled - words (e.g. teh -> the, u -> you, r -> are, etc.). - --Play games through the same gaim plugin - - This one I think is one of my crazier ideas that I would only come up - with this early in the morning. This plugin would somehow determine if - the other person is using the same plugin. If s/he is, it would allow - the people to play a game against each other, like checkers. It could - be done by watching the messages passed and intercepting ones that - relate to the game/plugin. Conversation could even continue as usual. - What gets really warped is then you could write plugins for that - plugin for various games (checkers, chess, hearts (4 people!)). I have - no desire of trying this one, help yourself. - -There's going to be a few plugins that are going to ship with gaim by default -eventually, probably. This would be a good thing to put in the PATCHES thing -over at sourceforge.net, if you write one. Most plugins are probably only going -to be one short file, which is probably how most of them should be (some short -little hack to do the auto-reconnect thing, for example. That can probably be -done in about 10-15 lines). diff -r 1add424e5544 -r f74eefb55a78 plugins/HOWTO --- a/plugins/HOWTO Thu Sep 20 18:06:06 2001 +0000 +++ b/plugins/HOWTO Thu Sep 20 18:36:15 2001 +0000 @@ -14,7 +14,7 @@ Ok, now you're ready to write the plugin. -The only function that is required is gaim_plugin_init(void *). This gets +The only function that is required is gaim_plugin_init(GModule *). This gets called as soon as it gets loaded (sort of - man dlopen for more details). If your function never returns, it will crash gaim! If your plugin uses up all the memory in the system, it will crash gaim! Once your plugin gets loaded, @@ -23,21 +23,21 @@ is your problem, not mine. (I'm usually nice and willing to help you with your problems though.) -The void * that gets passed to gaim_plugin_init is the handle for the plugin. +The GModule* that gets passed to gaim_plugin_init is the handle for the plugin. DO NOT CHANGE THIS POINTER! Bad things will happen. You've been warned. It's needed for connecting to signals and things. It's a good idea to remember it somehow. -gaim_plugin_init should return an int. If the int returned is less than 0, it -is interpreted as an error, and gaim_plugin_error is called. See the ChangeLog -file in this directory for more details, and error.c for an example. +gaim_plugin_init should return a char*. If the char* returned is not NULL, it +is interpreted as an error, and used as an error message. See the ChangeLog +file in this directory for more details. You can basically do anything you want in the plugin. You can make function calls, change public widgets, display new widgets, things like that. But the really neat thing is you can do things at events. For example, when one of your buddies signs on, you can instantly send them a message. You can modify the incoming and outgoing text. You can do all kinds of crazy things. Whatever -you want. Check out SIGNALS and CRAZY for more information and ideas. +you want. Check out SIGNALS for more information. Plugins can share globals with gaim, but will not share with other plugins. This is so if you have a global variable GtkWidget *window in your plugin and @@ -46,7 +46,7 @@ that plugins will have difficulty working together. But then again, that's what shared memory is for. -Plugins can be configured. This makes is so they don't have to be recompiled +Plugins can be configured. This makes it so they don't have to be recompiled in order to change things internal to them, and it's also just a cool feature to have :). It's optional; to allow your plugin to be configured, add a function called gaim_plugin_config(). The advised course of action is to have @@ -57,8 +57,8 @@ the plugin gets unloaded, it removes the window. Also, all the callbacks you have attached to gaim signals will be removed. -Plugins can also unload themselves. To do this, call gaim_plugin_unload(void *) -(the void* is the handle passed to gaim_plugin_init). When your plugin gets +Plugins can also unload themselves. To do this, call gaim_plugin_unload(GModule *) +(the GModule* is the handle passed to gaim_plugin_init). When your plugin gets unloaded, gaim will remove all of your callbacks. It will not call your gaim_plugin_remove function, however, since it will assume you have already done the necessary cleanup. diff -r 1add424e5544 -r f74eefb55a78 plugins/Makefile.am --- a/plugins/Makefile.am Thu Sep 20 18:06:06 2001 +0000 +++ b/plugins/Makefile.am Thu Sep 20 18:36:15 2001 +0000 @@ -29,6 +29,5 @@ endif -EXTRA_DIST = ChangeLog PERL-HOWTO CRAZY HOWTO SIGNALS autorecon.c error.c filectl.c \ - gaiminc.c iconaway.c lagmeter.c notify.c simple.c spellchk.c \ - toc_commands.c events.c gaim.pl mailchk.c chatlist.c +EXTRA_DIST = ChangeLog PERL-HOWTO HOWTO SIGNALS autorecon.c filectl.c iconaway.c \ + lagmeter.c notify.c spellchk.c gaim.pl mailchk.c chatlist.c