Advertisement
Guest User

Untitled

a guest
Dec 20th, 2014
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. #include "../include/plugin-handler.h"
  4. #include "../include/server.h"
  5.  
  6. char plugin_name[] = "Logger";
  7. char plugin_version[] = "0.01";
  8. char plugin_author[] = "Joona";
  9.  
  10. int on_connect(void **params, int argc)
  11. {
  12. server *srv = (server*) params[0];
  13. printf("Connected to %s:%s\n", srv->host, srv->port);
  14. return BCIRC_PLUGIN_OK;
  15. }
  16.  
  17.  
  18. int plugin_init(plugin *pluginptr)
  19. {
  20. register_callback(CALLBACK_SERVER_CONNECTED, on_connect, pluginptr);
  21. return BCIRC_PLUGIN_OK;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement