This is a straight conversion, and does not make any attempt to be more asynchronous, as I don't know the protocol between them, but I expect there are ways to reduce the blocking.
Testing Done:
Compile only.
Reviewed at https://reviews.imfreedom.org/r/247/
/*
* Purple buddy notification plugin.
*
* Copyright (C) 2000-2001, Eric Warmenhoven (original code)