Here's a plugin that will do it for you. Put it in the plugins directory for Gaim, restart Gaim, and then load it via Preferences -> Plugins. When talking to someone, if you send a message in the format of /send /path/to/file the contents of /path/to/file will be sent to them. If you wanted, you could also make the contents display in the IM window for you, but I'll leave that as an exercise to try out yourself.
This plugin uses the new Gaim Perl API, so make sure you have a pretty recent copy (I tested it on 0.74). Be aware that there are message size limits in AIM (and most other protocols) that this plugin does not take into account; you may get "Unable to send message" dialogs if the file contents are too big. If the file doesn't exist, this plugin leaves the message untouched (i.e. the user you're sending it to will see exactly what you typed).
Finally, to learn more about Gaim plugins, check out the examples in the source tree (downloadable from the website) and the API doc (online version is slightly outdated).
|